mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-26 14:51:37 +01:00
Fix poll ending notifications being created for each vote (#15071)
On a poll ending, notifications were created for each vote instead of for each voter.
This commit is contained in:
parent
f1f0400adc
commit
c49805efb1
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class PollExpirationNotifyWorker
|
|||
end
|
||||
|
||||
# Notify local voters
|
||||
poll.votes.includes(:account).map(&:account).select(&:local?).each do |account|
|
||||
poll.votes.includes(:account).group(:account_id).select(:account_id).map(&:account).select(&:local?).each do |account|
|
||||
NotifyService.new.call(account, :poll, poll)
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
|
|
Loading…
Reference in a new issue