Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WebPushMessage output customisable #20285

Closed
caalador opened this issue Oct 21, 2024 · 1 comment · Fixed by #20304
Closed

Make WebPushMessage output customisable #20285

caalador opened this issue Oct 21, 2024 · 1 comment · Fixed by #20304

Comments

@caalador
Copy link
Contributor

Describe your motivation

Make the content of WebPushMessage more customizable to enable giving options outside of only title and body.

{
  "//": "Visual Options",
  "body": "<String>",
  "icon": "<URL String>",
  "image": "<URL String>",
  "badge": "<URL String>",
  "dir": "<String of 'auto' | 'ltr' | 'rtl'>",
  "timestamp": "<Long>"

  "//": "Both visual & behavioral options",
  "actions": "<Array of Strings>",
  "data": "<Anything>",

  "//": "Behavioral Options",
  "tag": "<String>",
  "requireInteraction": "<boolean>",
  "renotify": "<Boolean>",
  "vibrate": "<Array of Integers>",
  "sound": "<URL String>",
  "silent": "<Boolean>",
}

Describe the solution you'd like

Add a customParameters field to the record that is used for the resulting json.

Describe alternatives you've considered

Make WebPushMessage a class so it can be extended.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.alpha4 and is also targeting the upcoming stable 24.6.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants