From 317cd26fbabc922494b1d581c11d93760e507456 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Thu, 27 Jul 2023 16:19:33 +0200 Subject: [PATCH] Remove queued_at value from pubsub payloads (#26173) --- app/workers/push_conversation_worker.rb | 2 +- app/workers/push_encrypted_message_worker.rb | 2 +- app/workers/push_update_worker.rb | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/workers/push_conversation_worker.rb b/app/workers/push_conversation_worker.rb index aa858f7153..23b1469f11 100644 --- a/app/workers/push_conversation_worker.rb +++ b/app/workers/push_conversation_worker.rb @@ -9,7 +9,7 @@ class PushConversationWorker message = InlineRenderer.render(conversation, conversation.account, :conversation) timeline_id = "timeline:direct:#{conversation.account_id}" - redis.publish(timeline_id, Oj.dump(event: :conversation, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i)) + redis.publish(timeline_id, Oj.dump(event: :conversation, payload: message)) rescue ActiveRecord::RecordNotFound true end diff --git a/app/workers/push_encrypted_message_worker.rb b/app/workers/push_encrypted_message_worker.rb index 031230172d..6bee12675b 100644 --- a/app/workers/push_encrypted_message_worker.rb +++ b/app/workers/push_encrypted_message_worker.rb @@ -9,7 +9,7 @@ class PushEncryptedMessageWorker message = InlineRenderer.render(encrypted_message, nil, :encrypted_message) timeline_id = "timeline:#{encrypted_message.device.account_id}:#{encrypted_message.device.device_id}" - redis.publish(timeline_id, Oj.dump(event: :encrypted_message, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i)) + redis.publish(timeline_id, Oj.dump(event: :encrypted_message, payload: message)) rescue ActiveRecord::RecordNotFound true end diff --git a/app/workers/push_update_worker.rb b/app/workers/push_update_worker.rb index 72c7817495..c32975a986 100644 --- a/app/workers/push_update_worker.rb +++ b/app/workers/push_update_worker.rb @@ -25,8 +25,7 @@ class PushUpdateWorker def message Oj.dump( event: update? ? :'status.update' : :update, - payload: @payload, - queued_at: (Time.now.to_f * 1000.0).to_i + payload: @payload ) end