You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
283 B

8 years ago
  1. # frozen_string_literal: true
  2. class PublicChannel < ApplicationCable::Channel
  3. def subscribed
  4. stream_from 'timeline:public', lambda { |encoded_message|
  5. status, message = hydrate_status(encoded_message)
  6. next if filter?(status)
  7. transmit message
  8. }
  9. end
  10. end