Skip to content

Commit

Permalink
fix: user search fields
Browse files Browse the repository at this point in the history
  • Loading branch information
withchao committed Aug 27, 2024
1 parent 9176aa1 commit 1caea9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/common/db/model/chat/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ func (o *Attribute) SearchNormalUser(ctx context.Context, keyword string, forbid
}
if keyword != "" {
filter["$or"] = []bson.M{
//{"user_id": bson.M{"$regex": keyword, "$options": "i"}},
//{"account": bson.M{"$regex": keyword, "$options": "i"}},
{"user_id": bson.M{"$regex": keyword, "$options": "i"}},
{"account": bson.M{"$regex": keyword, "$options": "i"}},
{"nickname": bson.M{"$regex": keyword, "$options": "i"}},
//{"phone_number": bson.M{"$regex": keyword, "$options": "i"}},
{"phone_number": bson.M{"$regex": keyword, "$options": "i"}},
}
}
return mongoutil.FindPage[*chat.Attribute](ctx, o.coll, filter, pagination)
Expand Down

0 comments on commit 1caea9a

Please sign in to comment.