예제 #1
0
 protected override async Task OnEventActivityAsync(ITurnContext <IEventActivity> turnContext, CancellationToken cancellationToken)
 {
     if (turnContext.Activity.Type == ActivityTypes.Event)
     {
         var user = new User();
         if (turnContext.Activity.Name == "urlClickedEvent")
         {
         }
         else
         {
             //get params sent from SN
             var userParam = turnContext.Activity.From.Properties["userparam"].ToString();
             user = JsonConvert.DeserializeObject <User>(userParam);
             //save user
             var rpaService = new RPAService();
             rpaService.SaveUser(new User {
                 u_user = user.UserId, u_conversation_id = turnContext.Activity.Conversation.Id
             });
         }
     }
 }