pub struct DeliveryNotification {
pub account: ParticipantId,
pub to: Address,
pub message_id: MessageId,
pub from: Address,
}Expand description
The body a registered delivery listener receives at its own URL when
mail arrives for the account that registered it, or for any of that
account’s sessions. Carries only ids, never subject or body.
A notification is a doorbell, not a copy of the letter: it crosses a
boundary to a URL this mailbox does not control, chosen by whoever
registered it (POST /admin/listener, operator-only). The recipient can
already fetch the message itself, with its own credential, through the
ordinary mail surface once it knows message_id – carrying subject
or body here would hand the message’s actual content to a process
this mailbox has no way to vouch for, for no reason: nothing about
acting on “mail arrived” needs the mail’s content, only the fact that
it arrived and where to go fetch it.
Fields§
§account: ParticipantIdThe account whose listener this is – the one POST /admin/listener
named, not necessarily the account to addresses (a room message
notifies every member’s own listener with the same to).
to: AddressThe address the mail was actually sent to – a direct account, one
specific session, or a room; never simplified down to just
account, so the listener can tell a room message from a message
aimed at one exact session.
message_id: MessageId§from: Address