From 13764b31ec42212d7a0edda0878f87fd823f13fe Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 5 Mar 2018 16:47:51 +0800 Subject: [PATCH] Remove unnecessary attribute in topic tracking payload. --- app/models/topic_tracking_state.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/models/topic_tracking_state.rb b/app/models/topic_tracking_state.rb index 2c55d756723..67cad80d857 100644 --- a/app/models/topic_tracking_state.rb +++ b/app/models/topic_tracking_state.rb @@ -51,7 +51,6 @@ class TopicTrackingState message_type: LATEST_MESSAGE_TYPE, payload: { bumped_at: topic.bumped_at, - topic_id: topic.id, category_id: topic.category_id, archetype: topic.archetype } @@ -94,7 +93,6 @@ class TopicTrackingState last_read_post_number: tu.last_read_post_number, highest_post_number: post.post_number, created_at: post.created_at, - topic_id: post.topic_id, category_id: post.topic.category_id, notification_level: tu.notification_level, archetype: post.topic.archetype @@ -111,10 +109,7 @@ class TopicTrackingState message = { topic_id: topic.id, - message_type: "recover", - payload: { - topic_id: topic.id, - } + message_type: "recover" } MessageBus.publish("/recover", message.as_json, group_ids: group_ids) @@ -126,10 +121,7 @@ class TopicTrackingState message = { topic_id: topic.id, - message_type: "delete", - payload: { - topic_id: topic.id, - } + message_type: "delete" } MessageBus.publish("/delete", message.as_json, group_ids: group_ids)