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