From b059c506a18c41a8a00902c486d588f69fa6267b Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Mon, 21 Oct 2024 17:45:05 +0800 Subject: [PATCH] fix: SearchFriend can search email --- pkg/common/db/model/chat/attribute.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/common/db/model/chat/attribute.go b/pkg/common/db/model/chat/attribute.go index 3597dd4a..15112d3d 100644 --- a/pkg/common/db/model/chat/attribute.go +++ b/pkg/common/db/model/chat/attribute.go @@ -164,6 +164,7 @@ func (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []st {"account": bson.M{"$regex": keyword, "$options": "i"}}, {"nickname": bson.M{"$regex": keyword, "$options": "i"}}, {"phone_number": bson.M{"$regex": keyword, "$options": "i"}}, + {"email": bson.M{"$regex": keyword, "$options": "i"}}, } } return mongoutil.FindPage[*chat.Attribute](ctx, o.coll, filter, pagination)