Class EmailThreadOrder
- Namespace
- MailFathom.Application.Emails.Threads
- Assembly
- MailFathom.Application.dll
Produces the one order a conversation has, from the messages a caller is allowed to see.
public static class EmailThreadOrder
- Inheritance
-
EmailThreadOrder
- Inherited Members
Remarks
A set of messages is not a thread. The order is half of what a thread is, and it is what every reader of one asks for first: which message opened the conversation, which one answers which, and what the last word was.
Three things decide it, in this order and for these reasons. The reply relation decides wherever it is known, because
it is the only statement about sequence that a sender did not make about themselves. The sent timestamp settles what
the relation leaves open — messages answering the same parent — and nothing more, because a Date header is
written by a clock this deployment does not control and a misconfigured machine sets it years out. The local identity
settles the rest, which is what makes the order total, so two reads of one unchanged conversation never disagree.
It is produced on every read rather than stored. Storing a position would mean rewriting every message of a conversation each time one arrived, and the answer is derivable from three values the rows already carry.
Methods
- Of(IReadOnlyList<ThreadedEmailSummary>)
Orders the messages a caller is shown, and places each one against the message it answers.