Fix language of push notifications (#32415)
This commit is contained in:
parent
bb0cf04d71
commit
10ea6da09f
@ -55,12 +55,8 @@ class Web::PushNotificationWorker
|
|||||||
end
|
end
|
||||||
|
|
||||||
def push_notification_json
|
def push_notification_json
|
||||||
Oj.dump(serialized_notification_in_subscription_locale.as_json)
|
|
||||||
end
|
|
||||||
|
|
||||||
def serialized_notification_in_subscription_locale
|
|
||||||
I18n.with_locale(@subscription.locale.presence || I18n.default_locale) do
|
I18n.with_locale(@subscription.locale.presence || I18n.default_locale) do
|
||||||
serialized_notification
|
Oj.dump(serialized_notification.as_json)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user