A platform for community discussion. Free, open, simple.
DEV: Fix chat notifier deprecation warnings from job arguments (#24708)
Ted Johanssonc7667f791e71
diff --git a/plugins/chat/lib/chat/notifier.rb b/plugins/chat/lib/chat/notifier.rbindex 2728dc0c13e..45cfbcc1535 100644--- a/plugins/chat/lib/chat/notifier.rb+++ b/plugins/chat/lib/chat/notifier.rb@@ -358,7 +358,7 @@ module Chatchat_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 Chatdef 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 },)endenddiff --git a/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rb b/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rbindex 1810a843168..2d02fe176d4 100644--- a/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rb+++ b/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rb@@ -58,7 +58,7 @@ describe Jobs::Chat::NotifyMentioned do.track_publish("/chat/notification-alert/#{user.id}") dojob.execute(chat_message_id: message.id,- timestamp: message.created_at,+ timestamp: message.created_at.to_s,to_notify_ids_map: to_notify_ids_map,already_notified_user_ids: already_notified_user_ids,)@@ -69,7 +69,7 @@ describe Jobs::Chat::NotifyMentioned dodef track_core_notification(user: user_2, message:, to_notify_ids_map:)job.execute(chat_message_id: message.id,- timestamp: message.created_at,+ timestamp: message.created_at.to_s,to_notify_ids_map: to_notify_ids_map,)@@ -186,7 +186,7 @@ describe Jobs::Chat::NotifyMentioned dojob.execute(chat_message_id: message.id,- timestamp: message.created_at,+ timestamp: message.created_at.to_s,to_notify_ids_map: to_notify_ids_map,)end@@ -215,7 +215,7 @@ describe Jobs::Chat::NotifyMentioned dojob.execute(chat_message_id: message.id,- timestamp: message.created_at,+ timestamp: message.created_at.to_s,to_notify_ids_map: to_notify_ids_map,)end@@ -259,7 +259,7 @@ describe Jobs::Chat::NotifyMentioned dojob.execute(chat_message_id: message.id,- timestamp: message.created_at,+ timestamp: message.created_at.to_s,to_notify_ids_map: to_notify_ids_map,)end