private async Task StopConversation(IHumanService humanService, Activity agentActivity, CancellationToken cancellationToken)
        {
            var user = await humanService.GetUserInConversationAsync(agentActivity, cancellationToken);

            var agentReply = agentActivity.CreateReply();

            if (user == null)
            {
                agentReply.Text = "您的訊息沒有送給任何人唷...";
                await Utility.SendToConversationAsync(agentReply);

                return;
            }

            var userActivity = user.ConversationReference.GetPostToBotMessage();
            await humanService.StopAgentUserConversationAsync(userActivity, agentActivity, cancellationToken);

            var userReply = userActivity.CreateReply();

            userReply.Text = "您已與客服人員結束連線";
            await Utility.SendToConversationAsync(userReply);

            agentReply.Text = "您已停止對話";
            await Utility.SendToConversationAsync(agentReply);
        }
 public AgentToUserScorable(IBotDataStore <BotData> botDataStore, IBotToUser botToUser, IHumanService humanService)
 {
     _botDataStore = botDataStore;
     _botToUser    = botToUser;
     _humanService = humanService;
 }
Exemple #3
0
 public HumanController(IHumanService service)
 {
     _service = service;
 }
Exemple #4
0
 public HumanController(IHumanService humanService)
 {
     _humanService = humanService;
 }
Exemple #5
0
 public TestController(IHumanService humanService)
 {
     this.humanService = humanService;
 }
Exemple #6
0
 public Author(IHumanService humanService, IEntityService entityService)
 {
     _humanService  = humanService;
     _entityService = entityService;
 }
 public RootDialog(IHumanService humanService)
 {
     _humanService = humanService;
 }
Exemple #8
0
 public HumanController(IErrorService errorService, IHumanService humanService, IUserService userService) : base(errorService)
 {
     this._humanService = humanService;
     this._userService  = userService;
 }