Ejemplo n.º 1
0
        /// <summary>執行階段:主要的對話處理程序,會從所有全域處理程序中執行最高分的項目</summary>
        protected override async Task PostAsync(IActivity item, bool state, CancellationToken token)
        {
            if (await _agentService.IsInExistingConversationAsync(item, token))
            {
                await _agentToUser.SendToUserAsync(item as Activity, token);
            }
            else
            {
                await _botToUser.PostAsync(ConversationText.NotTalkingWithAnyUser);

                await _botToUser.PostAsync(ConversationText.NotTalkingWithBot);
            }
        }
Ejemplo n.º 2
0
        protected override async Task PostAsync(IActivity item, bool state, CancellationToken token)
        {
            if (await _agentService.IsInExistingConversationAsync(item, token))
            {
                await _agentToUser.SendToUserAsync(item as Activity, token);
            }
            else
            {
                await _botToUser.PostAsync("You are not talking with any user.");

                await _botToUser.PostAsync("And sadly, you can't talk to me either. :(");
            }
        }