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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user