Method PromoteAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
PromoteAsync(ContactId, CancellationToken)
Takes on a contact this deployment collected, so it becomes one the user asserted.
public Task<ContactWriteResult> PromoteAsync(ContactId contactId, CancellationToken cancellationToken)
Parameters
contactIdContactIdThe contact to promote.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<ContactWriteResult>
The promoted record, or the refusal naming what stopped it.
Remarks
The act that turns a record nobody wrote down into one somebody did, and the only crossing between the origins. It is what unlocks amending a contact a mailbox collected: an amendment reaches the caller's own book alone, so a caller promotes the collected record — which writes their own copy of it and leaves the mailbox's for whoever else is assigned that account — and then amends that copy like any other. It acts under MailFathom.Application.Contacts.ContactBookWriter.CallerWriter for the same reason every other write here does — a caller granted this permission is writing for the user — which is also what keeps collection from performing it on its own output.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold the writing grant.