mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 03:26:57 +08:00
Merge remote-tracking branch 'origin/tuoyun' into tuoyun
This commit is contained in:
commit
a4532cb834
@ -20,7 +20,9 @@ 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
|
||||||
result, err := collection.Find(context.Background(), bson.M{"uid": bson.M{"$regex": uid}})
|
filter := bson.M{"uid": bson.M{"$regex": uid}}
|
||||||
|
//filter := bson.M{"uid": "17726378428:0"}
|
||||||
|
result, err := collection.Find(context.Background(), filter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("find error", err.Error())
|
fmt.Println("find error", err.Error())
|
||||||
return
|
return
|
||||||
@ -36,7 +38,7 @@ func GetUserAllChat(uid string) {
|
|||||||
fmt.Println(err.Error(), msg)
|
fmt.Println(err.Error(), msg)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
fmt.Println("sendID: ", msgData.SendID, "recvID: ", msgData.RecvID, "seq:", msgData.Seq, "status:", msgData.Status)
|
fmt.Println("seq: ", msgData.Seq, "status: ", msgData.Status, "sendID: ", msgData.SendID, "recvID: ", msgData.RecvID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user