mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-06-06 22:10:34 +08:00
refactor(msg): update regex pattern for conversationID to include a trailing colon (#3737)
(cherry picked from commit 82f87551d6067983f4e31f8dacb905c740d58639)
This commit is contained in:
parent
7c242b8491
commit
1036e81eb4
@ -956,7 +956,7 @@ func (m *MsgMgo) GetLastMessageSeqByTime(ctx context.Context, conversationID str
|
|||||||
{
|
{
|
||||||
"$match": bson.M{
|
"$match": bson.M{
|
||||||
"doc_id": 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{
|
"$match": bson.M{
|
||||||
"doc_id": bson.M{
|
"doc_id": bson.M{
|
||||||
"$regex": fmt.Sprintf("^%s", conversationID),
|
"$regex": fmt.Sprintf("^%s:", conversationID),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user