0
0
Fork 0

Adding unified streamable notifications

This commit is contained in:
Eugen Rochko 2016-11-20 00:33:02 +01:00
parent 3838e6836d
commit da2ef4d676
20 changed files with 205 additions and 44 deletions

View file

@ -150,12 +150,10 @@ class ProcessFeedService < BaseService
next if mentioned_account.nil? || processed_account_ids.include?(mentioned_account.id)
if mentioned_account.local?
# Send notifications
NotificationMailer.mention(mentioned_account, parent).deliver_later unless mentioned_account.blocking?(parent.account)
end
mention = mentioned_account.mentions.where(status: parent).first_or_create(status: parent)
mentioned_account.mentions.where(status: parent).first_or_create(status: parent)
# Notify local user
NotifyService.new.call(mentioned_account, mention) if mentioned_account.local?
# So we can skip duplicate mentions
processed_account_ids << mentioned_account.id