This commit is contained in:
wh_zcy 2023-02-10 12:13:23 +08:00
parent cd8ee73e90
commit c9869d646c
2 changed files with 8 additions and 6 deletions

View File

@ -30,12 +30,6 @@ func (this *apiComp) Qiecuo(session comm.IUserSession, req *pb.FriendQiecuoReq)
return
}
//判断是否已发送切磋请求
if qr == nil {
code = pb.ErrorCode_FriendQiecuoNoRequest
return
}
//已发送切磋
// if qr.Timestamp != 0 {
// code = pb.ErrorCode_FriendQiecuoRequested

View File

@ -49,6 +49,14 @@ func (this *ModelFriendQiecuo) createQiecuoRecord(uid, targetUid string) (*pb.Qi
this.moduleFriend.Errorln(err)
return nil, err
}
} else {
update := map[string]interface{}{
"targetId": targetUid,
"timestamp": configure.Now().Unix(),
}
if err := this.Change(uid, update); err != nil {
return nil, err
}
}
return qr, nil