Method ReadStateAsync
- Namespace
- MailFathom.Application.Emails.ThreadStates
- Assembly
- MailFathom.Application.dll
ReadStateAsync(EmailThreadId, CancellationToken)
Reads where one of the acting user's conversations stands.
public Task<EmailThreadState?> ReadStateAsync(EmailThreadId threadId, CancellationToken cancellationToken)
Parameters
threadIdEmailThreadIdThe conversation, as a message row published it.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<EmailThreadState>
The state, holding only the leading statements of each aspect — see Leading() — or null where this deployment has none for that conversation.
Exceptions
- SensitiveContentScannerUnavailableException
Thrown when a switched-on scanner could not establish what the state carries, which refuses it rather than serving it unscanned.
- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted MailRead.