If the topic is closed with a topic timer, I don’t think this is working properly. We’ve had a few users report that this is a problem. We’ve just had it again and assuming he is correct when he says he is out of votes, he (at time of writing) has 20 votes cast (which is our limit) and one of these topics is closed, so he should have one spare vote.
We’ve had this mentioned a number of previous times, but they have always told us after they have “removed” their old votes so I’ve been unable to verify it. 99% of our votable threads are closed via a topic timer of a number of days since the last reply, so I suspect the bug may be originating here?
We’re on the latest plugin version and very recently updated discourse itself:
SELECT
dvv.topic_id,
t.last_posted_at::date,
tvc.votes_count
FROM discourse_voting_votes dvv
JOIN topics t ON t.id = dvv.topic_id
JOIN discourse_voting_topic_vote_count tvc ON tvc.topic_id = dvv.topic_id
WHERE dvv.archive = false
AND (t.closed = true OR t.archived = true)
GROUP BY 1,2,3
ORDER BY 2