mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-28 14:54:50 -05:00
Fix empty votes arbitrarily increasing voters count in polls (#18526)
This commit is contained in:
@@ -7,6 +7,8 @@ class VoteService < BaseService
|
||||
include Lockable
|
||||
|
||||
def call(account, poll, choices)
|
||||
return if choices.empty?
|
||||
|
||||
authorize_with account, poll, :vote?
|
||||
|
||||
@account = account
|
||||
|
||||
Reference in New Issue
Block a user