Closed odarriba closed 7 years ago
Maybe this could be a behaviour and the ausence_approved
a required callback of the behaviour (with a generic name). This way we could enforce a proper implementation from all custom modules implementing this behaviour.
On the other side we would need to implement each custom notification in a separated module, something like: MyApp.Notifications.AusenceApproved
. I don't really know if it is good or bad :sweat_smile:
Merged. Closing
Maybe, it would be good to create some kind of modules that allows the end user to define a kind of notification (for example, "An ausence request has been approved").
The idea behind this that, due to the heterogeneity of different strategies' options and payloads, it's difficult to send notifications in multiple ways for one subject.
I have thought in something like this:
What do you think about it? I think it will be helpful for projects in which multiple notifications sent to user using multiple strategies at once.