Skip to content

[Notify] Allow "body" and possibly other Notification Options #349

Open
@weaverryan

Description

@weaverryan

The Notify component currently does this in JavaScript:

new Notification(content);

But, Notification has a 2nd options argument - https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification#parameters - where various other options can be passed, mostly notably body.

At the very least, we could pass the content from a Notifier object to this. So, in php:

$notification = new Notification($message, ['chat/custom_mercure_chatter_transport']);
$notification->content('I will now show up as the body');
$notifier->send($notification);

The JavaScript Notification has many other options, e.g. actions and icon. I'm not sure how/if we can support/send these from Symfony's Notifier or not.

Any thoughts @mtarld?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions