package friend import ( "go_dreamfactory/comm" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" ) // 切磋终止 func (this *apiComp) StopCheck(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode) { return } func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode, data proto.Message) { if code = this.StopCheck(session, req); code != pb.ErrorCode_Success { return } //清楚切磋请求记录 this.moduleFriend.ModelFriendQiecuo.DelByUId(req.Uid) resp := &pb.FriendStopResp{ IsSucc: true, } if err := session.SendMsg(string(this.moduleFriend.GetType()), "stop", resp); err != nil { code = pb.ErrorCode_SystemError return } this.moduleFriend.SendMsgToUser(string(this.moduleFriend.GetType()), "qiecuonotify", &pb.FriendQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 3}, req.Uid) return }