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;
 }
예제 #3
0
 public HumanController(IHumanService service)
 {
     _service = service;
 }
예제 #4
0
 public HumanController(IHumanService humanService)
 {
     _humanService = humanService;
 }
예제 #5
0
 public TestController(IHumanService humanService)
 {
     this.humanService = humanService;
 }
예제 #6
0
 public Author(IHumanService humanService, IEntityService entityService)
 {
     _humanService  = humanService;
     _entityService = entityService;
 }
예제 #7
0
 public RootDialog(IHumanService humanService)
 {
     _humanService = humanService;
 }
예제 #8
0
 public HumanController(IErrorService errorService, IHumanService humanService, IUserService userService) : base(errorService)
 {
     this._humanService = humanService;
     this._userService  = userService;
 }