mirror of
https://github.com/mastodon/mastodon.git
synced 2024-10-19 17:21:24 +09:00
14 lines
325 B
Ruby
14 lines
325 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|