FIX: Use user's locale for chat push notifications (#26107)
This commit is contained in:
parent
1fcd6fee29
commit
3f1566eeb1
|
@ -66,11 +66,14 @@ module Jobs
|
||||||
translation_args,
|
translation_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
translated_title =
|
||||||
|
I18n.with_locale(user.effective_locale) { I18n.t(translation_key, translation_args) }
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
username: @creator.username,
|
username: @creator.username,
|
||||||
notification_type: ::Notification.types[:chat_message],
|
notification_type: ::Notification.types[:chat_message],
|
||||||
post_url: @chat_message.url,
|
post_url: @chat_message.url,
|
||||||
translated_title: ::I18n.t(translation_key, translation_args),
|
translated_title: translated_title,
|
||||||
tag: ::Chat::Notifier.push_notification_tag(:message, @chat_channel.id),
|
tag: ::Chat::Notifier.push_notification_tag(:message, @chat_channel.id),
|
||||||
excerpt: @chat_message.push_notification_excerpt,
|
excerpt: @chat_message.push_notification_excerpt,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue