about summary refs log tree commit diff
path: root/app/channels/public_channel.rb
blob: 41e21611d7b4652856c4976c33ab204c64cf1205 (plain) (blame)
1
2
3
4
5
6
7
8
9
class PublicChannel < ApplicationCable::Channel
  def subscribed
    stream_from 'timeline:public', lambda { |encoded_message|
      status, message = hydrate_status(encoded_message)
      next if filter?(status)
      transmit message
    }
  end
end