refactor(msg): update regex pattern for conversationID to include a trailing colon (#3736)

(cherry picked from commit 82f87551d6)
3.8.3-patch
chao 5 days ago committed by GitHub
parent 4876bafc53
commit dda6714d98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -951,7 +951,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),
},
},
},
@ -1003,7 +1003,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),
},
},
},

Loading…
Cancel
Save