0
0
Fork 0

Fix notifications delivered to wrong pubsub channel, optimized RemoveStatusService,

slightly optimized FanOutOnWriteService again
This commit is contained in:
Eugen Rochko 2017-04-06 02:26:59 +02:00
parent dea6e47de0
commit dbd529109e
3 changed files with 21 additions and 18 deletions

View file

@ -50,7 +50,7 @@ class NotifyService < BaseService
def create_notification
@notification.save!
return unless @notification.browserable?
Redis.current.publish(@recipient.id, Oj.dump(event: :notification, payload: InlineRenderer.render(@notification, @recipient, 'api/v1/notifications/show')))
Redis.current.publish("timeline:#{@recipient.id}", Oj.dump(event: :notification, payload: InlineRenderer.render(@notification, @recipient, 'api/v1/notifications/show')))
end
def send_email