]> cat aescling's git repositories - mastodon.git/commitdiff
Fix vote-after-expiration not showing error, count vote as interaction (#10352)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 23 Mar 2019 13:07:17 +0000 (14:07 +0100)
committerGitHub <noreply@github.com>
Sat, 23 Mar 2019 13:07:17 +0000 (14:07 +0100)
app/services/vote_service.rb

index 0cace6c005f2059b0fd058518262b973177e70d3..81af9ef3a4b1df26445d8cdeab7eea1057306f91 100644 (file)
@@ -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