mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-05 05:12:45 +08:00
script
This commit is contained in:
parent
cad360869e
commit
384d39120d
@ -21,7 +21,7 @@ func GetUserAllChat(uid string) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
collection := Client.Database(config.Config.Mongo.DBDatabase).Collection("msg")
|
||||
var userChatList []db.UserChat
|
||||
result, err := collection.Find(context.Background(), bson.M{"uid": primitive.Regex{Pattern: uid}})
|
||||
result, err := collection.Find(context.Background(), bson.M{"uid": bson.M{"$regex": uid}})
|
||||
if err != nil {
|
||||
fmt.Println("find error", err.Error())
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user