Skip to content

Commit

Permalink
Fix language of push notifications (mastodon#32415)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Oct 11, 2024
1 parent bb0cf04 commit 10ea6da
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/workers/web/push_notification_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,8 @@ def web_push_request
end

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
serialized_notification
Oj.dump(serialized_notification.as_json)
end
end

Expand Down

0 comments on commit 10ea6da

Please sign in to comment.