黑名单双向删除
This commit is contained in:
parent
f20144b6c7
commit
bb1967ab0b
@ -112,10 +112,15 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR
|
||||
return
|
||||
}
|
||||
|
||||
// 判断对方是不是好友
|
||||
if _, ok := utils.Findx(target.FriendIds, self.Uid); ok {
|
||||
target.FriendIds = utils.Deletex(target.FriendIds, self.Uid)
|
||||
}
|
||||
target.Beblackids = append(target.Beblackids, session.GetUserId())
|
||||
//更新
|
||||
err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{
|
||||
"beblackids": target.Beblackids,
|
||||
"friendIds": target.FriendIds,
|
||||
})
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
|
Loading…
Reference in New Issue
Block a user