This commit is contained in:
Jicheng Lu 2023-09-28 12:26:18 -05:00
parent 0399861ee7
commit e3f607b4f9

View file

@ -652,7 +652,7 @@ public class MongoRepository : IBotSharpRepository
public List<Conversation> GetConversations(string userId)
{
var records = new List<Conversation>();
if (string.IsNullOrEmpty(userId) || Guid.TryParse(userId, out var _)) return records;
if (string.IsNullOrEmpty(userId) || !Guid.TryParse(userId, out var _)) return records;
var filterByUserId = Builders<ConversationCollection>.Filter.Eq(x => x.UserId, Guid.Parse(userId));
var conversations = _dc.Conversations.Find(filterByUserId).ToList();