Cleaning up format of broadcast real-time messages, removing
redis-backed "mentions" timeline as redundant (given notifications)
This commit is contained in:
parent
1da0ce5c7c
commit
d9ca46b464
17 changed files with 26 additions and 110 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue