about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-04-06 04:03:23 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-04-06 04:03:23 +0200
commit51d7caaf1994ee3cb531b64841e12d129dded298 (patch)
treea91ba72bbefd54e8454b5a193cb0597607aefb5a
parenta9c0062e80f2d29ece1830967a0ccbefc4698e1b (diff)
Fix wrong pubsub channel on public timelines
-rw-r--r--app/services/fan_out_on_write_service.rb8
-rw-r--r--app/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
index a25c20c93..19eedc0a7 100644
--- 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
index 60ce9987c..50bb7fc97 100644
--- 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