From abb8f5837ee1fa72d13d255cf29f4ade35f53ece Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 23 Oct 2016 11:56:04 +0200 Subject: Fix public channel --- app/channels/public_channel.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/channels') diff --git a/app/channels/public_channel.rb b/app/channels/public_channel.rb index 578cdc001..708eff055 100644 --- a/app/channels/public_channel.rb +++ b/app/channels/public_channel.rb @@ -1,7 +1,7 @@ # Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading. class PublicChannel < ApplicationCable::Channel def subscribed - stream_from 'timeline:public', lambda do |encoded_message| + stream_from 'timeline:public', lambda { |encoded_message| message = ActiveSupport::JSON.decode(encoded_message) status = Status.find_by(id: message['id']) @@ -10,7 +10,7 @@ class PublicChannel < ApplicationCable::Channel message['message'] = FeedManager.instance.inline_render(current_user.account, status) transmit message - end + } end def unsubscribed -- cgit