From: Eugen Rochko Date: Sat, 23 Mar 2019 13:07:17 +0000 (+0100) Subject: Fix vote-after-expiration not showing error, count vote as interaction (#10352) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=9d0573f574f1861731ebfd08bdf0ca8bbd3b4dfb;p=mastodon.git Fix vote-after-expiration not showing error, count vote as interaction (#10352) --- diff --git a/app/services/vote_service.rb b/app/services/vote_service.rb index 0cace6c00..81af9ef3a 100644 --- a/app/services/vote_service.rb +++ b/app/services/vote_service.rb @@ -11,14 +11,14 @@ class VoteService < BaseService @choices = choices @votes = [] - return if @poll.expired? - ApplicationRecord.transaction do @choices.each do |choice| @votes << @poll.votes.create!(account: @account, choice: choice) end end + ActivityTracker.increment('activity:interactions') + if @poll.account.local? distribute_poll! else