From cfa478937db48076713567ef24a189d7c00dc796 Mon Sep 17 00:00:00 2001 From: AndrewZuo01 Date: Fri, 8 Dec 2023 12:06:25 +0800 Subject: [PATCH] debug --- pkg/common/db/mgo/friend.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mgo/friend.go b/pkg/common/db/mgo/friend.go index 861b669f8..c0ff5ca06 100644 --- a/pkg/common/db/mgo/friend.go +++ b/pkg/common/db/mgo/friend.go @@ -3,6 +3,7 @@ package mgo import ( "context" "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mgoutil" "github.com/OpenIMSDK/tools/pagination" @@ -133,9 +134,9 @@ 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 false for all documents. + // Create an update operation to set the "is_pinned" field to isPinned for all documents. update := bson.M{"$set": bson.M{"is_pinned": isPinned}} // Perform the update operation for all documents in the collection.