Method AskAsync
- Namespace
- MailFathom.Application.Agent.Conversations
- Assembly
- MailFathom.Application.dll
AskAsync(AgentConversationId, UserId, AgentMessageId, PresentationText, AgentMessageScope?, CancellationToken)
Asks a question, opening the answer to it and starting the conversation where it is new.
public Task<AgentMessagePosting> AskAsync(AgentConversationId conversation, UserId user, AgentMessageId message, PresentationText text, AgentMessageScope? scope, CancellationToken cancellationToken)
Parameters
conversationAgentConversationIdThe conversation, which the client named.
userUserIdThe person asking.
messageAgentMessageIdThe question's identifier, which the client generated so a retried post writes nothing twice.
textPresentationTextWhat the person asked.
scopeAgentMessageScopeWhat the question was asked about, or null for a question narrowing nothing further.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<AgentMessagePosting>
What became of the question, and the answer — the run — it opened.
Remarks
It returns once the question is written and never waits for the answer: the composition writes into the answer this opens, and a client follows it by reading the conversation from the place this returns.