From aa39d60ccfaa8ad6612fcdf4d2f220d73877dd5b Mon Sep 17 00:00:00 2001 From: AndrewZuo01 Date: Fri, 8 Dec 2023 14:11:13 +0800 Subject: [PATCH] debug --- go.mod | 2 +- pkg/common/db/mgo/friend.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 5ea384cad..6e8abd3e4 100644 --- a/go.mod +++ b/go.mod @@ -155,4 +155,4 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect ) -replace github.com/OpenIMSDK/protocol v0.0.31 => github.com/AndrewZuo01/protocol v0.0.0-20231207064545-868d0e9c70a6 +replace github.com/OpenIMSDK/protocol v0.0.31 => github.com/AndrewZuo01/protocol v0.0.0-20231208060936-18be05d57a18 diff --git a/pkg/common/db/mgo/friend.go b/pkg/common/db/mgo/friend.go index c0ff5ca06..4b50a71e3 100644 --- a/pkg/common/db/mgo/friend.go +++ b/pkg/common/db/mgo/friend.go @@ -3,8 +3,6 @@ package mgo import ( "context" "github.com/OpenIMSDK/tools/errs" - "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/mgoutil" "github.com/OpenIMSDK/tools/pagination" "go.mongodb.org/mongo-driver/mongo/options" @@ -134,7 +132,7 @@ func (f *FriendMgo) FindFriendUserIDs(ctx context.Context, ownerUserID string) ( // UpdatePinStatus update friend's pin status func (f *FriendMgo) UpdatePinStatus(ctx context.Context, ownerUserID string, friendUserID string, isPinned bool) (err error) { - log.ZDebug(ctx, "ispinned", "check", isPinned) + filter := bson.M{"owner_user_id": ownerUserID, "friend_user_id": friendUserID} // Create an update operation to set the "is_pinned" field to isPinned for all documents. update := bson.M{"$set": bson.M{"is_pinned": isPinned}}