From 1036e81eb483e09a3a606cc8dd7970c7c5f74c70 Mon Sep 17 00:00:00 2001 From: chao <48119764+withchao@users.noreply.github.com> Date: Fri, 5 Jun 2026 18:25:13 +0800 Subject: [PATCH] refactor(msg): update regex pattern for conversationID to include a trailing colon (#3737) (cherry picked from commit 82f87551d6067983f4e31f8dacb905c740d58639) --- pkg/common/storage/database/mgo/msg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/storage/database/mgo/msg.go b/pkg/common/storage/database/mgo/msg.go index 315f4530b..2d49e7c1b 100644 --- a/pkg/common/storage/database/mgo/msg.go +++ b/pkg/common/storage/database/mgo/msg.go @@ -956,7 +956,7 @@ func (m *MsgMgo) GetLastMessageSeqByTime(ctx context.Context, conversationID str { "$match": bson.M{ "doc_id": bson.M{ - "$regex": fmt.Sprintf("^%s", conversationID), + "$regex": fmt.Sprintf("^%s:", conversationID), }, }, }, @@ -1008,7 +1008,7 @@ func (m *MsgMgo) GetLastMessage(ctx context.Context, conversationID string) (*mo { "$match": bson.M{ "doc_id": bson.M{ - "$regex": fmt.Sprintf("^%s", conversationID), + "$regex": fmt.Sprintf("^%s:", conversationID), }, }, },