ravenx v2.0.0 Ravenx.Notification View Source

Base module for notifications implemented using Ravenx strategies.

Link to this section Summary

Functions

Macro to inject notification features in application’s modules

Function used to send a using a configuration tuple like the ones that get_notifications_config should return

Link to this section Functions

Macro to inject notification features in application’s modules.

Link to this function dispatch_notification(notification, dispatch_type) View Source

Function used to send a using a configuration tuple like the ones that get_notifications_config should return.

The tuple should have this objects:

  1. Strategy atom: defining which strategy to use
  2. Payload map: including the payload data of the notification.
  3. Options map (optional): the special configuration of the notification

It will respond with a tuple, with an atom that could be :ok or :error and the result of the operation, as an standard notification dispatch returns.