Skip to content

Commit 4813c5b

Browse files
committed
Merge branch 'master' of https://github.com/Qtoss-AI/BotSharp
2 parents 039054a + 0ea383f commit 4813c5b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,14 @@ public async Task<Conversation> GetConversationRecordOrCreateNew(string agentId)
173173
var state = _services.GetRequiredService<IConversationStateService>();
174174
var channel = state.GetState("channel");
175175
var channelId = state.GetState("channel_id");
176+
var userId = state.GetState("current_user_id");
176177
var sess = new Conversation
177178
{
178179
Id = _conversationId,
179180
Channel = channel,
180181
ChannelId = channelId,
181-
AgentId = agentId
182+
AgentId = agentId,
183+
UserId = userId,
182184
};
183185
converation = await NewConversation(sess);
184186
}

src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public async Task<bool> SendVerificationCodeResetPasswordNoLogin(User user)
570570

571571
if (!string.IsNullOrEmpty(user.Phone))
572572
{
573-
record = db.GetUserByPhone(user.Phone);
573+
record = db.GetUserByPhone(user.Phone, regionCode: user.RegionCode);
574574
}
575575

576576
if (!string.IsNullOrEmpty(user.Email))
@@ -745,7 +745,7 @@ public async Task<bool> AddDashboardConversation(string userId, string conversat
745745
await Task.CompletedTask;
746746
return true;
747747
}
748-
748+
749749
public async Task<bool> RemoveDashboardConversation(string userId, string conversationId)
750750
{
751751
var db = _services.GetRequiredService<IBotSharpRepository>();

0 commit comments

Comments
 (0)