in libraries/Streaming/StreamingConversations.cs [119:145]
public async Task<Conversation> ReconnectToConversationAsync(string conversationId, string watermark = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (SocketClient == null)
{
throw new InvalidOperationException("Connection is not opened.");
}
var response = await SocketClient.SendAsync(new StreamingRequest()
{
Verb = "GET",
Path = $"/v3/directline/conversations/{conversationId}"
}).ConfigureAwait(false);
if (response.StatusCode != 200)
{
var body = response.ReadBodyAsStringAsync().ConfigureAwait(false);
var ex = new OperationException(
$"Operation returned an invalid status code '{response.StatusCode}'",
response.StatusCode,
body);
throw ex;
}
var conversation = await response.ReadBodyAsJsonAsync<Conversation>().ConfigureAwait(false);
return conversation;
}