Twilio ProcessUserMessageAsync

This commit is contained in:
Haiping Chen 2025-01-22 21:49:06 -06:00
parent 7bb6e7ccb8
commit 2159352daf

View file

@ -81,8 +81,9 @@ namespace BotSharp.Plugin.Twilio.Services
InitProgressService(message, sessionManager, progressService);
InitConversation(message, inputMsg, conv, routing);
// Need to consider Inbound and Outbound call
var conversation = await conv.GetConversation(message.ConversationId);
var agentId = string.IsNullOrWhiteSpace(conversation.AgentId) ? config.AgentId : conversation.AgentId;
var agentId = string.IsNullOrWhiteSpace(conversation?.AgentId) ? config.AgentId : conversation.AgentId;
var result = await conv.SendMessage(agentId,
inputMsg,