From d9ca46b464dc5a5eb0ad308809c15a79dcd17ada Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 2 Feb 2017 00:03:31 +0100 Subject: Cleaning up format of broadcast real-time messages, removing redis-backed "mentions" timeline as redundant (given notifications) --- .../javascripts/components/features/public_timeline/index.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/assets/javascripts/components/features/public_timeline/index.jsx') diff --git a/app/assets/javascripts/components/features/public_timeline/index.jsx b/app/assets/javascripts/components/features/public_timeline/index.jsx index 28cdc639a..42970061c 100644 --- a/app/assets/javascripts/components/features/public_timeline/index.jsx +++ b/app/assets/javascripts/components/features/public_timeline/index.jsx @@ -32,11 +32,13 @@ const PublicTimeline = React.createClass({ this.subscription = App.cable.subscriptions.create('PublicChannel', { received (data) { - switch(data.type) { + switch(data.event) { case 'update': - return dispatch(updateTimeline('public', JSON.parse(data.message))); + dispatch(updateTimeline('public', JSON.parse(data.payload))); + break; case 'delete': - return dispatch(deleteFromTimelines(data.id)); + dispatch(deleteFromTimelines(data.payload)); + break; } } -- cgit