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,