public string GetConversationDetails(string interactionId) { var resultat = ""; try { var conversation = conversationsApi.GetConversation(interactionId); foreach (var result in conversation.Participants) { AddLog("conv: " + result.Attributes.Count); foreach (var attr in result.Attributes) { AddLog("attr: " + attr.Key + "=" + attr.Value); } resultat = result.Attributes.ToString(); } } catch (Exception ex) { AddLog($"Error in GetUserId: {ex.Message}"); MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(resultat); }
private Conversation GetSingleConversation(string conversationId) { Conversation conversation = null; try { AddLog($"Getting a single conversation: {conversationId}", true); conversation = conversationsApi.GetConversation(conversationId); AddLog($"Conversation: {conversation.ToString()}", true); } catch (Exception ex) { AddLog($"Error while getting conversation {conversationId}: {ex.Message}"); AddLog($"Detailled error: {ex}", true); } return(conversation); }