public async Task GetTopicUpdatedMessageShouldSucceed() { //arrange var messageId = "2"; ChatThreadClient chatThreadClient = CreateMockChatThreadClient(200, GetTopicUpdatedMessageApiResponsePayload); //act ChatMessage message = await chatThreadClient.GetMessageAsync(messageId); //assert Assert.AreEqual(ChatMessageType.TopicUpdated, message.Type); Assert.AreEqual("2", message.Id); Assert.AreEqual("TopicUpdateTest", message.Content.Topic); Assert.AreEqual("2", message.Version); Assert.NotNull(message.Content.Initiator); Assert.AreEqual("8:acs:1b5cc06b-f352-4571-b1e6-d9b259b7c776_00000007-8f5e-776d-ea7c-5a3a0d0027b7", CommunicationIdentifierSerializer.Serialize(message.Content.Initiator !).RawId); }
public async Task GetTextMessageShouldSucceed() { //arrange var messageId = "1"; ChatThreadClient chatThreadClient = CreateMockChatThreadClient(200, GetTextMessageApiResponsePayload); //act ChatMessage message = await chatThreadClient.GetMessageAsync(messageId); //assert Assert.AreEqual(ChatMessageType.Text, message.Type); Assert.AreEqual("1", message.Id); Assert.AreEqual("Test Message", message.Content.Message); Assert.AreEqual("DisplayName for Test Message", message.SenderDisplayName); Assert.NotNull(message.Sender); Assert.AreEqual("8:acs:1b5cc06b-f352-4571-b1e6-d9b259b7c776_00000007-8f5e-776d-ea7c-5a3a0d0027b7", CommunicationIdentifierSerializer.Serialize(message.Sender !).CommunicationUser.Id); }
public async Task GetParticipantRemovedMessageShouldSucceed() { //arrange var messageId = "4"; ChatThreadClient chatThreadClient = CreateMockChatThreadClient(200, GetParticipantRemovedMessageApiResponsePayload); //act ChatMessage message = await chatThreadClient.GetMessageAsync(messageId); //assert Assert.AreEqual(ChatMessageType.ParticipantRemoved, message.Type); Assert.AreEqual("4", message.Id); Assert.AreEqual("4", message.Version); Assert.AreEqual(1, message.Content.Participants.Count); Assert.NotNull(message.Content.Initiator); Assert.NotNull(message.Content.Participants[0].User); Assert.AreEqual("8:acs:1b5cc06b-f352-4571-b1e6-d9b259b7c776_00000007-8f5e-776d-ea7c-5a3a0d0027b7", CommunicationIdentifierSerializer.Serialize(message.Content.Initiator !).RawId); Assert.AreEqual("8:acs:1b5cc06b-f352-4571-b1e6-d9b259b7c776_00000007-0464-274b-b274-5a3a0d0002c9", CommunicationIdentifierSerializer.Serialize(message.Content.Participants[0].User !).RawId); }
public async Task SendGetUpdateDeleteMessagesSendNotificationReadReceiptsAsync() { CommunicationIdentityClient communicationIdentityClient = new CommunicationIdentityClient(TestEnvironment.ConnectionString); Response <CommunicationUserIdentifier> threadMember = await communicationIdentityClient.CreateUserAsync(); CommunicationUserToken communicationUserToken = await communicationIdentityClient.IssueTokenAsync(threadMember.Value, new[] { CommunicationTokenScope.Chat }); string userToken = communicationUserToken.Token; string endpoint = TestEnvironment.ChatApiUrl(); string theadCreatorMemberId = communicationUserToken.User.Id; ChatClient chatClient = new ChatClient( new Uri(endpoint), new CommunicationTokenCredential(userToken)); var chatThreadMember = new ChatThreadMember(new CommunicationUserIdentifier(theadCreatorMemberId)) { DisplayName = "UserDisplayName", ShareHistoryTime = DateTime.MinValue }; ChatThreadClient chatThreadClient = await chatClient.CreateChatThreadAsync(topic : "Hello world!", members : new[] { chatThreadMember }); string threadId = chatThreadClient.Id; #region Snippet:Azure_Communication_Chat_Tests_Samples_SendMessage var content = "hello world"; var priority = ChatMessagePriority.Normal; var senderDisplayName = "sender name"; SendChatMessageResult sendMessageResult = await chatThreadClient.SendMessageAsync(content, priority, senderDisplayName); #endregion Snippet:Azure_Communication_Chat_Tests_SendMessage var messageId = sendMessageResult.Id; #region Snippet:Azure_Communication_Chat_Tests_Samples_GetMessage ChatMessage chatMessage = await chatThreadClient.GetMessageAsync(messageId); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_GetMessage #region Snippet:Azure_Communication_Chat_Tests_Samples_GetMessages AsyncPageable <ChatMessage> allMessages = chatThreadClient.GetMessagesAsync(); await foreach (ChatMessage message in allMessages) { Console.WriteLine($"{message.Id}:{message.Sender.Id}:{message.Content}"); } #endregion Snippet:Azure_Communication_Chat_Tests_Samples_GetMessages #region Snippet:Azure_Communication_Chat_Tests_Samples_UpdateMessage await chatThreadClient.UpdateMessageAsync(messageId, "updated message content"); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_UpdateMessage //Note : Due to the async nature of the storage, moving coverage to CI tests #region Snippet:Azure_Communication_Chat_Tests_Samples_SendReadReceipt //@@await chatThreadClient.SendReadReceiptAsync(messageId); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_SendReadReceipt #region Snippet:Azure_Communication_Chat_Tests_Samples_GetReadReceipts AsyncPageable <ReadReceipt> allReadReceipts = chatThreadClient.GetReadReceiptsAsync(); await foreach (ReadReceipt readReceipt in allReadReceipts) { Console.WriteLine($"{readReceipt.ChatMessageId}:{readReceipt.Sender.Id}:{readReceipt.ReadOn}"); } #endregion Snippet:Azure_Communication_Chat_Tests_Samples_GetReadReceipts #region Snippet:Azure_Communication_Chat_Tests_Samples_DeleteMessage await chatThreadClient.DeleteMessageAsync(messageId); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_DeleteMessage #region Snippet:Azure_Communication_Chat_Tests_Samples_SendTypingNotification await chatThreadClient.SendTypingNotificationAsync(); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_SendTypingNotification await chatClient.DeleteChatThreadAsync(threadId); }
public async Task E2E_ThreadCreateUpdateGetDelete_MemberAddUpdateRemove_MessageGetSendUpdate_NotificationTyping_ReadReceiptGetSend_Async() { //arr CommunicationUser user1, user2, user3; string token1, token2, token3; CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); (user1, token1) = await CreateUserAndTokenAsync(communicationIdentityClient); (user2, token2) = await CreateUserAndTokenAsync(communicationIdentityClient); (user3, token3) = await CreateUserAndTokenAsync(communicationIdentityClient); var topic = "Thread Async from C# sdk"; var contentMessage = "This is message 1"; var updatedMessageContent = "This is message 1 updated"; var displayNameMessage = "DisplayName sender message 1"; var updatedTopic = "Updated topic - C# sdk"; var members = new List <ChatThreadMember> { new ChatThreadMember(user1), new ChatThreadMember(user2) }; ChatClient chatClient = CreateInstrumentedChatClient(token1); ChatClient chatClient2 = CreateInstrumentedChatClient(token2); //act ChatThreadClient chatThreadClient = await CreateInstrumentedChatThreadClientAsync(chatClient, topic, members); ChatThreadClient chatThreadClient2 = await CreateInstrumentedChatThreadClientAsync(chatClient, topic, members); await chatThreadClient.UpdateThreadAsync(updatedTopic); ChatThread chatThread = await chatClient.GetChatThreadAsync(chatThreadClient.Id); AsyncPageable <ChatThreadInfo> threads = chatClient.GetChatThreadsInfoAsync(); var threadsCount = threads.ToEnumerableAsync().Result.Count; SendChatMessageResult sendChatMessageResult = await chatThreadClient.SendMessageAsync(contentMessage, ChatMessagePriority.High, displayNameMessage); SendChatMessageResult sendChatMessageResult2 = await chatThreadClient.SendMessageAsync(contentMessage, ChatMessagePriority.High, displayNameMessage); ChatMessage message = await chatThreadClient.GetMessageAsync(sendChatMessageResult.Id); AsyncPageable <ChatMessage> messages = chatThreadClient.GetMessagesAsync(); var getMessagesCount = messages.ToEnumerableAsync().Result.Count; var messageId = sendChatMessageResult.Id; await chatThreadClient.UpdateMessageAsync(messageId, updatedMessageContent); Response <ChatMessage> actualUpdateMessage = await chatThreadClient.GetMessageAsync(messageId); await chatThreadClient.DeleteMessageAsync(messageId); AsyncPageable <ChatMessage> messagesAfterOneDeleted = chatThreadClient.GetMessagesAsync(); ChatMessage deletedChatMessage = messagesAfterOneDeleted.ToEnumerableAsync().Result.First(x => x.Id == messageId); AsyncPageable <ChatThreadMember> chatThreadMembers = chatThreadClient.GetMembersAsync(); var chatThreadMembersCount = chatThreadMembers.ToEnumerableAsync().Result.Count; var newMember = new ChatThreadMember(user3); await chatThreadClient.AddMembersAsync(new List <ChatThreadMember> { newMember }); AsyncPageable <ChatThreadMember> chatThreadMembersAfterOneAdded = chatThreadClient.GetMembersAsync(); var chatThreadMembersAfterOneAddedCount = chatThreadMembersAfterOneAdded.ToEnumerableAsync().Result.Count(); CommunicationUser userToBeRemoved = user3; //Better name for the snippet await chatThreadClient.RemoveMemberAsync(userToBeRemoved); AsyncPageable <ChatThreadMember> chatThreadMembersAfterOneDeleted = chatThreadClient.GetMembersAsync(); var chatThreadMembersAfterOneDeletedCount = chatThreadMembersAfterOneDeleted.ToEnumerableAsync().Result.Count(); Response typingNotificationResponse = await chatThreadClient.SendTypingNotificationAsync(); await chatThreadClient.SendTypingNotificationAsync(); await chatThreadClient.SendReadReceiptAsync(messageId); await chatThreadClient.SendReadReceiptAsync(sendChatMessageResult2.Id); AsyncPageable <ReadReceipt> readReceipts = chatThreadClient.GetReadReceiptsAsync(); var readReceiptsCount = readReceipts.ToEnumerableAsync().Result.Count(); await chatClient.DeleteChatThreadAsync(chatThreadClient.Id); //assert Assert.AreEqual(updatedTopic, chatThread.Topic); Assert.AreEqual(2, chatThread.Members.Count); Assert.AreEqual(contentMessage, message.Content); Assert.AreEqual(displayNameMessage, message.SenderDisplayName); Assert.AreEqual(ChatMessagePriority.High, message.Priority); Assert.AreEqual(2, threadsCount); Assert.AreEqual(5, getMessagesCount); //Including all types Assert.AreEqual(updatedMessageContent, actualUpdateMessage.Value.Content); Assert.IsTrue(deletedChatMessage.DeletedOn.HasValue); Assert.AreEqual(2, chatThreadMembersCount); Assert.AreEqual(3, chatThreadMembersAfterOneAddedCount); Assert.AreEqual(2, chatThreadMembersAfterOneDeletedCount); Assert.AreEqual((int)HttpStatusCode.OK, typingNotificationResponse.Status); //TODO: Commenting out the assert below for now as it is flakey due to server-side delay; currently in investigation // Assert.AreEqual(1, readReceiptsCount); }
public async Task ThreadCGUD_ParticipantAUR_MessageGSU_NotificationT_Async() { //arr Console.WriteLine($"ThreadCGUD_ParticipantAUR_MessageGSU_NotificationT_Async Running on RecordedTestMode : {Mode}"); CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); (CommunicationUserIdentifier user1, string token1) = await CreateUserAndTokenAsync(communicationIdentityClient); (CommunicationUserIdentifier user2, _) = await CreateUserAndTokenAsync(communicationIdentityClient); (CommunicationUserIdentifier user3, string token3) = await CreateUserAndTokenAsync(communicationIdentityClient); (CommunicationUserIdentifier user4, _) = await CreateUserAndTokenAsync(communicationIdentityClient); (CommunicationUserIdentifier user5, _) = await CreateUserAndTokenAsync(communicationIdentityClient); string repeatabilityRequestId1 = "contoso-C0A747F1-6245-4307-8267-B974340677DC"; string repeatabilityRequestId2 = "contoso-D0A747F1-6245-4307-8267-B974340677DD"; var topic = "Thread async from C# sdk"; var displayNameMessage = "DisplayName sender message 1"; var participants = new List <ChatParticipant> { new ChatParticipant(user1) { DisplayName = "user1" }, new ChatParticipant(user2) { DisplayName = "user2" }, new ChatParticipant(user3) { DisplayName = "user3" } }; ChatClient chatClient = CreateInstrumentedChatClient(token1); ChatClient chatClient3 = CreateInstrumentedChatClient(token3); //act CreateChatThreadResult createChatThreadResult = await chatClient.CreateChatThreadAsync(topic, participants, repeatabilityRequestId1); ChatThreadClient chatThreadClient = GetInstrumentedChatThreadClient(chatClient, createChatThreadResult.ChatThread.Id); var threadId = chatThreadClient.Id; CreateChatThreadResult createChatThreadResult2 = await chatClient.CreateChatThreadAsync(topic, participants, repeatabilityRequestId2); ChatThreadClient chatThreadClient2 = GetInstrumentedChatThreadClient(chatClient, createChatThreadResult2.ChatThread.Id); ChatThreadClient chatThreadClient3 = GetInstrumentedChatThreadClient(chatClient3, threadId); AsyncPageable <ChatParticipant> chatParticipantsOnCreation = chatThreadClient.GetParticipantsAsync(); var chatParticipantsOnCreationCount = chatParticipantsOnCreation.ToEnumerableAsync().Result.Count; var updatedTopic = "Updated topic - C# sdk"; await chatThreadClient.UpdateTopicAsync(updatedTopic); ChatThread chatThread = await chatClient.GetChatThreadAsync(threadId); string messageContent = "Content for message 1"; string messageId = await chatThreadClient.SendMessageAsync(messageContent, ChatMessageType.Text, displayNameMessage); string messageContent2 = "Content for message 2"; string messageId2 = await chatThreadClient2.SendMessageAsync(messageContent2, ChatMessageType.Html, displayNameMessage); string messageContent3 = "Content for message 3"; string messageId3 = await chatThreadClient3.SendMessageAsync(messageContent3, ChatMessageType.Text, displayNameMessage); string messageContent4 = "Content for message 4"; string messageId4 = await chatThreadClient3.SendMessageAsync(messageContent4, ChatMessageType.Html, displayNameMessage); string messageContent5 = "Content for message 5"; string messageId5 = await chatThreadClient3.SendMessageAsync(messageContent5, ChatMessageType.Text, displayNameMessage); string messageContent6 = "Content for message 6"; string messageId6 = await chatThreadClient3.SendMessageAsync(messageContent6, ChatMessageType.Html, displayNameMessage); ChatMessage message = await chatThreadClient.GetMessageAsync(messageId); ChatMessage message2 = await chatThreadClient2.GetMessageAsync(messageId2); ChatMessage message3 = await chatThreadClient3.GetMessageAsync(messageId3); ChatMessage message4 = await chatThreadClient3.GetMessageAsync(messageId4); ChatMessage message5 = await chatThreadClient3.GetMessageAsync(messageId5); ChatMessage message6 = await chatThreadClient3.GetMessageAsync(messageId6); AsyncPageable <ChatMessage> messages = chatThreadClient.GetMessagesAsync(); AsyncPageable <ChatMessage> messages2 = chatThreadClient2.GetMessagesAsync(); var getMessagesCount = messages.ToEnumerableAsync().Result.Count; var getMessagesCount2 = messages2.ToEnumerableAsync().Result.Count; #region Messages Pagination assertions AsyncPageable <ChatMessage> messagesPaginationTest = chatThreadClient.GetMessagesAsync(); await PageableTester <ChatMessage> .AssertPaginationAsync(enumerableResource : messagesPaginationTest, expectedPageSize : 2, expectedTotalResources : 8); #endregion var updatedMessageContent = "This is message 1 content updated"; await chatThreadClient.UpdateMessageAsync(messageId, updatedMessageContent); Response <ChatMessage> actualUpdateMessage = await chatThreadClient.GetMessageAsync(messageId); await chatThreadClient.DeleteMessageAsync(messageId); List <ChatMessage> messagesAfterOneDeleted = chatThreadClient.GetMessagesAsync().ToEnumerableAsync().Result; ChatMessage deletedChatMessage = messagesAfterOneDeleted.First(x => x.Id == messageId); #region Participants Pagination assertions AsyncPageable <ChatParticipant> chatParticipants = chatThreadClient.GetParticipantsAsync(); var chatParticipantsCount = chatParticipants.ToEnumerableAsync().Result.Count; #endregion var newParticipant = new ChatParticipant(user4) { DisplayName = "user4" }; var newParticipant2 = new ChatParticipant(user5) { DisplayName = "user5" }; AddChatParticipantsResult addChatParticipantsResult = await chatThreadClient.AddParticipantsAsync(participants : new[] { newParticipant }); AddChatParticipantsResult addChatParticipantsResult2 = await chatThreadClient.AddParticipantAsync(newParticipant2); AsyncPageable <ChatParticipant> chatParticipantsAfterTwoOneAdded = chatThreadClient.GetParticipantsAsync(); await PageableTester <ChatParticipant> .AssertPaginationAsync(enumerableResource : chatParticipantsAfterTwoOneAdded, expectedPageSize : 2, expectedTotalResources : 5); var chatParticipantsAfterTwoOneAddedCount = chatParticipantsAfterTwoOneAdded.ToEnumerableAsync().Result.Count; List <ChatMessage> messagesAfterParticipantsAdded = chatThreadClient.GetMessagesAsync().ToEnumerableAsync().Result; ChatMessage participantAddedMessage = messagesAfterParticipantsAdded.First(x => x.Type == ChatMessageType.ParticipantAdded); CommunicationUserIdentifier participantToBeRemoved = user4; await chatThreadClient.RemoveParticipantAsync(identifier : participantToBeRemoved); AsyncPageable <ChatParticipant> chatParticipantAfterOneDeleted = chatThreadClient.GetParticipantsAsync(); var chatParticipantAfterOneDeletedCount = chatParticipantAfterOneDeleted.ToEnumerableAsync().Result.Count; List <ChatMessage> messagesAfterParticipantRemoved = chatThreadClient.GetMessagesAsync().ToEnumerableAsync().Result; ChatMessage participantRemovedMessage = messagesAfterParticipantRemoved.First(x => x.Type == ChatMessageType.ParticipantRemoved); ChatMessage participantRemovedMessage2 = await chatThreadClient.GetMessageAsync(participantRemovedMessage.Id); Response typingNotificationResponse = await chatThreadClient.SendTypingNotificationAsync(); await chatThreadClient.SendTypingNotificationAsync(); AsyncPageable <ChatThreadInfo> threads = chatClient.GetChatThreadsInfoAsync(); var threadsCount = threads.ToEnumerableAsync().Result.Count; await chatClient.DeleteChatThreadAsync(threadId); //assert Assert.AreEqual(updatedTopic, chatThread.Topic); Assert.AreEqual(3, chatParticipantsOnCreationCount); Assert.AreEqual(messageContent, message.Content.Message); Assert.AreEqual(displayNameMessage, message.SenderDisplayName); Assert.AreEqual(updatedMessageContent, actualUpdateMessage.Value.Content.Message); Assert.AreEqual(ChatMessageType.Text, message.Type); Assert.AreEqual(messageContent2, message2.Content.Message); Assert.AreEqual(messageContent3, message3.Content.Message); Assert.AreEqual(messageContent4, message4.Content.Message); Assert.AreEqual(messageContent5, message5.Content.Message); Assert.AreEqual(messageContent6, message6.Content.Message); Assert.AreEqual(2, threadsCount); Assert.AreEqual(8, getMessagesCount); //Including all types : 5 text message, 3 control messages Assert.AreEqual(3, getMessagesCount2); //Including all types : 1 text message, 2 control messages Assert.AreEqual(1, participantAddedMessage.Content.Participants.Count); Assert.AreEqual(user5.Id, CommunicationIdentifierSerializer.Serialize(participantAddedMessage.Content.Participants[0].User).CommunicationUser.Id); Assert.AreEqual("user5", participantAddedMessage.Content.Participants[0].DisplayName); Assert.AreEqual(1, participantRemovedMessage.Content.Participants.Count); Assert.AreEqual(user4.Id, CommunicationIdentifierSerializer.Serialize(participantRemovedMessage.Content.Participants[0].User).CommunicationUser.Id); Assert.AreEqual("user4", participantRemovedMessage.Content.Participants[0].DisplayName); Assert.IsTrue(deletedChatMessage.DeletedOn.HasValue); Assert.AreEqual(3, chatParticipantsCount); Assert.AreEqual(5, chatParticipantsAfterTwoOneAddedCount); Assert.AreEqual(4, chatParticipantAfterOneDeletedCount); Assert.IsNull(addChatParticipantsResult.Errors); Assert.IsNull(addChatParticipantsResult2.Errors); Assert.AreEqual((int)HttpStatusCode.OK, typingNotificationResponse.Status); }
public async Task SendGetUpdateDeleteMessagesSendNotificationReadReceiptsAsync() { CommunicationIdentityClient communicationIdentityClient = new CommunicationIdentityClient(TestEnvironment.ConnectionString); Response <CommunicationUserIdentifier> threadMember = await communicationIdentityClient.CreateUserAsync(); AccessToken communicationUserToken = await communicationIdentityClient.GetTokenAsync(threadMember.Value, new[] { CommunicationTokenScope.Chat }); string userToken = communicationUserToken.Token; string theadCreatorMemberId = threadMember.Value.Id; ChatClient chatClient = new ChatClient( TestEnvironment.Endpoint, new CommunicationTokenCredential(userToken)); var chatParticipant = new ChatParticipant(new CommunicationUserIdentifier(theadCreatorMemberId)) { DisplayName = "UserDisplayName", ShareHistoryTime = DateTimeOffset.MinValue }; CreateChatThreadResult createChatThreadResult = await chatClient.CreateChatThreadAsync(topic : "Hello world!", participants : new[] { chatParticipant }); ChatThreadClient chatThreadClient = chatClient.GetChatThreadClient(createChatThreadResult.ChatThread.Id); #region Snippet:Azure_Communication_Chat_Tests_Samples_SendMessage SendChatMessageResult sendChatMessageResult = await chatThreadClient.SendMessageAsync(content : "hello world"); var messageId = sendChatMessageResult.Id; #endregion Snippet:Azure_Communication_Chat_Tests_SendMessage #region Snippet:Azure_Communication_Chat_Tests_Samples_GetMessage ChatMessage chatMessage = await chatThreadClient.GetMessageAsync(messageId); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_GetMessage #region Snippet:Azure_Communication_Chat_Tests_Samples_GetMessages AsyncPageable <ChatMessage> allMessages = chatThreadClient.GetMessagesAsync(); await foreach (ChatMessage message in allMessages) { Console.WriteLine($"{message.Id}:{message.Content.Message}"); } #endregion Snippet:Azure_Communication_Chat_Tests_Samples_GetMessages #region Snippet:Azure_Communication_Chat_Tests_Samples_UpdateMessage await chatThreadClient.UpdateMessageAsync(messageId, "updated message content"); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_UpdateMessage //Note : Due to the async nature of the storage, moving coverage to CI tests #region Snippet:Azure_Communication_Chat_Tests_Samples_SendReadReceipt //@@await chatThreadClient.SendReadReceiptAsync(messageId); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_SendReadReceipt #region Snippet:Azure_Communication_Chat_Tests_Samples_GetReadReceipts AsyncPageable <ChatMessageReadReceipt> allReadReceipts = chatThreadClient.GetReadReceiptsAsync(); await foreach (ChatMessageReadReceipt readReceipt in allReadReceipts) { Console.WriteLine($"{readReceipt.ChatMessageId}:{((CommunicationUserIdentifier)readReceipt.Sender).Id}:{readReceipt.ReadOn}"); } #endregion Snippet:Azure_Communication_Chat_Tests_Samples_GetReadReceipts #region Snippet:Azure_Communication_Chat_Tests_Samples_DeleteMessage await chatThreadClient.DeleteMessageAsync(messageId); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_DeleteMessage #region Snippet:Azure_Communication_Chat_Tests_Samples_SendTypingNotification await chatThreadClient.SendTypingNotificationAsync(); #endregion Snippet:Azure_Communication_Chat_Tests_Samples_SendTypingNotification await chatClient.DeleteChatThreadAsync(chatThreadClient.Id); }