mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-24 13:35:07 +01:00
Fix wrong pubsub channel on public timelines
This commit is contained in:
parent
a9c0062e80
commit
51d7caaf19
@ -58,15 +58,15 @@ class FanOutOnWriteService < BaseService
|
|||||||
Rails.logger.debug "Delivering status #{status.id} to hashtags"
|
Rails.logger.debug "Delivering status #{status.id} to hashtags"
|
||||||
|
|
||||||
status.tags.pluck(:name).each do |hashtag|
|
status.tags.pluck(:name).each do |hashtag|
|
||||||
Redis.current.publish("hashtag:#{hashtag}", @payload)
|
Redis.current.publish("timeline:hashtag:#{hashtag}", @payload)
|
||||||
Redis.current.publish("hashtag:#{hashtag}:local", @payload) if status.local?
|
Redis.current.publish("timeline:hashtag:#{hashtag}:local", @payload) if status.local?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def deliver_to_public(status)
|
def deliver_to_public(status)
|
||||||
Rails.logger.debug "Delivering status #{status.id} to public timeline"
|
Rails.logger.debug "Delivering status #{status.id} to public timeline"
|
||||||
|
|
||||||
Redis.current.publish('public', @payload)
|
Redis.current.publish('timeline:public', @payload)
|
||||||
Redis.current.publish('public:local', @payload) if status.local?
|
Redis.current.publish('timeline:public:local', @payload) if status.local?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -70,14 +70,14 @@ class RemoveStatusService < BaseService
|
|||||||
|
|
||||||
def remove_from_hashtags(status)
|
def remove_from_hashtags(status)
|
||||||
status.tags.pluck(:name) do |hashtag|
|
status.tags.pluck(:name) do |hashtag|
|
||||||
Redis.current.publish("hashtag:#{hashtag}", @payload)
|
Redis.current.publish("timeline:hashtag:#{hashtag}", @payload)
|
||||||
Redis.current.publish("hashtag:#{hashtag}:local", @payload) if status.local?
|
Redis.current.publish("timeline:hashtag:#{hashtag}:local", @payload) if status.local?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_from_public(status)
|
def remove_from_public(status)
|
||||||
Redis.current.publish('public', @payload)
|
Redis.current.publish('timeline:public', @payload)
|
||||||
Redis.current.publish('public:local', @payload) if status.local?
|
Redis.current.publish('timeline:public:local', @payload) if status.local?
|
||||||
end
|
end
|
||||||
|
|
||||||
def redis
|
def redis
|
||||||
|
Loading…
Reference in New Issue
Block a user