From: Eugen Rochko Date: Thu, 26 May 2022 20:06:10 +0000 (+0200) Subject: Fix empty votes arbitrarily increasing voters count in polls (#18526) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=a8ac7da0570ceca4a3c4d0a4366c5b008e5133cd;p=mastodon.git Fix empty votes arbitrarily increasing voters count in polls (#18526) --- diff --git a/app/services/vote_service.rb b/app/services/vote_service.rb index ccd04dbfc..114ec285c 100644 --- a/app/services/vote_service.rb +++ b/app/services/vote_service.rb @@ -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