コード例 #1
0
        public async Task <IActionResult> ReplyToActivityAsync(
            [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "v3/conversations/{conversationId}/activities/{activityId}")] HttpRequest req,
            string conversationId, string activityId, ILogger log)
        {
            log.LogInformation($"Skill ReplyToActivityAsync endpoint triggered.");

            var body = await req.ReadAsStringAsync();

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

            return(new JsonResult(result, ActivitySerializationSettings.Default));
        }