Add base_url to native push notification payload

Include the server's base URL so native apps can identify which Fizzy
instance (SaaS or self-hosted) a notification originated from.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-02-25 13:57:25 +01:00
parent 6fb24118ea
commit 13268ef668
2 changed files with 13 additions and 0 deletions
@@ -31,6 +31,10 @@ class Notification::DefaultPayload
false
end
def base_url
Rails.application.routes.url_helpers.root_url(**url_options.except(:script_name)).chomp("/")
end
def avatar_url
Rails.application.routes.url_helpers.user_avatar_url(notification.creator, **url_options)
end