mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Fix chat notifier deprecation warnings from job arguments (#24708)
We're seeing some deprecation warnings in production. This is because we're passing a raw Ruby timestamp, which gets stringified implicitly when written to Redis. As per #15842, this conversion needs to be done explicitly.
This commit is contained in:
@ -358,7 +358,7 @@ module Chat
|
||||
chat_message_id: @chat_message.id,
|
||||
to_notify_ids_map: to_notify.as_json,
|
||||
already_notified_user_ids: already_notified_user_ids,
|
||||
timestamp: @timestamp,
|
||||
timestamp: @timestamp.to_s,
|
||||
},
|
||||
)
|
||||
end
|
||||
@ -366,7 +366,7 @@ module Chat
|
||||
def notify_watching_users(except: [])
|
||||
Jobs.enqueue(
|
||||
Jobs::Chat::NotifyWatching,
|
||||
{ chat_message_id: @chat_message.id, except_user_ids: except, timestamp: @timestamp },
|
||||
{ chat_message_id: @chat_message.id, except_user_ids: except, timestamp: @timestamp.to_s },
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user