From adced06a7aca41ac2f8f4f85a448f5ba8d035dd1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Jul 2023 19:44:25 +0800 Subject: [PATCH] =?UTF-8?q?#27819=20=E5=A5=BD=E5=8F=8B=E9=BB=91=E5=90=8D?= =?UTF-8?q?=E5=8D=95BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_addblack.go | 3 +++ modules/friend/api_cross_agree.go | 1 + 2 files changed, 4 insertions(+) diff --git a/modules/friend/api_cross_addblack.go b/modules/friend/api_cross_addblack.go index 2f9e1f35d..56aa2ddcb 100644 --- a/modules/friend/api_cross_addblack.go +++ b/modules/friend/api_cross_addblack.go @@ -90,10 +90,13 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR // 将目标从好友列表中移除 friendIds := utils.Deletex(self.FriendIds, req.FriendId) + // 将好友从申请列表移除 + applyIds := utils.Deletex(self.ApplyIds, req.FriendId) //更新 err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{ "blackIds": self.BlackIds, "friendIds": friendIds, + "applyIds": applyIds, }) if err != nil { errdata = &pb.ErrorData{ diff --git a/modules/friend/api_cross_agree.go b/modules/friend/api_cross_agree.go index a29fdbb42..004fffd42 100644 --- a/modules/friend/api_cross_agree.go +++ b/modules/friend/api_cross_agree.go @@ -110,6 +110,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e } if err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{ "friendIds": target.FriendIds, + "applyIds": target.ApplyIds, }); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError,