Table of Contents

Method StopAsync

Namespace
MailFathom.Application.Agent.Conversations
Assembly
MailFathom.Application.dll

StopAsync(AgentConversationId, UserId, AgentMessageId, AgentMessageWritten, DateTimeOffset, CancellationToken)

Ends the answer being composed as stopped and writes the agent's note saying so, together or not at all.

Task<long?> StopAsync(AgentConversationId id, UserId user, AgentMessageId answer, AgentMessageWritten note, DateTimeOffset now, CancellationToken cancellationToken)

Parameters

id AgentConversationId

The conversation holding the answer.

user UserId

The person stopping it, whose conversation it has to be.

answer AgentMessageId

The answer to stop, which has to be the one being composed.

note AgentMessageWritten

The agent's note that follows the ending.

now DateTimeOffset

The instant of the stop, in UTC.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<long?>

The place the note was written at, or null when the answer is not the one being composed or the conversation is not this person's.

Remarks

A conversation's last two places are kept for exactly this pair, so a stop reaching a conversation that filled while its answer was running writes both rather than an ending with no word from the agent after it.

Exceptions

ArgumentNullException

Thrown when note is null.

ArgumentException

Thrown when note is not the agent's own.