View Source Glific.Notifications (Glific v5.1.6)
The notifications manager and API to interface with the notification sub-system
Link to this section Summary
Functions
Return the count of notifications, using the same filter as list_notifications
Create a Notification
Returns the list of notifications. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the notifications itself.
Mark all the unread messages as read.
We will pick the types from here to keep the consistency
Update a Notification
Link to this section Functions
Return the count of notifications, using the same filter as list_notifications
@spec create_notification(map()) :: {:ok, Glific.Notifications.Notification.t()} | {:error, Ecto.Changeset.t()}
Create a Notification
Returns the list of notifications. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the notifications itself.
@spec mark_notification_as_read() :: boolean()
Mark all the unread messages as read.
We will pick the types from here to keep the consistency
@spec update_notification(Glific.Notifications.Notification.t(), map()) :: {:ok, Glific.Notifications.Notification.t()} | {:error, Ecto.Changeset.t()}
Update a Notification