50 lines
1.4 KiB
Go
50 lines
1.4 KiB
Go
package chat
|
|
|
|
// import (
|
|
// "go_dreamfactory/comm"
|
|
// "go_dreamfactory/pb"
|
|
// )
|
|
|
|
// //参数校验
|
|
// func (this *apiComp) ChanageChannelCheck(session comm.IUserSession, req *pb.ChatChanageChannelReq) (errdata *pb.ErrorData) {
|
|
// if req.ChannelId < 0 {
|
|
// errdata = &pb.ErrorData{
|
|
// Code: pb.ErrorCode_ReqParameterError,
|
|
// Title: pb.ErrorCode_ReqParameterError.ToString(),
|
|
// }
|
|
// }
|
|
// return
|
|
// }
|
|
|
|
// ///改变跨服聊天频道
|
|
// func (this *apiComp) ChanageChannel(session comm.IUserSession, req *pb.ChatChanageChannelReq) (errdata *pb.ErrorData) {
|
|
// var (
|
|
// err error
|
|
// ok bool
|
|
// )
|
|
|
|
// if err, ok = this.module.modelChat.chanageChannel(session, req.ChannelId); err != nil {
|
|
// errdata = &pb.ErrorData{
|
|
// Code: pb.ErrorCode_DBError,
|
|
// Title: pb.ErrorCode_DBError.ToString(),
|
|
// Message: err.Error(),
|
|
// }
|
|
// return
|
|
// }
|
|
// if ok {
|
|
// if err = this.module.modelChat.removeCrossChannelMember(session.GetUserId()); err != nil {
|
|
// errdata = &pb.ErrorData{
|
|
// Code: pb.ErrorCode_DBError,
|
|
// Title: pb.ErrorCode_DBError.ToString(),
|
|
// Message: err.Error(),
|
|
// }
|
|
// return
|
|
// }
|
|
// this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
|
|
// "chatchannel": req.ChannelId,
|
|
// })
|
|
// }
|
|
// session.SendMsg(string(this.module.GetType()), "chanagechannel", &pb.ChatChanageChannelResp{ChannelId: req.ChannelId, IsSucc: ok})
|
|
// return
|
|
// }
|