mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-24 12:02:14 +08:00
Merge branch 'main' of https://github.com/openimsdk/open-im-server into fix/msg-geteway-panic
This commit is contained in:
commit
b0e0da3a61
@ -137,7 +137,7 @@ func (f *FriendRequestMgo) Take(ctx context.Context, fromUserID, toUserID string
|
|||||||
func (f *FriendRequestMgo) GetUnhandledCount(ctx context.Context, userID string, ts int64) (int64, error) {
|
func (f *FriendRequestMgo) GetUnhandledCount(ctx context.Context, userID string, ts int64) (int64, error) {
|
||||||
filter := bson.M{"to_user_id": userID, "handle_result": 0}
|
filter := bson.M{"to_user_id": userID, "handle_result": 0}
|
||||||
if ts != 0 {
|
if ts != 0 {
|
||||||
filter["create_time"] = bson.M{"$gt": time.Unix(ts, 0)}
|
filter["create_time"] = bson.M{"$gt": time.UnixMilli(ts)}
|
||||||
}
|
}
|
||||||
return mongoutil.Count(ctx, f.coll, filter)
|
return mongoutil.Count(ctx, f.coll, filter)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,7 +109,7 @@ func (g *GroupRequestMgo) GetUnhandledCount(ctx context.Context, groupIDs []stri
|
|||||||
}
|
}
|
||||||
filter := bson.M{"group_id": bson.M{"$in": groupIDs}, "handle_result": 0}
|
filter := bson.M{"group_id": bson.M{"$in": groupIDs}, "handle_result": 0}
|
||||||
if ts != 0 {
|
if ts != 0 {
|
||||||
filter["req_time"] = bson.M{"$gt": time.Unix(ts, 0)}
|
filter["req_time"] = bson.M{"$gt": time.UnixMilli(ts)}
|
||||||
}
|
}
|
||||||
return mongoutil.Count(ctx, g.coll, filter)
|
return mongoutil.Count(ctx, g.coll, filter)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user