-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for notification overrides #3
base: master
Are you sure you want to change the base?
Conversation
Host may wish to silence notifications, or hide the body of notifications for privacy.
Host app may want to know if notification was clicked, in order to activate it's main window/etc
// Apply overrides | ||
options = Object.assign({}, options); | ||
if (settings.forceSilent) options.silent = true; | ||
if (settings.bodyOverride) options.body = settings.bodyOverride; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's actually happening here. From the comment it seems that options
should override settings
, but the original values of settings
is what seems to be used? Is the returned settings
meant to be changed by whoever uses the library, and can be changed at runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the bodyOverride
: is it to override the notifications when notifications are handled natively? If so, maybe it could be nice to override the icon
as well? Hmm
I like the forceSilent
. Would there be a benefit to killing the notification all together when that happens, as compared to setting the silent
flag?
Looks very interesting! Could you help out with some documentation on the |
@JBLatenight ping |
@JBLatenight I'm using your code as an inspiraton for a new feature. It's on the branch notification-onclick-override. I still have questions about your code so I might not take it as-is. |
@seriema Any progress here? Is the branch ready? Thanks. |
@khaledabbas Sadly, no. You can read my thoughts on it on the feature request #4 as to why I'm a bit stuck atm. Any help is welcome. |
Host may wish to silence notifications, or hide the body of notifications for privacy.