1
0
Fork 0
forked from fedi/mastodon

Fix duplicate notification and delivery of mentions (#14378)

This commit is contained in:
Takeshi Umeda 2020-07-23 22:41:49 +09:00 committed by GitHub
parent d5d856f104
commit 939a47393c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,8 @@ class ProcessMentionsService < BaseService
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