mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 17:12:45 +08:00
DEV: fixes deprecation warning in SendMessageNotifications (#20318)
We were calling the job with a symbol as one of the values: ```ruby Jobs.enqueue( :send_message_notifications, chat_message_id: 1, timestamp: Time.now.iso8601(6), reason: :new, ) ``` Which is a bad pattern as when the job serialisation will happen, `:new` will become `"new"` and you have to deal with a string in your job and not a symbol, which can be confusing and lead to bugs.
This commit is contained in:
parent
723a7e316b
commit
79c94afdc5
|
@ -41,7 +41,7 @@ class Chat::ChatNotifier
|
|||
:send_message_notifications,
|
||||
chat_message_id: chat_message.id,
|
||||
timestamp: timestamp.iso8601(6),
|
||||
reason: :edit,
|
||||
reason: "edit",
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -50,7 +50,7 @@ class Chat::ChatNotifier
|
|||
:send_message_notifications,
|
||||
chat_message_id: chat_message.id,
|
||||
timestamp: timestamp.iso8601(6),
|
||||
reason: :new,
|
||||
reason: "new",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user