From abfd0c107c8003ba06a118625c49d22df553696f Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Fri, 14 Aug 2020 02:41:44 -0500 Subject: [Command Tags] Add #!notify toggle to allow toggling whether or not a post should be locally delivered to timelines/notifications --- app/services/update_status_service.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/services/update_status_service.rb') diff --git a/app/services/update_status_service.rb b/app/services/update_status_service.rb index 05586aa1b..327cc74ea 100644 --- a/app/services/update_status_service.rb +++ b/app/services/update_status_service.rb @@ -147,6 +147,8 @@ class UpdateStatusService < BaseService ActivityPub::DistributionWorker.perform_async(@status.id) if @status.local? && !@status.local_only? + return unless @status.notify? + mentions = @status.active_mentions.includes(:account).where(id: @new_mention_ids, accounts: { domain: nil }) mentions.each { |mention| LocalNotificationWorker.perform_async(mention.account.id, mention.id, mention.class.name) } end -- cgit