|
|
|
@ -58,15 +58,15 @@ class FanOutOnWriteService < BaseService
|
|
|
|
|
Rails.logger.debug "Delivering status #{status.id} to hashtags"
|
|
|
|
|
|
|
|
|
|
status.tags.pluck(:name).each do |hashtag|
|
|
|
|
|
Redis.current.publish("hashtag:#{hashtag}", @payload)
|
|
|
|
|
Redis.current.publish("hashtag:#{hashtag}:local", @payload) if status.local?
|
|
|
|
|
Redis.current.publish("timeline:hashtag:#{hashtag}", @payload)
|
|
|
|
|
Redis.current.publish("timeline:hashtag:#{hashtag}:local", @payload) if status.local?
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def deliver_to_public(status)
|
|
|
|
|
Rails.logger.debug "Delivering status #{status.id} to public timeline"
|
|
|
|
|
|
|
|
|
|
Redis.current.publish('public', @payload)
|
|
|
|
|
Redis.current.publish('public:local', @payload) if status.local?
|
|
|
|
|
Redis.current.publish('timeline:public', @payload)
|
|
|
|
|
Redis.current.publish('timeline:public:local', @payload) if status.local?
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|