This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
2016-11-15 10:56:29 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-05 10:20:05 -04:00
|
|
|
class HashtagChannel < ApplicationCable::Channel
|
|
|
|
def subscribed
|
|
|
|
tag = params[:tag].downcase
|
|
|
|
|
|
|
|
stream_from "timeline:hashtag:#{tag}", lambda { |encoded_message|
|
|
|
|
status, message = hydrate_status(encoded_message)
|
|
|
|
next if filter?(status)
|
|
|
|
transmit message
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|