mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-05 20:11:14 +08:00
script
This commit is contained in:
parent
e444ba3fd0
commit
4a8ad389d8
@ -20,6 +20,7 @@ func GetUserAllChat(uid string) {
|
|||||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||||
collection := Client.Database(config.Config.Mongo.DBDatabase).Collection("msg")
|
collection := Client.Database(config.Config.Mongo.DBDatabase).Collection("msg")
|
||||||
var userChatList []db.UserChat
|
var userChatList []db.UserChat
|
||||||
|
uid = uid + ":"
|
||||||
filter := bson.M{"uid": bson.M{"$regex": uid}}
|
filter := bson.M{"uid": bson.M{"$regex": uid}}
|
||||||
//filter := bson.M{"uid": "17726378428:0"}
|
//filter := bson.M{"uid": "17726378428:0"}
|
||||||
result, err := collection.Find(context.Background(), filter)
|
result, err := collection.Find(context.Background(), filter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user