mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-14 13:31:03 +00:00
fix poll total vote double count (#2464)
This commit is contained in:
parent
f4fcffc8b5
commit
b141500e54
1 changed files with 3 additions and 0 deletions
|
@ -1484,6 +1484,9 @@ func (c *Converter) PollToAPIPoll(ctx context.Context, requester *gtsmodel.Accou
|
|||
// disabled, or the requester is the author
|
||||
// do we actually populate the vote counts.
|
||||
|
||||
// If we voted in this poll, we'll have set totalVotes
|
||||
// earlier. Reset here to avoid double counting.
|
||||
totalVotes = 0
|
||||
if *poll.Multiple {
|
||||
// The total number of voters are only
|
||||
// provided in the case of a multiple
|
||||
|
|
Loading…
Reference in a new issue