Chime.Message (Chime v0.1.0-dev)

Copy Markdown View Source

A notification on its way to a person by a channel, as Chime.Channel.deliver/2 gets it:

  • :channel - the channel's name ("telegram");
  • :notifier - the notifier's module; :kind and :category;
  • :data - the notifier's data of the latest event (Chime.Notifier.data/1);
  • :recipient - the Chime.Recipient, as the resolver gives them now;
  • :notification - the Chime.Notification, with its count and actors;
  • :required - whether it goes whatever the preferences (the channel then leaves out any way to unsubscribe).

Summary

Functions

What the notifier says by the message's channel: the function of the notifier named after the channel, (data, recipient, notification), when it has one (telegram/3 for "telegram"), else what the feed shows (Chime.Notifier.feed/2).

Types

t()

@type t() :: %Chime.Message{
  category: String.t(),
  channel: String.t(),
  data: map(),
  kind: String.t(),
  notification: Chime.Notification.t(),
  notifier: module(),
  recipient: Chime.Recipient.t(),
  required: boolean()
}

Functions

render(message)

@spec render(t()) :: term()

What the notifier says by the message's channel: the function of the notifier named after the channel, (data, recipient, notification), when it has one (telegram/3 for "telegram"), else what the feed shows (Chime.Notifier.feed/2).