logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 51d7caaf1994ee3cb531b64841e12d129dded298
parent: a9c0062e80f2d29ece1830967a0ccbefc4698e1b
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Thu,  6 Apr 2017 04:03:23 +0200

Fix wrong pubsub channel on public timelines

Diffstat:

Mapp/services/fan_out_on_write_service.rb8++++----
Mapp/services/remove_status_service.rb8++++----
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb @@ -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 diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb @@ -70,14 +70,14 @@ class RemoveStatusService < BaseService def remove_from_hashtags(status) status.tags.pluck(:name) 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 remove_from_public(status) - 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 def redis