Skip to content

Commit

Permalink
fix: SearchFriend can search email
Browse files Browse the repository at this point in the history
  • Loading branch information
icey-yu committed Oct 21, 2024
1 parent 7f23ada commit b059c50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/common/db/model/chat/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b059c50

Please sign in to comment.