Esempio n. 1
0
        public async Task <IActionResult> SendToConversationAsync(
            [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "v3/conversations/{conversationId}/activities")] HttpRequest req,
            string conversationId, ILogger log)
        {
            log.LogInformation($"Skill SendToConversationAsync endpoint triggered.");

            var body = await req.ReadAsStringAsync();

            var activity = JsonConvert.DeserializeObject <Activity>(body, serializationSettings);
            var result   = await _skillHandler.HandleSendToConversationAsync(req.Headers["Authorization"], conversationId, activity);

            if (result != null)
            {
                return(new JsonResult(result));
            }
            return(new OkResult());
        }