0
0
Fork 0

RemoveStatusService fleshed out, still doesn't send Salmon slaps though

This commit is contained in:
Eugen Rochko 2016-09-05 01:59:46 +02:00
parent 413e700fe0
commit 926eea89b5
5 changed files with 84 additions and 19 deletions

View file

@ -31,7 +31,7 @@ class FanOutOnWriteService < BaseService
def push(type, receiver, status)
redis.zadd(FeedManager.key(type, receiver.id), status.id, status.id)
trim(type, receiver)
ActionCable.server.broadcast("timeline:#{receiver.id}", timeline: type, message: inline_render(receiver, status))
ActionCable.server.broadcast("timeline:#{receiver.id}", type: 'update', timeline: type, message: inline_render(receiver, status))
end
def trim(type, receiver)