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:
Joffrey JAFFEUX 2023-02-15 22:13:24 +01:00 committed by GitHub
parent 723a7e316b
commit 79c94afdc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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