Merge pull request #766 from adenchen123/master

set UserId from conversation states for new conversation creation
This commit is contained in:
Haiping 2024-11-28 15:59:40 -06:00 committed by GitHub
commit 75a166437d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,12 +173,14 @@ public partial class ConversationService : IConversationService
var state = _services.GetRequiredService<IConversationStateService>();
var channel = state.GetState("channel");
var channelId = state.GetState("channel_id");
var userId = state.GetState("current_user_id");
var sess = new Conversation
{
Id = _conversationId,
Channel = channel,
ChannelId = channelId,
AgentId = agentId
AgentId = agentId,
UserId = userId,
};
converation = await NewConversation(sess);
}