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:
Ted Johansson
2023-12-05 18:03:30 +08:00
committed by GitHub
parent de983796e1
commit c7667f791e
2 changed files with 7 additions and 7 deletions

View File

@ -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