public async Task <IActionResult> DeleteConversation([FromQuery] DeleteConversationRequest request)
        {
            var response = await mediator.Send(request);

            logger.LogResponse(
                $"User #{HttpContext.GetCurrentUserId()} deleted conversation with user #{request.RecipientId}",
                response.Error);

            return(this.CreateResponse(response));
        }
Exemple #2
0
        /// <summary>Snippet for DeleteConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteConversationRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            DeleteConversationRequest request = new DeleteConversationRequest
            {
                ConversationName = ConversationName.FromProjectLocationConversation("[PROJECT]", "[LOCATION]", "[CONVERSATION]"),
                Force            = false,
            };
            // Make the request
            await contactCenterInsightsClient.DeleteConversationAsync(request);
        }