Exemple #1
0
        public async Task CheckSocials(IDialogContext context, LuisResult result)
        {
            PostTelemetryCustomEvent("hello", 0, false);
            BotDB botDB   = new BotDB();
            var   message = botDB.GetString(null, "simplifai.intent.CheckSocials");

            BotDbAnalytics.UpdateAnalyticDatabase(result.Intents[0].Intent, (double)result.Intents[0].Score);
            await context.PostAsync(BotDbStrings.MakeItAcceptable(message));

            context.Wait(MessageReceived);
        }
 public virtual async Task <HttpResponseMessage> Post([FromBody] Microsoft.Bot.Connector.Activity activity)
 {
     // check if activity is of type message
     if (activity != null && activity.GetActivityType() == ActivityTypes.Message)
     {
         BotDbAnalytics.AddSession(
             activity.ChannelId,
             activity.Conversation.Id,
             DateTime.UtcNow,
             activity.Locale);
         await Conversation.SendAsync(activity, () => new ViaSportDialog());
     }
     else
     {
         HandleSystemMessage(activity);
     }
     return(new HttpResponseMessage(System.Net.HttpStatusCode.Accepted));
 }