From a0d4129893c797f78d28ba9df5d35646f7bb0d80 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 26 Sep 2021 13:23:28 +0200 Subject: Refactor notifications to go through a separate stream in streaming API (#16765) Eliminate need to have custom notifications filtering logic in the streaming API code by publishing notifications into a separate stream and then simply using the multi-stream capability to subscribe to that stream when necessary --- app/services/notify_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/services') diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index fc187db40..a1b5ca1e3 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -127,7 +127,7 @@ class NotifyService < BaseService def push_notification! return if @notification.activity.nil? - Redis.current.publish("timeline:#{@recipient.id}", Oj.dump(event: :notification, payload: InlineRenderer.render(@notification, @recipient, :notification))) + Redis.current.publish("timeline:#{@recipient.id}:notifications", Oj.dump(event: :notification, payload: InlineRenderer.render(@notification, @recipient, :notification))) send_push_notifications! end -- cgit