This repository has been archived on 2023-07-01. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/channels/hashtag_channel.rb

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