Closed brent-hoover closed 2 years ago
I think this is a good start.
I believe that you should also be able to trigger an In-App Notification for any user with arbitrary content from the server.
Perhaps this should be integrated with our Alerts and Email notifications work. I can see a system where the three levels of notification could all be triggered by a single call.
E.g. Reaction.Notify("Message", "success", {Alert: toast, email: true, inApp: true, users: [arrayOfUserIds]})
Or something along those lines.
Additionally I wrote a long blog post about this (how it should work and some of how it does work that might be helpful for whoever ends up implementing.
https://blog.reactioncommerce.com/reaction-architecture-alerts-notifications-and-emails/
@spencern Yes, agreed that it makes sense to fold Email into this as just another type of notification
We've had suggestion that Browser notifications be considered as part of our notification framework as well.
Another issue that may not be directly resolvable by this issue is that order notifications are currently hardcoded to use the ShopId associated with the order. Order notifications (and probably other types of notifications as well) need to be flexible enough to notify users of Shops with order items rather than just the shopId associated with the order.
Closing due to restructuring of priorities. Will revisit if there is customer demand.
Opening this because @spencern has mentioned several times that we need to do this and he's very right so I wanted to get this spec'd out so it could be worked on when appropriate.
The current notification system does a good job sending Order notifications, but needs to be refactored to be more general and allow configuring a notification for almost any system event, plus allow which events get SMS and in-app notifications. The current events are essentially hard-coded.
My initial proposal for how this should work would be:
Sort of a "sub-task" of reactioncommerce/reaction#429 ( as was the original notifications system I suppose)