Skip to content

Make WebPushMessage output customisable #20285

@caalador

Description

@caalador

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Status

Done / Pending Release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions