fix issues

This commit is contained in:
Leonid Pershin
2025-10-17 06:15:46 +03:00
parent c5d91a1ad8
commit a96d4d8067
3 changed files with 21 additions and 9 deletions

View File

@@ -156,16 +156,16 @@ public static class TestDataBuilder
.Returns<long, string, string>(
(chatId, chatType, chatTitle) =>
{
if (!sessions.ContainsKey(chatId))
if (!sessions.TryGetValue(chatId, out var session))
{
var session = TestDataBuilder.ChatSessions.CreateBasicSession(
session = TestDataBuilder.ChatSessions.CreateBasicSession(
chatId,
chatType
);
session.ChatTitle = chatTitle;
sessions[chatId] = session;
}
return sessions[chatId];
return session;
}
);