diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-02 00:03:31 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-02 00:03:31 +0100 |
commit | d9ca46b464dc5a5eb0ad308809c15a79dcd17ada (patch) | |
tree | 481d65b29b53d84314f7783c1eb0f4b122e7a7ef /app/channels | |
parent | 1da0ce5c7cf6a5b90e28a810c8b3ef4003239383 (diff) |
Cleaning up format of broadcast real-time messages, removing
redis-backed "mentions" timeline as redundant (given notifications)
Diffstat (limited to 'app/channels')
-rw-r--r-- | app/channels/application_cable/channel.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb index f9154bd7f..ae69032ce 100644 --- a/app/channels/application_cable/channel.rb +++ b/app/channels/application_cable/channel.rb @@ -7,10 +7,10 @@ module ApplicationCable def hydrate_status(encoded_message) message = ActiveSupport::JSON.decode(encoded_message) - return [nil, message] if message['type'] == 'delete' + return [nil, message] if message['event'] == 'delete' - status = Status.find_by(id: message['id']) - message['message'] = FeedManager.instance.inline_render(current_user.account, 'api/v1/statuses/show', status) + status = Status.find_by(id: message['payload']) + message['payload'] = FeedManager.instance.inline_render(current_user.account, 'api/v1/statuses/show', status) [status, message] end |