Skip to content
Snippets Groups Projects
Commit 446267d1 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Deduplicate delete salmons (send only one per mentioned-account domain)

parent 78b3b526
No related branches found
No related tags found
No related merge requests found
......@@ -32,12 +32,16 @@ class RemoveStatusService < BaseService
end
def remove_from_mentioned(status)
notified_domains = []
status.mentions.each do |mention|
mentioned_account = mention.account
if mentioned_account.local?
unpush(:mentions, mentioned_account, status)
else
next if notified_domains.include?(mentioned_account.domain)
notified_domains << mentioned_account.domain
send_delete_salmon(mentioned_account, status)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment