Interface IMailOwnership
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
Answers whose mail a unit of background work is acting on, from what that work already holds.
public interface IMailOwnership
Remarks
A caller-facing request carries its user on the principal, and RequireUser() is what reads it. A worker carries none: it runs under this process's own identity, which acts for nobody, so a synchronization run, an embedding pass, and a backfill each know a message and never an account. This port is how those reach one, and it exists so that a bound stated per user is applied to the users the work is genuinely for rather than to whoever a request happened to admit.
It answers with the account rather than with a user, because no stored message names one: mail belongs to the mailbox, and who that mailbox serves is the assignment relation read separately and at the moment the work runs. A ceiling stated per user is therefore applied across the account's assigned users rather than to the one a row happened to carry, which is what ADR 0014 requires of a mailbox two people share.
Methods
- ReadStoredEmailAccountAsync(StoredEmailId, CancellationToken)
Reads the account one locally stored email belongs to.