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
idAgentConversationIdThe conversation holding the answer.
userUserIdThe person stopping it, whose conversation it has to be.
answerAgentMessageIdThe answer to stop, which has to be the one being composed.
noteAgentMessageWrittenThe agent's note that follows the ending.
nowDateTimeOffsetThe instant of the stop, in UTC.
cancellationTokenCancellationTokenCancels 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
noteis null.- ArgumentException
Thrown when
noteis not the agent's own.