mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-06 10:25:09 +01:00
Fix empty votes arbitrarily increasing voters count in polls
This commit is contained in:
parent
fb87d6adc2
commit
5e6801f6d7
@ -5,6 +5,8 @@ class VoteService < BaseService
|
|||||||
include Payloadable
|
include Payloadable
|
||||||
|
|
||||||
def call(account, poll, choices)
|
def call(account, poll, choices)
|
||||||
|
return if choices.empty?
|
||||||
|
|
||||||
authorize_with account, poll, :vote?
|
authorize_with account, poll, :vote?
|
||||||
|
|
||||||
@account = account
|
@account = account
|
||||||
|
Loading…
Reference in New Issue
Block a user