Message
Purpose
The message as its author made it — identity, author, ancestry, and the writing — the whole of what
travels sealed inside an EncryptedMessage. A Message exists only on a member's device: composed on
the sender's side before sealing, recovered on a reader's side after unsealing; nothing of it — not
even who wrote it — appears outside the seal. The message id is the message's own identity, minted
once, owned by no platform; a correction is a later sealing carrying the same identity. The parents
are the ids of the messages the author's device had seen when this message was made — the message's
place in the conversation is carried inside the message itself, so no store anywhere is asked to keep
order, and a per-recipient copy carries the same ancestry however its bytes were sealed.
Attributes
- message id: the message's identity, a
MessageIdsuch as "m-8001" — minted once, never re-minted - author: the
Memberwho wrote it - author signature: is
Textthat carries the author's signature over the message, opaque; its verification belongs to the deferred trust layers - parents: the
MessageIdsof the messages this one follows; empty for a conversation's opening message - writing: the
Writingthe author wrote
Invariants
- A message names itself with a message id.
Scenarios
An opening message follows nothing
Given: the MessageId "m-8001", the Member anne.bruun, an author signature, no parents, and a Writing of "The hearing moved to Thursday."
When: a Message is created
Then: it is accepted with no parents — the conversation opens here
A message names what it follows
Given: the MessageId "m-8002", the Member sofie.lind, an author signature, a parent MessageId "m-8001", and a Writing of "I'll bring the file."
When: a Message is created
Then: it is accepted and reads back following "m-8001"
A correction carries the identity it corrects
Given: the MessageId "m-8001", the Member anne.bruun, an author signature, a parent MessageId "m-8002", and a Writing of "The hearing moved to Friday."
When: a Message is created
Then: it is accepted carrying id "m-8001" again — the same identity, a new writing, not a new message