gearheads
/
mastodon
Archived
2
0
Fork 0

Remove queued_at value from pubsub payloads (#26173)

gh/dev
Emelia Smith 2023-07-27 16:19:33 +02:00 committed by GitHub
parent 12a6cf569e
commit 317cd26fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class PushConversationWorker
message = InlineRenderer.render(conversation, conversation.account, :conversation) message = InlineRenderer.render(conversation, conversation.account, :conversation)
timeline_id = "timeline:direct:#{conversation.account_id}" 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 rescue ActiveRecord::RecordNotFound
true true
end end

View File

@ -9,7 +9,7 @@ class PushEncryptedMessageWorker
message = InlineRenderer.render(encrypted_message, nil, :encrypted_message) message = InlineRenderer.render(encrypted_message, nil, :encrypted_message)
timeline_id = "timeline:#{encrypted_message.device.account_id}:#{encrypted_message.device.device_id}" 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 rescue ActiveRecord::RecordNotFound
true true
end end

View File

@ -25,8 +25,7 @@ class PushUpdateWorker
def message def message
Oj.dump( Oj.dump(
event: update? ? :'status.update' : :update, event: update? ? :'status.update' : :update,
payload: @payload, payload: @payload
queued_at: (Time.now.to_f * 1000.0).to_i
) )
end end