Skip to content

Commit

Permalink
Fix duplicate notification and delivery of mentions (mastodon#14378)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored and Mage committed Jan 14, 2022
1 parent e42eead commit d418aca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/process_mentions_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def call(status)

next match if mention_undeliverable?(mentioned_account) || mentioned_account&.suspended?

mentions << mentioned_account.mentions.where(status: status).first_or_create(status: status)
mention = mentioned_account.mentions.new(status: status)
mentions << mention if mention.save

"@#{mentioned_account.acct}"
end
Expand Down

0 comments on commit d418aca

Please sign in to comment.