-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 notifications feature to provide a way notify the user #12638
Add notifications feature to provide a way notify the user #12638
Conversation
Just a quick thought here. A notification is generally something that will display on the UI. Here, sending an email after an event has been triggered is something that can be done with Workflows. Need to review and see what is the difference in this PR. Please when you get time add an issue with an explanation of what it is going to add or fix in OC. |
@Skrypt yes I will add an issue at some point. I’ll also demo this at some point. But to address your concerns, a notification to me can come from anything (like Email, Web, Push, SMS...). An email is just a method of notification. I am planning to also add Web notification as an implementation of the notification infrastructure. Currently, I added workflow activities that allow you to sent the user notifications based on their preferences. The key difference here is that a user can opt-out of notification or opt-in a specific notification. For example, Gitter allows you to get web and/or email notifications. Similar concept here a notification can be sent yo a user based on their preferences. Here is an example from the UI how a user can set which method of notification to receive. The “Push Notification” you see below is an implementation I have in one of my app. The Push notification won't be part of this PR, but will be easy add for anyone that want it "based on their provider" The notification is really driven from workflows, but can easily be triggered from code |
…bility to a mark notification as read
@Skrypt |
Before I look into the code, I suggest to have this module with a web notifications integrated with the UI as GitHub already have, we might add email notification as workflow if we do so If this done, I need to close an issue that I filed long time ago in Orchard Core Contrib, to do the same exact thing |
@hishamco the web implementation already has a simple UI to list all notifications. Still it can use some more enhancements "maybe for later time". Here is some nice to have functions that were not yet added
I am not sure I want to add the above 3 steps in v1 but we'll think about it. Also, email notifications is already implemented :) I am planning to demo this on Tuesday so if you want to see it in action, feel free to join the meeting or watch the recording. |
Waiting for your demo |
…ification button. Filters are added but not working.
cc/ @Piedone here is the PR for notifications |
Thanks! |
…ication is the only implementation. Content Item was added to notification but the UI isn't aware of that URL yet.
@ns8482e as you requested the notifications does not depend on user. It now depends on object. Let me know your thought about the code here please |
@MikeAlhayek Lot of files, need some time to digest ;) |
@ns8482e yes lots of things in this. It's best to fork it and try it out locally |
@sebastienros made some final feedback you had around notification. Maybe it's time to merge it to get more feedback from users? |
@MikeAlhayek How can I use this module in a 1.5 OC project? |
@ricocsharp try to use the nightly builds from Cloudsmith feed |
Since this is going to be in 1.6, and you are using 1.5, you can try installing the latest preview into your web project and see if it'll be discoverable by the app. |
Fix #12651
Notifications (
OrchardCore.Notifications
)The
Notifications
module provides the infrastructure necessary to send notification to the app users. Happy module number 200! 🥳 🔥Notification Methods
There are many methods to send notifications to a user (e.x., Web, Email, Push, SMS, etc.). In addition to web notification, OrchardCore is shipped with Email based notifications. To allow users to receive Email notification, enable the
Email Notifications
feature. Note, you must also configure the SMTP Settings. When multiple notification methods are enabled, the user can opt-in or opt-out any method he/she wish to receive by editing their profile.Adding Custom Notification Provider
To add a new notification method like
Push
orSMS
, you can simple implement theINotificationMethodProvider
interface and then register it as we do inOrchardCore.Notifications.Email
featureHow to send a notification
You can send notification to a user via code by injecting
INotificationManager
then calling theSendAsync(...)
method. Alternatively, you can use workflows to notify a user about an event that took place.Workflow Activities
When
OrchardCore.Workflows
feature is enabled, you'll see new activites that would allow you to notify users using workflows. Here are some of the available workflow activitiesRemaining items
Ideas for future releases
SentAsync(NotificationContext context)
handler to notify the client.