-
-
Notifications
You must be signed in to change notification settings - Fork 38
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 sendNotificationMessage hook #72
Add sendNotificationMessage hook #72
Conversation
Another advantage is that the tokens could get enriched using the hook. So when creating the notification I only have to pass the |
I'm fine with adding it now. |
6170792
to
0bcea88
Compare
Would be great if it will be part of release 1.3.0. Be aware that I've already rebased the branch with the changes in release/1.3.0. as I needed the fixes made there to get it installable. If you want to merge this PR onto another branch, feel free to inform me. I can reopen it. |
## Hooks | ||
|
||
If you want to enrich each message being send by some meta data or want to disable some messages being sent, you can |
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.
each message being sent
Looks good to me, one little spelling mistake but then I'll merge :) |
Typo got fixed. |
Thanks for the hint, unfortunately one does not get any notification when a new commit is pushed to a PR :) |
Add sendNotificationMessage hook
I know. That's why I also add the comment. |
This pull request provides a hook before sending a message.
I'm using the notification center in an application which sends a notification when something happens. This notification creates different messages for different persons. For example a
productWasOrdered
notifcation would send different messages to the product owner, the user who ordered the product and the system administrator.The product owner has the option to disable such email notifications in his profile. To respect his user settings the hook is required.
Alternatively I would have to create different notifications for each receiver and handle the settings when creating the notification. But this would limit the flexibility which the notification center claims to provide.