From 6a0709efd455202a8fe46f66adb6001df9f23845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B7=E5=8B=87?= Date: Wed, 30 Aug 2023 13:52:07 +0800 Subject: [PATCH] =?UTF-8?q?im=E8=81=8A=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/imserver/app.go | 1 + server/imserver/chat.go | 17 + server/imserver/chatmgr.go | 274 ++++++ server/imserver/constant.go | 11 + server/imserver/cs/cs.auto_gen.go | 48 + server/imserver/cs/cs_msgid.pb.go | 121 ++- server/imserver/cs/cs_proto.pb.go | 1252 +++++++++++++++++++++----- server/imserver/export.go | 1 + server/imserver/friendsmgr.go | 23 + server/imserver/guild.go | 4 + server/imserver/guilddbmgr.go | 2 +- server/imserver/guildmgr.go | 15 +- server/imserver/player.go | 76 +- server/imserver/playermgr.go | 4 + server/imserver/proto/cs_msgid.proto | 9 + server/imserver/proto/cs_proto.proto | 76 ++ 16 files changed, 1632 insertions(+), 302 deletions(-) create mode 100644 server/imserver/chat.go create mode 100644 server/imserver/chatmgr.go diff --git a/server/imserver/app.go b/server/imserver/app.go index 303ed2af..fdbbdc6a 100644 --- a/server/imserver/app.go +++ b/server/imserver/app.go @@ -25,6 +25,7 @@ func (this *App) Init() { playerMgr.init() friendMgr.init() guildMgr.init() + chatMgr.init() wspListener.init() httpListener.init() } diff --git a/server/imserver/chat.go b/server/imserver/chat.go new file mode 100644 index 00000000..f4f8570c --- /dev/null +++ b/server/imserver/chat.go @@ -0,0 +1,17 @@ +package main + +import ( + "cs" +) + +type ChatUserRec struct { + HasUnreadMsg bool + Dirty bool + Users map[string]*ChatMsgRec +} + +type ChatMsgRec struct { + CurrID uint64 + LastID uint64 + ChatMsgList []*cs.MFChatMsg +} diff --git a/server/imserver/chatmgr.go b/server/imserver/chatmgr.go new file mode 100644 index 00000000..32f56506 --- /dev/null +++ b/server/imserver/chatmgr.go @@ -0,0 +1,274 @@ +package main + +import ( + "cs" + "time" +) + +type ChatMgr struct { + pm *PlayerMgr + fm *FriendsMgr + gm *GuildMgr + + worldMsgRec ChatMsgRec + guildMsgRec map[int64]*ChatMsgRec + privateChatUsers map[string]*ChatUserRec + + WorldMsgId uint64 + GuildMsgId uint64 + TmpMsgId uint64 +} + +func NewChatMgr(pm *PlayerMgr, fm *FriendsMgr, gm *GuildMgr) *ChatMgr { + cm := &ChatMgr{ + pm: pm, + fm: fm, + gm: gm, + worldMsgRec: ChatMsgRec{}, + guildMsgRec: make(map[int64]*ChatMsgRec), + privateChatUsers: make(map[string]*ChatUserRec), + } + // Default values + cm.WorldMsgId = 1000 + cm.GuildMsgId = 1000 + cm.TmpMsgId = 1000 + + return cm +} + +func (cm *ChatMgr) init() {} + +func (cm *ChatMgr) FillMFChatMsg(msg *cs.MFChatMsg, accountId *string, + msgAutoId uint64, chatChannel int32, msgType int32, msgBody *string) { + + msg.MsgUuid = &msgAutoId + msg.Sender = accountId + msg.ChatChannel = &chatChannel + msg.MsgType = &msgType + msg.MsgBody = msgBody + + unixSec := time.Now().Unix() + msg.SendTime = &unixSec +} + +func (cm *ChatMgr) FillSMUpdateChatRedPointNotify(p *Player, msg *cs.SMUpdateChatRedPointNotify) { + // New messages flag + if cm.worldMsgRec.CurrID > p.worldChannelLastId { + msg.HasUnreadMsgChannels = append(msg.HasUnreadMsgChannels, kCCWorld) + } + guildId := cm.gm.GetGuildIdByAccountId(p.accountId) + if guildId > 0 { + if msgRec, exists := cm.guildMsgRec[guildId]; exists { + if msgRec.CurrID > p.guildChannelLastId { + msg.HasUnreadMsgChannels = append(msg.HasUnreadMsgChannels, kCCGuild) + } + } + } + + userRec := cm.GetChatUser(&p.accountId) + if userRec != nil { + if userRec.Dirty { + userRec.HasUnreadMsg = false + userRec.Dirty = false + } + if userRec.HasUnreadMsg { + msg.HasUnreadMsgChannels = append(msg.HasUnreadMsgChannels, kCCPrivate) + } + } +} + +func (cm *ChatMgr) FillSMUpdatePrivateChatRedPointNotify(p *Player, msg *cs.SMUpdatePrivateChatRedPointNotify) { + userRec := cm.GetChatUser(&p.accountId) + if userRec == nil { + return + } + for accountId, msgRec := range userRec.Users { + if msgRec.CurrID < msgRec.LastID { + msg.HasUnreadMsgAccounts = append(msg.HasUnreadMsgAccounts, accountId) + } + } +} + +func (cm *ChatMgr) ProcWorldChat(p *Player, msg *cs.CMSendChatMsg) { + accountId := p.GetAccountId() + chatMsg := new(cs.MFChatMsg) + cm.WorldMsgId++ + cm.FillMFChatMsg(chatMsg, &accountId, cm.WorldMsgId, *msg.ChatChannel, *msg.MsgType, msg.MsgBody) + + cm.worldMsgRec.CurrID = cm.WorldMsgId + cm.worldMsgRec.ChatMsgList = append(cm.worldMsgRec.ChatMsgList, chatMsg) + + // TraversePlayer + for _, p2 := range cm.pm.GetPlayers() { + cm.SyncWorldChatMsg(p2) + } +} + +func (cm *ChatMgr) ProcGuildChat(p *Player, msg *cs.CMSendChatMsg) { + guild := cm.gm.GetGuildByAccountId(p.accountId) + if guild == nil { + return + } + guildId := guild.GuildId + cm.GuildMsgId++ + + chatMsg := new(cs.MFChatMsg) + cm.FillMFChatMsg(chatMsg, &p.accountId, cm.GuildMsgId, *msg.ChatChannel, *msg.MsgType, msg.MsgBody) + + if msgRec, exists := cm.guildMsgRec[guildId]; exists { + msgRec.ChatMsgList = append(msgRec.ChatMsgList, chatMsg) + } else { + msgRec := &ChatMsgRec{} + msgRec.CurrID = cm.GuildMsgId + cm.guildMsgRec[guildId] = msgRec + } + + // TraverseMember + for _, member := range guild.Members { + guildMember := playerMgr.getPlayerByAccountId(member.AccountId) + if guildMember != nil { + cm.SyncGuildChatMsg(guildMember) + } + } +} + +func (cm *ChatMgr) ProcPrivateChat(p *Player, msg *cs.CMSendChatMsg) { + targetAccountId := msg.GetTargetAccountId() + if p.accountId == targetAccountId { + return + } + // 确定是否好友 + targetAccount := cm.fm.GetFriendByAccountId(p.accountId, targetAccountId) + if targetAccount == nil { + return + } + + chatMsg := new(cs.MFChatMsg) + cm.FillMFChatMsg(chatMsg, &p.accountId, 0, *msg.ChatChannel, *msg.MsgType, msg.MsgBody) + cm.AddChatUser(p.accountId, msg.GetTargetAccountId(), chatMsg, p.IncrPrivateChatLastId()) + cm.SyncPrivateChatMsg(p) + + // 聊天好友在线 + targetPlayer := cm.pm.getPlayerByAccountId(targetAccountId) + if targetPlayer != nil { + cm.SyncPrivateChatMsg(targetPlayer) + } else { + cm.AddChatUser(targetAccountId, p.GetAccountId(), chatMsg, 0) + } +} + +func (cm *ChatMgr) SyncWorldChatMsg(p *Player) { + if p.chatChannel == kCCWorld { + notifyMsg := &cs.SMChatMsgNotify{} + for _, chatMsg := range cm.worldMsgRec.ChatMsgList { + if chatMsg.GetMsgUuid() > p.worldChannelLastId { + notifyMsg.MsgList = append(notifyMsg.MsgList, chatMsg) + p.worldChannelLastId = chatMsg.GetMsgUuid() + } + } + if len(notifyMsg.MsgList) > 0 { + p.SendMsg(notifyMsg) + } + return + } + p.MarkNewMsg() +} + +func (cm *ChatMgr) SyncPrivateChatMsg(p *Player) { + if p.chatChannel == kCCPrivate { + chatUser := cm.GetChatUser(&p.accountId) + if chatUser == nil { + return + } + + notifyMsg := &cs.SMChatMsgNotify{} + for accountId, chatMsgRec := range chatUser.Users { + if accountId == p.privateTargetAccountId { + for _, chatMsg := range chatMsgRec.ChatMsgList { + if *chatMsg.MsgUuid > chatMsgRec.CurrID { + notifyMsg.MsgList = append(notifyMsg.MsgList, chatMsg) + chatMsgRec.CurrID = *chatMsg.MsgUuid + chatUser.Dirty = true + } + } + } + } + if len(notifyMsg.MsgList) > 0 { + p.SendMsg(notifyMsg) + } + } + p.MarkNewMsg() +} + +func (cm *ChatMgr) SyncGuildChatMsg(p *Player) { + guildId := cm.gm.GetGuildIdByAccountId(p.accountId) + if guildId <= 0 { + return + } + msgRec, exists := cm.guildMsgRec[guildId] + if !exists { + return + } + + if p.chatChannel == kCCGuild { + notifyMsg := &cs.SMChatMsgNotify{} + for _, chatMsg := range msgRec.ChatMsgList { + if chatMsg.GetMsgUuid() > p.guildChannelLastId { + notifyMsg.MsgList = append(notifyMsg.MsgList, chatMsg) + p.guildChannelLastId = chatMsg.GetMsgUuid() + } + } + if len(notifyMsg.MsgList) > 0 { + p.SendMsg(notifyMsg) + } + return + } + p.MarkNewMsg() + // player.SyncRedPoint() +} + +func (cm *ChatMgr) AddChatUser(senderAccountId, receiverAccountId string, chatMsg *cs.MFChatMsg, lastId uint64) { + chatMsgCopy := new(cs.MFChatMsg) + *chatMsgCopy = *chatMsg + chatMsgCopy.MsgUuid = &lastId + + if _, exists := cm.privateChatUsers[senderAccountId]; !exists { + cm.privateChatUsers[senderAccountId] = &ChatUserRec{} + } + + userRec := cm.privateChatUsers[senderAccountId] + userRec.Dirty = true + userRec.HasUnreadMsg = true + + if _, exists := cm.privateChatUsers[senderAccountId].Users[receiverAccountId]; !exists { + cm.privateChatUsers[senderAccountId].Users[receiverAccountId] = &ChatMsgRec{} + } + + receiverUserRec := cm.privateChatUsers[senderAccountId].Users[receiverAccountId] + receiverUserRec.LastID = lastId + receiverUserRec.ChatMsgList = append(receiverUserRec.ChatMsgList, chatMsgCopy) + // 队列 保持最近50条 +} + +func (cm *ChatMgr) GetChatUser(accountId *string) *ChatUserRec { + if userRec, exists := cm.privateChatUsers[*accountId]; exists { + return userRec + } + return nil +} + +func (cm *ChatMgr) RemoveChatUser(accountId *string) { + delete(cm.privateChatUsers, *accountId) +} + +func (cm *ChatMgr) markMessagesAsRead(sender, receiver string) { + userRec, exists := cm.privateChatUsers[receiver] + if !exists { + return + } + msgRec, exists := userRec.Users[sender] + if !exists { + return + } + msgRec.LastID = msgRec.CurrID +} diff --git a/server/imserver/constant.go b/server/imserver/constant.go index b08a900c..32a7d8dd 100644 --- a/server/imserver/constant.go +++ b/server/imserver/constant.go @@ -32,6 +32,17 @@ const ( BlacklistStatusIsRemoved = 1 // 好友黑名单状态 已移除黑名单 ) +const ( + kCCBegin = iota + kCCWorld = 1 + kCCPrivate = 2 + kCCGuild = 3 + kCCTeam = 4 + kCCBigHorn = 5 + kCCLoopMsg = 6 + kCCEnd +) + // im server guild const ( MaxMembers = 10 diff --git a/server/imserver/cs/cs.auto_gen.go b/server/imserver/cs/cs.auto_gen.go index 1b23d9b0..68fb532b 100644 --- a/server/imserver/cs/cs.auto_gen.go +++ b/server/imserver/cs/cs.auto_gen.go @@ -49,6 +49,8 @@ type MsgHandler interface { CMDeleteFriendShip(*f5.MsgHdr, *CMDeleteFriendShip) CMAddBlacklist(*f5.MsgHdr, *CMAddBlacklist) CMRemoveBlacklist(*f5.MsgHdr, *CMRemoveBlacklist) + CMSetCurrPrivateChatTarget(*f5.MsgHdr, *CMSetCurrPrivateChatTarget) + CMSendChatMsg(*f5.MsgHdr, *CMSendChatMsg) CMGuildInfo(*f5.MsgHdr, *CMGuildInfo) CMCreateGuild(*f5.MsgHdr, *CMCreateGuild) CMApplyToGuild(*f5.MsgHdr, *CMApplyToGuild) @@ -104,6 +106,12 @@ func (this *MsgHandlerImpl) CMAddBlacklist(hdr *f5.MsgHdr, msg *CMAddBlacklist) func (this *MsgHandlerImpl) CMRemoveBlacklist(hdr *f5.MsgHdr, msg *CMRemoveBlacklist) { } +func (this *MsgHandlerImpl) CMSetCurrPrivateChatTarget(hdr *f5.MsgHdr, msg *CMSetCurrPrivateChatTarget) { +} + +func (this *MsgHandlerImpl) CMSendChatMsg(hdr *f5.MsgHdr, msg *CMSendChatMsg) { +} + func (this *MsgHandlerImpl) CMGuildInfo(hdr *f5.MsgHdr, msg *CMGuildInfo) { } @@ -253,6 +261,22 @@ func (this *SMRemoveBlacklist) GetNetMsgId() uint16 { return uint16(SMMessageIdE__SMRemoveBlacklist) } +func (this *CMSetCurrPrivateChatTarget) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMSetCurrPrivateChatTarget) +} + +func (this *CMSendChatMsg) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMSendChatMsg) +} + +func (this *SMUpdateChatRedPointNotify) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMUpdateChatRedPointNotify) +} + +func (this *SMChatMsgNotify) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMChatMsgNotify) +} + func (this *CMGuildInfo) GetNetMsgId() uint16 { return uint16(CMMessageIdE__CMGuildInfo) } @@ -511,6 +535,30 @@ func init() { }, } + handlers[int(CMMessageIdE__CMSetCurrPrivateChatTarget)] = &CsNetMsgHandler{ + MsgId: int(CMMessageIdE__CMSetCurrPrivateChatTarget), + ParseCb: func (data []byte) interface{} { + msg := &CMSetCurrPrivateChatTarget{} + proto.Unmarshal(data, msg) + return msg + }, + Cb: func (hdr *f5.MsgHdr, handler MsgHandler) { + handler.CMSetCurrPrivateChatTarget(hdr, hdr.Msg.(*CMSetCurrPrivateChatTarget)) + }, + } + + handlers[int(CMMessageIdE__CMSendChatMsg)] = &CsNetMsgHandler{ + MsgId: int(CMMessageIdE__CMSendChatMsg), + ParseCb: func (data []byte) interface{} { + msg := &CMSendChatMsg{} + proto.Unmarshal(data, msg) + return msg + }, + Cb: func (hdr *f5.MsgHdr, handler MsgHandler) { + handler.CMSendChatMsg(hdr, hdr.Msg.(*CMSendChatMsg)) + }, + } + handlers[int(CMMessageIdE__CMGuildInfo)] = &CsNetMsgHandler{ MsgId: int(CMMessageIdE__CMGuildInfo), ParseCb: func (data []byte) interface{} { diff --git a/server/imserver/cs/cs_msgid.pb.go b/server/imserver/cs/cs_msgid.pb.go index 90449290..672b59c5 100644 --- a/server/imserver/cs/cs_msgid.pb.go +++ b/server/imserver/cs/cs_msgid.pb.go @@ -39,6 +39,9 @@ const ( CMMessageIdE__CMAddBlacklist CMMessageIdE = 113 CMMessageIdE__CMRemoveBlacklist CMMessageIdE = 114 CMMessageIdE__CMFriendInfo CMMessageIdE = 115 + // 聊天相关 + CMMessageIdE__CMSetCurrPrivateChatTarget CMMessageIdE = 200 + CMMessageIdE__CMSendChatMsg CMMessageIdE = 201 // 公会相关 CMMessageIdE__CMGuildInfo CMMessageIdE = 120 CMMessageIdE__CMCreateGuild CMMessageIdE = 121 @@ -70,6 +73,8 @@ var ( 113: "_CMAddBlacklist", 114: "_CMRemoveBlacklist", 115: "_CMFriendInfo", + 200: "_CMSetCurrPrivateChatTarget", + 201: "_CMSendChatMsg", 120: "_CMGuildInfo", 121: "_CMCreateGuild", 122: "_CMApplyToGuild", @@ -97,6 +102,8 @@ var ( "_CMAddBlacklist": 113, "_CMRemoveBlacklist": 114, "_CMFriendInfo": 115, + "_CMSetCurrPrivateChatTarget": 200, + "_CMSendChatMsg": 201, "_CMGuildInfo": 120, "_CMCreateGuild": 121, "_CMApplyToGuild": 122, @@ -178,6 +185,9 @@ const ( SMMessageIdE__SMDemoteMember SMMessageIdE = 128 SMMessageIdE__SMDisband SMMessageIdE = 129 SMMessageIdE__SMSearchGuilds SMMessageIdE = 130 + // 聊天相关 + SMMessageIdE__SMUpdateChatRedPointNotify SMMessageIdE = 200 + SMMessageIdE__SMChatMsgNotify SMMessageIdE = 201 ) // Enum value maps for SMMessageIdE. @@ -209,6 +219,8 @@ var ( 128: "_SMDemoteMember", 129: "_SMDisband", 130: "_SMSearchGuilds", + 200: "_SMUpdateChatRedPointNotify", + 201: "_SMChatMsgNotify", } SMMessageIdE_value = map[string]int32{ "_SMPing": 101, @@ -237,6 +249,8 @@ var ( "_SMDemoteMember": 128, "_SMDisband": 129, "_SMSearchGuilds": 130, + "_SMUpdateChatRedPointNotify": 200, + "_SMChatMsgNotify": 201, } ) @@ -281,7 +295,7 @@ var File_cs_msgid_proto protoreflect.FileDescriptor var file_cs_msgid_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x63, 0x73, 0x5f, 0x6d, 0x73, 0x67, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x02, 0x63, 0x73, 0x2a, 0xa1, 0x04, 0x0a, 0x0d, 0x43, 0x4d, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x12, 0x02, 0x63, 0x73, 0x2a, 0xd8, 0x04, 0x0a, 0x0d, 0x43, 0x4d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x5f, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x5f, 0x43, 0x4d, 0x50, 0x69, 0x6e, 0x67, 0x10, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x5f, 0x43, 0x4d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x67, 0x12, 0x10, 0x0a, 0x0c, 0x5f, 0x43, 0x4d, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, @@ -302,55 +316,62 @@ var file_cs_msgid_proto_rawDesc = []byte{ 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x10, 0x71, 0x12, 0x16, 0x0a, 0x12, 0x5f, 0x43, 0x4d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x10, 0x72, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x43, 0x4d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, - 0x10, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x5f, 0x43, 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x10, 0x78, 0x12, 0x12, 0x0a, 0x0e, 0x5f, 0x43, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x79, 0x12, 0x13, 0x0a, 0x0f, 0x5f, 0x43, 0x4d, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x7a, 0x12, 0x0e, 0x0a, - 0x0a, 0x5f, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x10, 0x7b, 0x12, 0x0d, 0x0a, - 0x09, 0x5f, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x7c, 0x12, 0x11, 0x0a, 0x0d, - 0x5f, 0x43, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x7d, 0x12, - 0x14, 0x0a, 0x10, 0x5f, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x10, 0x7e, 0x12, 0x14, 0x0a, 0x10, 0x5f, 0x43, 0x4d, 0x50, 0x72, 0x6f, 0x6d, - 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x7f, 0x12, 0x14, 0x0a, 0x0f, 0x5f, - 0x43, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x80, - 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x5f, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x10, - 0x81, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x5f, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, - 0x75, 0x69, 0x6c, 0x64, 0x73, 0x10, 0x82, 0x01, 0x2a, 0xb2, 0x04, 0x0a, 0x0d, 0x53, 0x4d, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x5f, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x5f, 0x53, - 0x4d, 0x50, 0x69, 0x6e, 0x67, 0x10, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x5f, 0x53, 0x4d, 0x52, 0x70, - 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x66, 0x12, 0x0c, 0x0a, 0x08, 0x5f, 0x53, 0x4d, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x67, 0x12, 0x10, 0x0a, 0x0c, 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x68, 0x12, 0x1c, 0x0a, 0x18, 0x5f, 0x53, 0x4d, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x10, 0x69, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x10, 0x6a, 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x53, 0x4d, - 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x10, 0x6b, 0x12, 0x1a, 0x0a, 0x16, 0x5f, 0x53, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6c, 0x12, 0x1a, - 0x0a, 0x16, 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x5f, 0x53, - 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x5f, - 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x6f, 0x12, 0x17, - 0x0a, 0x13, 0x5f, 0x53, 0x4d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x53, 0x68, 0x69, 0x70, 0x10, 0x70, 0x12, 0x13, 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x41, 0x64, - 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x10, 0x71, 0x12, 0x16, 0x0a, 0x12, - 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, - 0x73, 0x74, 0x10, 0x72, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x5f, 0x53, 0x4d, 0x47, 0x75, - 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x78, 0x12, 0x12, 0x0a, 0x0e, 0x5f, 0x53, 0x4d, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x79, 0x12, 0x13, 0x0a, - 0x0f, 0x5f, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, - 0x10, 0x7a, 0x12, 0x0e, 0x0a, 0x0a, 0x5f, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, - 0x10, 0x7b, 0x12, 0x0d, 0x0a, 0x09, 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x10, - 0x7c, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, - 0x6c, 0x64, 0x10, 0x7d, 0x12, 0x14, 0x0a, 0x10, 0x5f, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, - 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x7e, 0x12, 0x14, 0x0a, 0x10, 0x5f, 0x53, - 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x7f, - 0x12, 0x14, 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x10, 0x80, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x5f, 0x53, 0x4d, 0x44, 0x69, 0x73, - 0x62, 0x61, 0x6e, 0x64, 0x10, 0x81, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x10, 0x82, 0x01, 0x42, 0x06, 0x5a, + 0x10, 0x73, 0x12, 0x20, 0x0a, 0x1b, 0x5f, 0x43, 0x4d, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x10, 0xc8, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x5f, 0x43, 0x4d, 0x53, 0x65, 0x6e, 0x64, 0x43, + 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x10, 0xc9, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x5f, 0x43, 0x4d, + 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x78, 0x12, 0x12, 0x0a, 0x0e, 0x5f, + 0x43, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x79, 0x12, + 0x13, 0x0a, 0x0f, 0x5f, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, + 0x6c, 0x64, 0x10, 0x7a, 0x12, 0x0e, 0x0a, 0x0a, 0x5f, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x10, 0x7b, 0x12, 0x0d, 0x0a, 0x09, 0x5f, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x10, 0x7c, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x43, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, + 0x75, 0x69, 0x6c, 0x64, 0x10, 0x7d, 0x12, 0x14, 0x0a, 0x10, 0x5f, 0x43, 0x4d, 0x44, 0x69, 0x73, + 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x7e, 0x12, 0x14, 0x0a, 0x10, + 0x5f, 0x43, 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x10, 0x7f, 0x12, 0x14, 0x0a, 0x0f, 0x5f, 0x43, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x80, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x5f, 0x43, 0x4d, 0x44, + 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x10, 0x81, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x5f, 0x43, 0x4d, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x10, 0x82, 0x01, 0x2a, + 0xeb, 0x04, 0x0a, 0x0d, 0x53, 0x4d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x5f, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x5f, 0x53, 0x4d, 0x50, 0x69, 0x6e, 0x67, 0x10, 0x65, 0x12, 0x0f, + 0x0a, 0x0b, 0x5f, 0x53, 0x4d, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x66, 0x12, + 0x0c, 0x0a, 0x08, 0x5f, 0x53, 0x4d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x67, 0x12, 0x10, 0x0a, + 0x0c, 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x68, 0x12, + 0x1c, 0x0a, 0x18, 0x5f, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x10, 0x69, 0x12, 0x11, 0x0a, + 0x0d, 0x5f, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x10, 0x6a, + 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x53, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6b, 0x12, 0x1a, 0x0a, 0x16, 0x5f, 0x53, 0x4d, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x10, 0x6c, 0x12, 0x1a, 0x0a, 0x16, 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, + 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x5f, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x10, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x10, 0x6f, 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x53, 0x4d, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x10, 0x70, 0x12, 0x13, + 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, + 0x74, 0x10, 0x71, 0x12, 0x16, 0x0a, 0x12, 0x5f, 0x53, 0x4d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x10, 0x72, 0x12, 0x11, 0x0a, 0x0d, 0x5f, + 0x53, 0x4d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x73, 0x12, 0x10, + 0x0a, 0x0c, 0x5f, 0x53, 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x78, + 0x12, 0x12, 0x0a, 0x0e, 0x5f, 0x53, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, + 0x6c, 0x64, 0x10, 0x79, 0x12, 0x13, 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x7a, 0x12, 0x0e, 0x0a, 0x0a, 0x5f, 0x53, 0x4d, + 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x10, 0x7b, 0x12, 0x0d, 0x0a, 0x09, 0x5f, 0x53, 0x4d, + 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x7c, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x4c, + 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x7d, 0x12, 0x14, 0x0a, 0x10, 0x5f, + 0x53, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, + 0x7e, 0x12, 0x14, 0x0a, 0x10, 0x5f, 0x53, 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x7f, 0x12, 0x14, 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x44, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x80, 0x01, 0x12, 0x0f, 0x0a, + 0x0a, 0x5f, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x10, 0x81, 0x01, 0x12, 0x14, + 0x0a, 0x0f, 0x5f, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, + 0x73, 0x10, 0x82, 0x01, 0x12, 0x20, 0x0a, 0x1b, 0x5f, 0x53, 0x4d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x10, 0xc8, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x5f, 0x53, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x10, 0xc9, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x63, 0x73, } diff --git a/server/imserver/cs/cs_proto.pb.go b/server/imserver/cs/cs_proto.pb.go index 8a890815..4610a463 100644 --- a/server/imserver/cs/cs_proto.pb.go +++ b/server/imserver/cs/cs_proto.pb.go @@ -1905,6 +1905,576 @@ func (x *MFUser) GetUsername() string { return "" } +// --- 聊天 --- +// 发送聊天消息 +type CMSendChatMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChatChannel *int32 `protobuf:"varint,1,opt,name=chat_channel,json=chatChannel" json:"chat_channel,omitempty"` //聊天频道 1: 世界 2:好友 3:战队 4:小队(这时target表示队伍Id) 5:大喇叭 6:跑马灯(只能收不能发) + TargetAccountId *string `protobuf:"bytes,2,opt,name=targetAccountId" json:"targetAccountId,omitempty"` //目标 + MsgType *int32 `protobuf:"varint,3,opt,name=msg_type,json=msgType" json:"msg_type,omitempty"` ////消息类型 0:文本消息(json) 1:自定义协议 (json) 2:纯文本(但是任会做屏蔽字替换) + MsgBody *string `protobuf:"bytes,4,opt,name=msg_body,json=msgBody" json:"msg_body,omitempty"` //消息内容 + Members []string `protobuf:"bytes,5,rep,name=members" json:"members,omitempty"` //小队成员列表(包含自己) +} + +func (x *CMSendChatMsg) Reset() { + *x = CMSendChatMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CMSendChatMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CMSendChatMsg) ProtoMessage() {} + +func (x *CMSendChatMsg) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CMSendChatMsg.ProtoReflect.Descriptor instead. +func (*CMSendChatMsg) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{34} +} + +func (x *CMSendChatMsg) GetChatChannel() int32 { + if x != nil && x.ChatChannel != nil { + return *x.ChatChannel + } + return 0 +} + +func (x *CMSendChatMsg) GetTargetAccountId() string { + if x != nil && x.TargetAccountId != nil { + return *x.TargetAccountId + } + return "" +} + +func (x *CMSendChatMsg) GetMsgType() int32 { + if x != nil && x.MsgType != nil { + return *x.MsgType + } + return 0 +} + +func (x *CMSendChatMsg) GetMsgBody() string { + if x != nil && x.MsgBody != nil { + return *x.MsgBody + } + return "" +} + +func (x *CMSendChatMsg) GetMembers() []string { + if x != nil { + return x.Members + } + return nil +} + +// 读取聊天消息列表并且开启聊天通知 +type CMReadMsgAndOpenChatNotify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CurrChannel *int32 `protobuf:"varint,1,opt,name=curr_channel,json=currChannel" json:"curr_channel,omitempty"` //当前频道 + LastIds []*MFPair64 `protobuf:"bytes,2,rep,name=last_ids,json=lastIds" json:"last_ids,omitempty"` //所有频道 key:聊天频道 val:该频道最后一次收到的消息id +} + +func (x *CMReadMsgAndOpenChatNotify) Reset() { + *x = CMReadMsgAndOpenChatNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CMReadMsgAndOpenChatNotify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CMReadMsgAndOpenChatNotify) ProtoMessage() {} + +func (x *CMReadMsgAndOpenChatNotify) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CMReadMsgAndOpenChatNotify.ProtoReflect.Descriptor instead. +func (*CMReadMsgAndOpenChatNotify) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{35} +} + +func (x *CMReadMsgAndOpenChatNotify) GetCurrChannel() int32 { + if x != nil && x.CurrChannel != nil { + return *x.CurrChannel + } + return 0 +} + +func (x *CMReadMsgAndOpenChatNotify) GetLastIds() []*MFPair64 { + if x != nil { + return x.LastIds + } + return nil +} + +// 设置当前私聊目标 +type CMSetCurrPrivateChatTarget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TargetAccountId *string `protobuf:"bytes,1,opt,name=target_account_id,json=targetAccountId" json:"target_account_id,omitempty"` //私聊对象id, 只有当前聊频道是私聊时字段才有意义 + LastId *int64 `protobuf:"varint,2,opt,name=last_id,json=lastId" json:"last_id,omitempty"` //最后收到想消息id +} + +func (x *CMSetCurrPrivateChatTarget) Reset() { + *x = CMSetCurrPrivateChatTarget{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CMSetCurrPrivateChatTarget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CMSetCurrPrivateChatTarget) ProtoMessage() {} + +func (x *CMSetCurrPrivateChatTarget) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CMSetCurrPrivateChatTarget.ProtoReflect.Descriptor instead. +func (*CMSetCurrPrivateChatTarget) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{36} +} + +func (x *CMSetCurrPrivateChatTarget) GetTargetAccountId() string { + if x != nil && x.TargetAccountId != nil { + return *x.TargetAccountId + } + return "" +} + +func (x *CMSetCurrPrivateChatTarget) GetLastId() int64 { + if x != nil && x.LastId != nil { + return *x.LastId + } + return 0 +} + +// 关闭聊天通知 +type CMCloseChatNotify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CMCloseChatNotify) Reset() { + *x = CMCloseChatNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CMCloseChatNotify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CMCloseChatNotify) ProtoMessage() {} + +func (x *CMCloseChatNotify) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CMCloseChatNotify.ProtoReflect.Descriptor instead. +func (*CMCloseChatNotify) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{37} +} + +// 更新聊天红点信息 +type SMUpdateChatRedPointNotify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HasUnreadMsgChannels []int32 `protobuf:"varint,1,rep,name=has_unread_msg_channels,json=hasUnreadMsgChannels" json:"has_unread_msg_channels,omitempty"` //含有未读消息的渠道id列表,不在列表里的渠道默认不含有 +} + +func (x *SMUpdateChatRedPointNotify) Reset() { + *x = SMUpdateChatRedPointNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMUpdateChatRedPointNotify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMUpdateChatRedPointNotify) ProtoMessage() {} + +func (x *SMUpdateChatRedPointNotify) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMUpdateChatRedPointNotify.ProtoReflect.Descriptor instead. +func (*SMUpdateChatRedPointNotify) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{38} +} + +func (x *SMUpdateChatRedPointNotify) GetHasUnreadMsgChannels() []int32 { + if x != nil { + return x.HasUnreadMsgChannels + } + return nil +} + +type SMChatMsgNotify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MsgList []*MFChatMsg `protobuf:"bytes,1,rep,name=msg_list,json=msgList" json:"msg_list,omitempty"` //消息列表,客户端需要根据chat_channel和msg_uuid更新本地的last_ids +} + +func (x *SMChatMsgNotify) Reset() { + *x = SMChatMsgNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMChatMsgNotify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMChatMsgNotify) ProtoMessage() {} + +func (x *SMChatMsgNotify) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMChatMsgNotify.ProtoReflect.Descriptor instead. +func (*SMChatMsgNotify) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{39} +} + +func (x *SMChatMsgNotify) GetMsgList() []*MFChatMsg { + if x != nil { + return x.MsgList + } + return nil +} + +// 更新红点信息 +type SMUpdateRedPointNotify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RedPointFlags *int32 `protobuf:"varint,1,opt,name=red_point_flags,json=redPointFlags" json:"red_point_flags,omitempty"` //红点信息 1<<0:好友申请 1<<1:公会申请 1<<2:聊天红点 +} + +func (x *SMUpdateRedPointNotify) Reset() { + *x = SMUpdateRedPointNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMUpdateRedPointNotify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMUpdateRedPointNotify) ProtoMessage() {} + +func (x *SMUpdateRedPointNotify) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMUpdateRedPointNotify.ProtoReflect.Descriptor instead. +func (*SMUpdateRedPointNotify) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{40} +} + +func (x *SMUpdateRedPointNotify) GetRedPointFlags() int32 { + if x != nil && x.RedPointFlags != nil { + return *x.RedPointFlags + } + return 0 +} + +// 更新私聊红点信息 +type SMUpdatePrivateChatRedPointNotify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HasUnreadMsgAccounts []string `protobuf:"bytes,1,rep,name=has_unread_msg_accounts,json=hasUnreadMsgAccounts" json:"has_unread_msg_accounts,omitempty"` //有未读消息的账号列表,不在列表里的好友more不含有 +} + +func (x *SMUpdatePrivateChatRedPointNotify) Reset() { + *x = SMUpdatePrivateChatRedPointNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMUpdatePrivateChatRedPointNotify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMUpdatePrivateChatRedPointNotify) ProtoMessage() {} + +func (x *SMUpdatePrivateChatRedPointNotify) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMUpdatePrivateChatRedPointNotify.ProtoReflect.Descriptor instead. +func (*SMUpdatePrivateChatRedPointNotify) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{41} +} + +func (x *SMUpdatePrivateChatRedPointNotify) GetHasUnreadMsgAccounts() []string { + if x != nil { + return x.HasUnreadMsgAccounts + } + return nil +} + +// 更新频道最后一次收到的消息id +type SMUpdateChatChannelLastId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LastIds []*MFPair64 `protobuf:"bytes,1,rep,name=last_ids,json=lastIds" json:"last_ids,omitempty"` //所有频道 key:聊天频道 val:该频道最后一次收到的消息id +} + +func (x *SMUpdateChatChannelLastId) Reset() { + *x = SMUpdateChatChannelLastId{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMUpdateChatChannelLastId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMUpdateChatChannelLastId) ProtoMessage() {} + +func (x *SMUpdateChatChannelLastId) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMUpdateChatChannelLastId.ProtoReflect.Descriptor instead. +func (*SMUpdateChatChannelLastId) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{42} +} + +func (x *SMUpdateChatChannelLastId) GetLastIds() []*MFPair64 { + if x != nil { + return x.LastIds + } + return nil +} + +// 聊天消息 +type MFChatMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 消息唯一id,递增序列,客户端可以用chat_channel + msg_uuid作为主键 + // !!!不同的频道msg_uuid可能重复 + MsgUuid *uint64 `protobuf:"varint,1,opt,name=msg_uuid,json=msgUuid" json:"msg_uuid,omitempty"` + Sender *string `protobuf:"bytes,2,opt,name=sender" json:"sender,omitempty"` //发送者 + Receiver *string `protobuf:"bytes,3,opt,name=receiver" json:"receiver,omitempty"` //接收者 + ChatChannel *int32 `protobuf:"varint,4,opt,name=chat_channel,json=chatChannel" json:"chat_channel,omitempty"` //聊天频道 + MsgType *int32 `protobuf:"varint,5,opt,name=msg_type,json=msgType" json:"msg_type,omitempty"` //消息类型 0:文本消息(json) 1:自定义协议 (json) 2:纯文本(但是任会做屏蔽字替换) + MsgBody *string `protobuf:"bytes,6,opt,name=msg_body,json=msgBody" json:"msg_body,omitempty"` //消息内容(json类型里的字段!开头的会做屏蔽替换) + SendTime *int64 `protobuf:"varint,7,opt,name=send_time,json=sendTime" json:"send_time,omitempty"` //消息发送时间 +} + +func (x *MFChatMsg) Reset() { + *x = MFChatMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MFChatMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MFChatMsg) ProtoMessage() {} + +func (x *MFChatMsg) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MFChatMsg.ProtoReflect.Descriptor instead. +func (*MFChatMsg) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{43} +} + +func (x *MFChatMsg) GetMsgUuid() uint64 { + if x != nil && x.MsgUuid != nil { + return *x.MsgUuid + } + return 0 +} + +func (x *MFChatMsg) GetSender() string { + if x != nil && x.Sender != nil { + return *x.Sender + } + return "" +} + +func (x *MFChatMsg) GetReceiver() string { + if x != nil && x.Receiver != nil { + return *x.Receiver + } + return "" +} + +func (x *MFChatMsg) GetChatChannel() int32 { + if x != nil && x.ChatChannel != nil { + return *x.ChatChannel + } + return 0 +} + +func (x *MFChatMsg) GetMsgType() int32 { + if x != nil && x.MsgType != nil { + return *x.MsgType + } + return 0 +} + +func (x *MFChatMsg) GetMsgBody() string { + if x != nil && x.MsgBody != nil { + return *x.MsgBody + } + return "" +} + +func (x *MFChatMsg) GetSendTime() int64 { + if x != nil && x.SendTime != nil { + return *x.SendTime + } + return 0 +} + +// --- 公会 --- // 请求公会信息 type CMGuildInfo struct { state protoimpl.MessageState @@ -1915,7 +2485,7 @@ type CMGuildInfo struct { func (x *CMGuildInfo) Reset() { *x = CMGuildInfo{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[34] + mi := &file_cs_proto_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1928,7 +2498,7 @@ func (x *CMGuildInfo) String() string { func (*CMGuildInfo) ProtoMessage() {} func (x *CMGuildInfo) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[34] + mi := &file_cs_proto_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1941,7 +2511,7 @@ func (x *CMGuildInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CMGuildInfo.ProtoReflect.Descriptor instead. func (*CMGuildInfo) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{34} + return file_cs_proto_proto_rawDescGZIP(), []int{44} } // 回复公会信息 @@ -1957,7 +2527,7 @@ type SMGuildInfo struct { func (x *SMGuildInfo) Reset() { *x = SMGuildInfo{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[35] + mi := &file_cs_proto_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1970,7 +2540,7 @@ func (x *SMGuildInfo) String() string { func (*SMGuildInfo) ProtoMessage() {} func (x *SMGuildInfo) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[35] + mi := &file_cs_proto_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1983,7 +2553,7 @@ func (x *SMGuildInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use SMGuildInfo.ProtoReflect.Descriptor instead. func (*SMGuildInfo) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{35} + return file_cs_proto_proto_rawDescGZIP(), []int{45} } func (x *SMGuildInfo) GetGuild() *MFGuild { @@ -2012,7 +2582,7 @@ type CMCreateGuild struct { func (x *CMCreateGuild) Reset() { *x = CMCreateGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[36] + mi := &file_cs_proto_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2025,7 +2595,7 @@ func (x *CMCreateGuild) String() string { func (*CMCreateGuild) ProtoMessage() {} func (x *CMCreateGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[36] + mi := &file_cs_proto_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2038,7 +2608,7 @@ func (x *CMCreateGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use CMCreateGuild.ProtoReflect.Descriptor instead. func (*CMCreateGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{36} + return file_cs_proto_proto_rawDescGZIP(), []int{46} } func (x *CMCreateGuild) GetName() string { @@ -2061,7 +2631,7 @@ type SMCreateGuild struct { func (x *SMCreateGuild) Reset() { *x = SMCreateGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[37] + mi := &file_cs_proto_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2074,7 +2644,7 @@ func (x *SMCreateGuild) String() string { func (*SMCreateGuild) ProtoMessage() {} func (x *SMCreateGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[37] + mi := &file_cs_proto_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2087,7 +2657,7 @@ func (x *SMCreateGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use SMCreateGuild.ProtoReflect.Descriptor instead. func (*SMCreateGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{37} + return file_cs_proto_proto_rawDescGZIP(), []int{47} } func (x *SMCreateGuild) GetGuildId() int64 { @@ -2116,7 +2686,7 @@ type CMApplyToGuild struct { func (x *CMApplyToGuild) Reset() { *x = CMApplyToGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[38] + mi := &file_cs_proto_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2129,7 +2699,7 @@ func (x *CMApplyToGuild) String() string { func (*CMApplyToGuild) ProtoMessage() {} func (x *CMApplyToGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[38] + mi := &file_cs_proto_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2142,7 +2712,7 @@ func (x *CMApplyToGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use CMApplyToGuild.ProtoReflect.Descriptor instead. func (*CMApplyToGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{38} + return file_cs_proto_proto_rawDescGZIP(), []int{48} } func (x *CMApplyToGuild) GetGuildId() int64 { @@ -2164,7 +2734,7 @@ type SMApplyToGuild struct { func (x *SMApplyToGuild) Reset() { *x = SMApplyToGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[39] + mi := &file_cs_proto_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2177,7 +2747,7 @@ func (x *SMApplyToGuild) String() string { func (*SMApplyToGuild) ProtoMessage() {} func (x *SMApplyToGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[39] + mi := &file_cs_proto_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2190,7 +2760,7 @@ func (x *SMApplyToGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use SMApplyToGuild.ProtoReflect.Descriptor instead. func (*SMApplyToGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{39} + return file_cs_proto_proto_rawDescGZIP(), []int{49} } func (x *SMApplyToGuild) GetErrMsg() string { @@ -2213,7 +2783,7 @@ type CMApprove struct { func (x *CMApprove) Reset() { *x = CMApprove{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[40] + mi := &file_cs_proto_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2226,7 +2796,7 @@ func (x *CMApprove) String() string { func (*CMApprove) ProtoMessage() {} func (x *CMApprove) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[40] + mi := &file_cs_proto_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2239,7 +2809,7 @@ func (x *CMApprove) ProtoReflect() protoreflect.Message { // Deprecated: Use CMApprove.ProtoReflect.Descriptor instead. func (*CMApprove) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{40} + return file_cs_proto_proto_rawDescGZIP(), []int{50} } func (x *CMApprove) GetGuildId() int64 { @@ -2268,7 +2838,7 @@ type SMApprove struct { func (x *SMApprove) Reset() { *x = SMApprove{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[41] + mi := &file_cs_proto_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2281,7 +2851,7 @@ func (x *SMApprove) String() string { func (*SMApprove) ProtoMessage() {} func (x *SMApprove) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[41] + mi := &file_cs_proto_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2294,7 +2864,7 @@ func (x *SMApprove) ProtoReflect() protoreflect.Message { // Deprecated: Use SMApprove.ProtoReflect.Descriptor instead. func (*SMApprove) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{41} + return file_cs_proto_proto_rawDescGZIP(), []int{51} } func (x *SMApprove) GetErrMsg() string { @@ -2317,7 +2887,7 @@ type CMReject struct { func (x *CMReject) Reset() { *x = CMReject{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[42] + mi := &file_cs_proto_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2330,7 +2900,7 @@ func (x *CMReject) String() string { func (*CMReject) ProtoMessage() {} func (x *CMReject) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[42] + mi := &file_cs_proto_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2343,7 +2913,7 @@ func (x *CMReject) ProtoReflect() protoreflect.Message { // Deprecated: Use CMReject.ProtoReflect.Descriptor instead. func (*CMReject) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{42} + return file_cs_proto_proto_rawDescGZIP(), []int{52} } func (x *CMReject) GetGuildId() int64 { @@ -2372,7 +2942,7 @@ type SMReject struct { func (x *SMReject) Reset() { *x = SMReject{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[43] + mi := &file_cs_proto_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2385,7 +2955,7 @@ func (x *SMReject) String() string { func (*SMReject) ProtoMessage() {} func (x *SMReject) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[43] + mi := &file_cs_proto_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2398,7 +2968,7 @@ func (x *SMReject) ProtoReflect() protoreflect.Message { // Deprecated: Use SMReject.ProtoReflect.Descriptor instead. func (*SMReject) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{43} + return file_cs_proto_proto_rawDescGZIP(), []int{53} } func (x *SMReject) GetErrMsg() string { @@ -2420,7 +2990,7 @@ type CMLeaveGuild struct { func (x *CMLeaveGuild) Reset() { *x = CMLeaveGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[44] + mi := &file_cs_proto_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2433,7 +3003,7 @@ func (x *CMLeaveGuild) String() string { func (*CMLeaveGuild) ProtoMessage() {} func (x *CMLeaveGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[44] + mi := &file_cs_proto_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2446,7 +3016,7 @@ func (x *CMLeaveGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use CMLeaveGuild.ProtoReflect.Descriptor instead. func (*CMLeaveGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{44} + return file_cs_proto_proto_rawDescGZIP(), []int{54} } func (x *CMLeaveGuild) GetGuildId() int64 { @@ -2468,7 +3038,7 @@ type SMLeaveGuild struct { func (x *SMLeaveGuild) Reset() { *x = SMLeaveGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[45] + mi := &file_cs_proto_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2481,7 +3051,7 @@ func (x *SMLeaveGuild) String() string { func (*SMLeaveGuild) ProtoMessage() {} func (x *SMLeaveGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[45] + mi := &file_cs_proto_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2494,7 +3064,7 @@ func (x *SMLeaveGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use SMLeaveGuild.ProtoReflect.Descriptor instead. func (*SMLeaveGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{45} + return file_cs_proto_proto_rawDescGZIP(), []int{55} } func (x *SMLeaveGuild) GetErrMsg() string { @@ -2517,7 +3087,7 @@ type CMDismissMember struct { func (x *CMDismissMember) Reset() { *x = CMDismissMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[46] + mi := &file_cs_proto_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2530,7 +3100,7 @@ func (x *CMDismissMember) String() string { func (*CMDismissMember) ProtoMessage() {} func (x *CMDismissMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[46] + mi := &file_cs_proto_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2543,7 +3113,7 @@ func (x *CMDismissMember) ProtoReflect() protoreflect.Message { // Deprecated: Use CMDismissMember.ProtoReflect.Descriptor instead. func (*CMDismissMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{46} + return file_cs_proto_proto_rawDescGZIP(), []int{56} } func (x *CMDismissMember) GetGuildId() int64 { @@ -2572,7 +3142,7 @@ type SMDismissMember struct { func (x *SMDismissMember) Reset() { *x = SMDismissMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[47] + mi := &file_cs_proto_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2585,7 +3155,7 @@ func (x *SMDismissMember) String() string { func (*SMDismissMember) ProtoMessage() {} func (x *SMDismissMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[47] + mi := &file_cs_proto_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2598,7 +3168,7 @@ func (x *SMDismissMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SMDismissMember.ProtoReflect.Descriptor instead. func (*SMDismissMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{47} + return file_cs_proto_proto_rawDescGZIP(), []int{57} } func (x *SMDismissMember) GetErrMsg() string { @@ -2621,7 +3191,7 @@ type CMPromoteMember struct { func (x *CMPromoteMember) Reset() { *x = CMPromoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[48] + mi := &file_cs_proto_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2634,7 +3204,7 @@ func (x *CMPromoteMember) String() string { func (*CMPromoteMember) ProtoMessage() {} func (x *CMPromoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[48] + mi := &file_cs_proto_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2647,7 +3217,7 @@ func (x *CMPromoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use CMPromoteMember.ProtoReflect.Descriptor instead. func (*CMPromoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{48} + return file_cs_proto_proto_rawDescGZIP(), []int{58} } func (x *CMPromoteMember) GetGuildId() int64 { @@ -2676,7 +3246,7 @@ type SMPromoteMember struct { func (x *SMPromoteMember) Reset() { *x = SMPromoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[49] + mi := &file_cs_proto_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2689,7 +3259,7 @@ func (x *SMPromoteMember) String() string { func (*SMPromoteMember) ProtoMessage() {} func (x *SMPromoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[49] + mi := &file_cs_proto_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2702,7 +3272,7 @@ func (x *SMPromoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SMPromoteMember.ProtoReflect.Descriptor instead. func (*SMPromoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{49} + return file_cs_proto_proto_rawDescGZIP(), []int{59} } func (x *SMPromoteMember) GetErrMsg() string { @@ -2725,7 +3295,7 @@ type CMDemoteMember struct { func (x *CMDemoteMember) Reset() { *x = CMDemoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[50] + mi := &file_cs_proto_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2738,7 +3308,7 @@ func (x *CMDemoteMember) String() string { func (*CMDemoteMember) ProtoMessage() {} func (x *CMDemoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[50] + mi := &file_cs_proto_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2751,7 +3321,7 @@ func (x *CMDemoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use CMDemoteMember.ProtoReflect.Descriptor instead. func (*CMDemoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{50} + return file_cs_proto_proto_rawDescGZIP(), []int{60} } func (x *CMDemoteMember) GetGuildId() int64 { @@ -2780,7 +3350,7 @@ type SMDemoteMember struct { func (x *SMDemoteMember) Reset() { *x = SMDemoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[51] + mi := &file_cs_proto_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2793,7 +3363,7 @@ func (x *SMDemoteMember) String() string { func (*SMDemoteMember) ProtoMessage() {} func (x *SMDemoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[51] + mi := &file_cs_proto_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2806,7 +3376,7 @@ func (x *SMDemoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SMDemoteMember.ProtoReflect.Descriptor instead. func (*SMDemoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{51} + return file_cs_proto_proto_rawDescGZIP(), []int{61} } func (x *SMDemoteMember) GetErrMsg() string { @@ -2828,7 +3398,7 @@ type CMDisband struct { func (x *CMDisband) Reset() { *x = CMDisband{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[52] + mi := &file_cs_proto_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2841,7 +3411,7 @@ func (x *CMDisband) String() string { func (*CMDisband) ProtoMessage() {} func (x *CMDisband) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[52] + mi := &file_cs_proto_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2854,7 +3424,7 @@ func (x *CMDisband) ProtoReflect() protoreflect.Message { // Deprecated: Use CMDisband.ProtoReflect.Descriptor instead. func (*CMDisband) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{52} + return file_cs_proto_proto_rawDescGZIP(), []int{62} } func (x *CMDisband) GetGuildId() int64 { @@ -2876,7 +3446,7 @@ type SMDisband struct { func (x *SMDisband) Reset() { *x = SMDisband{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[53] + mi := &file_cs_proto_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2889,7 +3459,7 @@ func (x *SMDisband) String() string { func (*SMDisband) ProtoMessage() {} func (x *SMDisband) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[53] + mi := &file_cs_proto_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2902,7 +3472,7 @@ func (x *SMDisband) ProtoReflect() protoreflect.Message { // Deprecated: Use SMDisband.ProtoReflect.Descriptor instead. func (*SMDisband) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{53} + return file_cs_proto_proto_rawDescGZIP(), []int{63} } func (x *SMDisband) GetErrMsg() string { @@ -2924,7 +3494,7 @@ type CMSearchGuilds struct { func (x *CMSearchGuilds) Reset() { *x = CMSearchGuilds{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[54] + mi := &file_cs_proto_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2937,7 +3507,7 @@ func (x *CMSearchGuilds) String() string { func (*CMSearchGuilds) ProtoMessage() {} func (x *CMSearchGuilds) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[54] + mi := &file_cs_proto_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2950,7 +3520,7 @@ func (x *CMSearchGuilds) ProtoReflect() protoreflect.Message { // Deprecated: Use CMSearchGuilds.ProtoReflect.Descriptor instead. func (*CMSearchGuilds) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{54} + return file_cs_proto_proto_rawDescGZIP(), []int{64} } func (x *CMSearchGuilds) GetKeyword() string { @@ -2972,7 +3542,7 @@ type SMSearchGuilds struct { func (x *SMSearchGuilds) Reset() { *x = SMSearchGuilds{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[55] + mi := &file_cs_proto_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2985,7 +3555,7 @@ func (x *SMSearchGuilds) String() string { func (*SMSearchGuilds) ProtoMessage() {} func (x *SMSearchGuilds) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[55] + mi := &file_cs_proto_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2998,7 +3568,7 @@ func (x *SMSearchGuilds) ProtoReflect() protoreflect.Message { // Deprecated: Use SMSearchGuilds.ProtoReflect.Descriptor instead. func (*SMSearchGuilds) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{55} + return file_cs_proto_proto_rawDescGZIP(), []int{65} } func (x *SMSearchGuilds) GetGuilds() []*MFGuild { @@ -3023,7 +3593,7 @@ type MFGuild struct { func (x *MFGuild) Reset() { *x = MFGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[56] + mi := &file_cs_proto_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3036,7 +3606,7 @@ func (x *MFGuild) String() string { func (*MFGuild) ProtoMessage() {} func (x *MFGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[56] + mi := &file_cs_proto_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3049,7 +3619,7 @@ func (x *MFGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use MFGuild.ProtoReflect.Descriptor instead. func (*MFGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{56} + return file_cs_proto_proto_rawDescGZIP(), []int{66} } func (x *MFGuild) GetGuildId() int64 { @@ -3243,95 +3813,156 @@ var file_cs_proto_proto_rawDesc = []byte{ 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x43, 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, - 0x22, 0x62, 0x0a, 0x0b, 0x53, 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x21, 0x0a, 0x05, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x67, 0x75, 0x69, - 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x67, 0x75, 0x69, - 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, - 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x75, - 0x69, 0x6c, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x43, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x0d, 0x53, 0x4d, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, - 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, - 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2b, - 0x0a, 0x0e, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e, 0x53, - 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x09, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x72, - 0x6f, 0x76, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x30, - 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, - 0x22, 0x24, 0x0a, 0x09, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, - 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, - 0x23, 0x0a, 0x08, 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x65, - 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, - 0x72, 0x4d, 0x73, 0x67, 0x22, 0x29, 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, + 0x65, 0x22, 0xac, 0x01, 0x0a, 0x0d, 0x43, 0x4d, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, + 0x4d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, + 0x73, 0x67, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x73, 0x67, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x22, 0x68, 0x0a, 0x1a, 0x43, 0x4d, 0x52, 0x65, 0x61, 0x64, 0x4d, 0x73, 0x67, 0x41, 0x6e, 0x64, + 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x61, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x21, + 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x12, 0x27, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x50, 0x61, 0x69, 0x72, 0x36, + 0x34, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x73, 0x22, 0x61, 0x0a, 0x1a, 0x43, 0x4d, + 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x22, 0x13, 0x0a, + 0x11, 0x43, 0x4d, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x74, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x79, 0x22, 0x53, 0x0a, 0x1a, 0x53, 0x4d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x74, 0x52, 0x65, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, + 0x12, 0x35, 0x0a, 0x17, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, + 0x73, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x14, 0x68, 0x61, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x73, 0x67, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x3b, 0x0a, 0x0f, 0x53, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x28, 0x0a, 0x08, 0x6d, 0x73, + 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, + 0x73, 0x2e, 0x4d, 0x46, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x07, 0x6d, 0x73, 0x67, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x16, 0x53, 0x4d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x26, + 0x0a, 0x0f, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x64, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x5a, 0x0a, 0x21, 0x53, 0x4d, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x64, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x35, 0x0a, 0x17, 0x68, + 0x61, 0x73, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x68, 0x61, + 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x22, 0x44, 0x0a, 0x19, 0x53, 0x4d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x12, + 0x27, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x50, 0x61, 0x69, 0x72, 0x36, 0x34, 0x52, + 0x07, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x09, 0x4d, 0x46, 0x43, + 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x55, 0x75, 0x69, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, + 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x43, + 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x62, 0x0a, 0x0b, 0x53, 0x4d, + 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x05, 0x67, 0x75, 0x69, + 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, + 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x0d, + 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, + 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x22, 0x23, + 0x0a, 0x0d, 0x43, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x0d, 0x53, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, - 0x27, 0x0a, 0x0c, 0x53, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2b, 0x0a, 0x0e, 0x43, 0x4d, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, + 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, + 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, + 0x22, 0x58, 0x0a, 0x09, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x09, 0x53, 0x4d, + 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, + 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, + 0x22, 0x57, 0x0a, 0x08, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x08, 0x53, 0x4d, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x29, + 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x27, 0x0a, 0x0c, 0x53, 0x4d, 0x4c, + 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, + 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, + 0x73, 0x67, 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, + 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x69, 0x73, 0x6d, + 0x69, 0x73, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, + 0x53, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x4d, 0x44, 0x69, - 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x4d, 0x50, 0x72, + 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, - 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, - 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, + 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, - 0x0a, 0x0f, 0x43, 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, - 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x4d, 0x50, 0x72, - 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, - 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, - 0x72, 0x4d, 0x73, 0x67, 0x22, 0x55, 0x0a, 0x0e, 0x43, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e, 0x53, - 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x26, 0x0a, 0x09, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x62, - 0x61, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x24, - 0x0a, 0x09, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, - 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, - 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2a, 0x0a, 0x0e, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, - 0x22, 0x35, 0x0a, 0x0e, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, - 0x64, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, - 0x06, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x07, 0x4d, 0x46, 0x47, 0x75, - 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, - 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2a, 0x22, 0x0a, 0x0a, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x65, 0x12, 0x14, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0xd1, 0xa2, 0xd5, 0xc4, 0x07, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x63, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x55, + 0x0a, 0x0e, 0x43, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e, 0x53, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, + 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, + 0x22, 0x26, 0x0a, 0x09, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x09, 0x53, 0x4d, 0x44, 0x69, + 0x73, 0x62, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2a, + 0x0a, 0x0e, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x35, 0x0a, 0x0e, 0x53, 0x4d, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x06, + 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, + 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x06, 0x67, 0x75, 0x69, 0x6c, 0x64, + 0x73, 0x22, 0x90, 0x01, 0x0a, 0x07, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x2a, 0x22, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x5f, 0x65, 0x12, 0x14, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x10, 0xd1, 0xa2, 0xd5, 0xc4, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x63, 0x73, } var ( @@ -3347,78 +3978,91 @@ func file_cs_proto_proto_rawDescGZIP() []byte { } var file_cs_proto_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cs_proto_proto_msgTypes = make([]protoimpl.MessageInfo, 57) +var file_cs_proto_proto_msgTypes = make([]protoimpl.MessageInfo, 67) var file_cs_proto_proto_goTypes = []interface{}{ - (ConstantE)(0), // 0: cs.Constant_e - (*CMPing)(nil), // 1: cs.CMPing - (*SMPing)(nil), // 2: cs.SMPing - (*SMRpcError)(nil), // 3: cs.SMRpcError - (*MFPair)(nil), // 4: cs.MFPair - (*MFPair64)(nil), // 5: cs.MFPair64 - (*MFTuple)(nil), // 6: cs.MFTuple - (*MFTupleString)(nil), // 7: cs.MFTupleString - (*CMLogin)(nil), // 8: cs.CMLogin - (*SMLogin)(nil), // 9: cs.SMLogin - (*CMReconnect)(nil), // 10: cs.CMReconnect - (*SMReconnect)(nil), // 11: cs.SMReconnect - (*CMFriendInfo)(nil), // 12: cs.CMFriendInfo - (*SMFriendInfo)(nil), // 13: cs.SMFriendInfo - (*CMSearchUser)(nil), // 14: cs.CMSearchUser - (*SMSearchUser)(nil), // 15: cs.SMSearchUser - (*CMSearchUserByAccountId)(nil), // 16: cs.CMSearchUserByAccountId - (*SMSearchUserByAccountId)(nil), // 17: cs.SMSearchUserByAccountId - (*CMAddFriendRequest)(nil), // 18: cs.CMAddFriendRequest - (*SMAddFriendRequest)(nil), // 19: cs.SMAddFriendRequest - (*CMAcceptFriendRequest)(nil), // 20: cs.CMAcceptFriendRequest - (*SMAcceptFriendRequest)(nil), // 21: cs.SMAcceptFriendRequest - (*CMRejectFriendRequest)(nil), // 22: cs.CMRejectFriendRequest - (*SMRejectFriendRequest)(nil), // 23: cs.SMRejectFriendRequest - (*CMListPendingFriendRequest)(nil), // 24: cs.CMListPendingFriendRequest - (*SMListPendingFriendRequest)(nil), // 25: cs.SMListPendingFriendRequest - (*CMListFriend)(nil), // 26: cs.CMListFriend - (*SMListFriend)(nil), // 27: cs.SMListFriend - (*CMDeleteFriendShip)(nil), // 28: cs.CMDeleteFriendShip - (*SMDeleteFriendShip)(nil), // 29: cs.SMDeleteFriendShip - (*CMAddBlacklist)(nil), // 30: cs.CMAddBlacklist - (*SMAddBlacklist)(nil), // 31: cs.SMAddBlacklist - (*CMRemoveBlacklist)(nil), // 32: cs.CMRemoveBlacklist - (*SMRemoveBlacklist)(nil), // 33: cs.SMRemoveBlacklist - (*MFUser)(nil), // 34: cs.MFUser - (*CMGuildInfo)(nil), // 35: cs.CMGuildInfo - (*SMGuildInfo)(nil), // 36: cs.SMGuildInfo - (*CMCreateGuild)(nil), // 37: cs.CMCreateGuild - (*SMCreateGuild)(nil), // 38: cs.SMCreateGuild - (*CMApplyToGuild)(nil), // 39: cs.CMApplyToGuild - (*SMApplyToGuild)(nil), // 40: cs.SMApplyToGuild - (*CMApprove)(nil), // 41: cs.CMApprove - (*SMApprove)(nil), // 42: cs.SMApprove - (*CMReject)(nil), // 43: cs.CMReject - (*SMReject)(nil), // 44: cs.SMReject - (*CMLeaveGuild)(nil), // 45: cs.CMLeaveGuild - (*SMLeaveGuild)(nil), // 46: cs.SMLeaveGuild - (*CMDismissMember)(nil), // 47: cs.CMDismissMember - (*SMDismissMember)(nil), // 48: cs.SMDismissMember - (*CMPromoteMember)(nil), // 49: cs.CMPromoteMember - (*SMPromoteMember)(nil), // 50: cs.SMPromoteMember - (*CMDemoteMember)(nil), // 51: cs.CMDemoteMember - (*SMDemoteMember)(nil), // 52: cs.SMDemoteMember - (*CMDisband)(nil), // 53: cs.CMDisband - (*SMDisband)(nil), // 54: cs.SMDisband - (*CMSearchGuilds)(nil), // 55: cs.CMSearchGuilds - (*SMSearchGuilds)(nil), // 56: cs.SMSearchGuilds - (*MFGuild)(nil), // 57: cs.MFGuild + (ConstantE)(0), // 0: cs.Constant_e + (*CMPing)(nil), // 1: cs.CMPing + (*SMPing)(nil), // 2: cs.SMPing + (*SMRpcError)(nil), // 3: cs.SMRpcError + (*MFPair)(nil), // 4: cs.MFPair + (*MFPair64)(nil), // 5: cs.MFPair64 + (*MFTuple)(nil), // 6: cs.MFTuple + (*MFTupleString)(nil), // 7: cs.MFTupleString + (*CMLogin)(nil), // 8: cs.CMLogin + (*SMLogin)(nil), // 9: cs.SMLogin + (*CMReconnect)(nil), // 10: cs.CMReconnect + (*SMReconnect)(nil), // 11: cs.SMReconnect + (*CMFriendInfo)(nil), // 12: cs.CMFriendInfo + (*SMFriendInfo)(nil), // 13: cs.SMFriendInfo + (*CMSearchUser)(nil), // 14: cs.CMSearchUser + (*SMSearchUser)(nil), // 15: cs.SMSearchUser + (*CMSearchUserByAccountId)(nil), // 16: cs.CMSearchUserByAccountId + (*SMSearchUserByAccountId)(nil), // 17: cs.SMSearchUserByAccountId + (*CMAddFriendRequest)(nil), // 18: cs.CMAddFriendRequest + (*SMAddFriendRequest)(nil), // 19: cs.SMAddFriendRequest + (*CMAcceptFriendRequest)(nil), // 20: cs.CMAcceptFriendRequest + (*SMAcceptFriendRequest)(nil), // 21: cs.SMAcceptFriendRequest + (*CMRejectFriendRequest)(nil), // 22: cs.CMRejectFriendRequest + (*SMRejectFriendRequest)(nil), // 23: cs.SMRejectFriendRequest + (*CMListPendingFriendRequest)(nil), // 24: cs.CMListPendingFriendRequest + (*SMListPendingFriendRequest)(nil), // 25: cs.SMListPendingFriendRequest + (*CMListFriend)(nil), // 26: cs.CMListFriend + (*SMListFriend)(nil), // 27: cs.SMListFriend + (*CMDeleteFriendShip)(nil), // 28: cs.CMDeleteFriendShip + (*SMDeleteFriendShip)(nil), // 29: cs.SMDeleteFriendShip + (*CMAddBlacklist)(nil), // 30: cs.CMAddBlacklist + (*SMAddBlacklist)(nil), // 31: cs.SMAddBlacklist + (*CMRemoveBlacklist)(nil), // 32: cs.CMRemoveBlacklist + (*SMRemoveBlacklist)(nil), // 33: cs.SMRemoveBlacklist + (*MFUser)(nil), // 34: cs.MFUser + (*CMSendChatMsg)(nil), // 35: cs.CMSendChatMsg + (*CMReadMsgAndOpenChatNotify)(nil), // 36: cs.CMReadMsgAndOpenChatNotify + (*CMSetCurrPrivateChatTarget)(nil), // 37: cs.CMSetCurrPrivateChatTarget + (*CMCloseChatNotify)(nil), // 38: cs.CMCloseChatNotify + (*SMUpdateChatRedPointNotify)(nil), // 39: cs.SMUpdateChatRedPointNotify + (*SMChatMsgNotify)(nil), // 40: cs.SMChatMsgNotify + (*SMUpdateRedPointNotify)(nil), // 41: cs.SMUpdateRedPointNotify + (*SMUpdatePrivateChatRedPointNotify)(nil), // 42: cs.SMUpdatePrivateChatRedPointNotify + (*SMUpdateChatChannelLastId)(nil), // 43: cs.SMUpdateChatChannelLastId + (*MFChatMsg)(nil), // 44: cs.MFChatMsg + (*CMGuildInfo)(nil), // 45: cs.CMGuildInfo + (*SMGuildInfo)(nil), // 46: cs.SMGuildInfo + (*CMCreateGuild)(nil), // 47: cs.CMCreateGuild + (*SMCreateGuild)(nil), // 48: cs.SMCreateGuild + (*CMApplyToGuild)(nil), // 49: cs.CMApplyToGuild + (*SMApplyToGuild)(nil), // 50: cs.SMApplyToGuild + (*CMApprove)(nil), // 51: cs.CMApprove + (*SMApprove)(nil), // 52: cs.SMApprove + (*CMReject)(nil), // 53: cs.CMReject + (*SMReject)(nil), // 54: cs.SMReject + (*CMLeaveGuild)(nil), // 55: cs.CMLeaveGuild + (*SMLeaveGuild)(nil), // 56: cs.SMLeaveGuild + (*CMDismissMember)(nil), // 57: cs.CMDismissMember + (*SMDismissMember)(nil), // 58: cs.SMDismissMember + (*CMPromoteMember)(nil), // 59: cs.CMPromoteMember + (*SMPromoteMember)(nil), // 60: cs.SMPromoteMember + (*CMDemoteMember)(nil), // 61: cs.CMDemoteMember + (*SMDemoteMember)(nil), // 62: cs.SMDemoteMember + (*CMDisband)(nil), // 63: cs.CMDisband + (*SMDisband)(nil), // 64: cs.SMDisband + (*CMSearchGuilds)(nil), // 65: cs.CMSearchGuilds + (*SMSearchGuilds)(nil), // 66: cs.SMSearchGuilds + (*MFGuild)(nil), // 67: cs.MFGuild } var file_cs_proto_proto_depIdxs = []int32{ 34, // 0: cs.SMSearchUser.users:type_name -> cs.MFUser 34, // 1: cs.SMListFriend.users:type_name -> cs.MFUser - 57, // 2: cs.SMGuildInfo.guild:type_name -> cs.MFGuild - 57, // 3: cs.SMGuildInfo.random_guilds:type_name -> cs.MFGuild - 57, // 4: cs.SMSearchGuilds.guilds:type_name -> cs.MFGuild - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 5, // 2: cs.CMReadMsgAndOpenChatNotify.last_ids:type_name -> cs.MFPair64 + 44, // 3: cs.SMChatMsgNotify.msg_list:type_name -> cs.MFChatMsg + 5, // 4: cs.SMUpdateChatChannelLastId.last_ids:type_name -> cs.MFPair64 + 67, // 5: cs.SMGuildInfo.guild:type_name -> cs.MFGuild + 67, // 6: cs.SMGuildInfo.random_guilds:type_name -> cs.MFGuild + 67, // 7: cs.SMSearchGuilds.guilds:type_name -> cs.MFGuild + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cs_proto_proto_init() } @@ -3836,7 +4480,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMGuildInfo); i { + switch v := v.(*CMSendChatMsg); i { case 0: return &v.state case 1: @@ -3848,7 +4492,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMGuildInfo); i { + switch v := v.(*CMReadMsgAndOpenChatNotify); i { case 0: return &v.state case 1: @@ -3860,7 +4504,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMCreateGuild); i { + switch v := v.(*CMSetCurrPrivateChatTarget); i { case 0: return &v.state case 1: @@ -3872,7 +4516,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMCreateGuild); i { + switch v := v.(*CMCloseChatNotify); i { case 0: return &v.state case 1: @@ -3884,7 +4528,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMApplyToGuild); i { + switch v := v.(*SMUpdateChatRedPointNotify); i { case 0: return &v.state case 1: @@ -3896,7 +4540,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMApplyToGuild); i { + switch v := v.(*SMChatMsgNotify); i { case 0: return &v.state case 1: @@ -3908,7 +4552,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMApprove); i { + switch v := v.(*SMUpdateRedPointNotify); i { case 0: return &v.state case 1: @@ -3920,7 +4564,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMApprove); i { + switch v := v.(*SMUpdatePrivateChatRedPointNotify); i { case 0: return &v.state case 1: @@ -3932,7 +4576,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMReject); i { + switch v := v.(*SMUpdateChatChannelLastId); i { case 0: return &v.state case 1: @@ -3944,7 +4588,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMReject); i { + switch v := v.(*MFChatMsg); i { case 0: return &v.state case 1: @@ -3956,7 +4600,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMLeaveGuild); i { + switch v := v.(*CMGuildInfo); i { case 0: return &v.state case 1: @@ -3968,7 +4612,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMLeaveGuild); i { + switch v := v.(*SMGuildInfo); i { case 0: return &v.state case 1: @@ -3980,7 +4624,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMDismissMember); i { + switch v := v.(*CMCreateGuild); i { case 0: return &v.state case 1: @@ -3992,7 +4636,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMDismissMember); i { + switch v := v.(*SMCreateGuild); i { case 0: return &v.state case 1: @@ -4004,7 +4648,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMPromoteMember); i { + switch v := v.(*CMApplyToGuild); i { case 0: return &v.state case 1: @@ -4016,7 +4660,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMPromoteMember); i { + switch v := v.(*SMApplyToGuild); i { case 0: return &v.state case 1: @@ -4028,7 +4672,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMDemoteMember); i { + switch v := v.(*CMApprove); i { case 0: return &v.state case 1: @@ -4040,7 +4684,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMDemoteMember); i { + switch v := v.(*SMApprove); i { case 0: return &v.state case 1: @@ -4052,7 +4696,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMDisband); i { + switch v := v.(*CMReject); i { case 0: return &v.state case 1: @@ -4064,7 +4708,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMDisband); i { + switch v := v.(*SMReject); i { case 0: return &v.state case 1: @@ -4076,7 +4720,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMSearchGuilds); i { + switch v := v.(*CMLeaveGuild); i { case 0: return &v.state case 1: @@ -4088,7 +4732,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMSearchGuilds); i { + switch v := v.(*SMLeaveGuild); i { case 0: return &v.state case 1: @@ -4100,6 +4744,126 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMDismissMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMDismissMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMPromoteMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMPromoteMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMDemoteMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMDemoteMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMDisband); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMDisband); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMSearchGuilds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMSearchGuilds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MFGuild); i { case 0: return &v.state @@ -4118,7 +4882,7 @@ func file_cs_proto_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cs_proto_proto_rawDesc, NumEnums: 1, - NumMessages: 57, + NumMessages: 67, NumExtensions: 0, NumServices: 0, }, diff --git a/server/imserver/export.go b/server/imserver/export.go index 05a0c3b4..e13ab61e 100644 --- a/server/imserver/export.go +++ b/server/imserver/export.go @@ -9,3 +9,4 @@ var friendMgr = new(FriendsMgr) // var guildMgr = new(GuildMgr) var guildMgr = NewGuildMgr() +var chatMgr = NewChatMgr(playerMgr, friendMgr, guildMgr) diff --git a/server/imserver/friendsmgr.go b/server/imserver/friendsmgr.go index 3acbd6dc..fe0fa636 100644 --- a/server/imserver/friendsmgr.go +++ b/server/imserver/friendsmgr.go @@ -355,6 +355,29 @@ func PrintUsers(str string, userList []*User) { } } +func (fm *FriendsMgr) IsFriendShip(account1Id, Account2Id string) bool { + var found bool + for _, friendship := range fm.friendships[account1Id] { + if friendship.User1.AccountId == Account2Id || friendship.User2.AccountId == Account2Id { + return true + } + } + return found +} + +func (fm *FriendsMgr) GetFriendByAccountId(account1Id, Account2Id string) *User { + for _, friendship := range fm.friendships[account1Id] { + if friendship.User1.AccountId == Account2Id { + return friendship.User1 + } + + if friendship.User2.AccountId == Account2Id { + return friendship.User2 + } + } + return nil +} + func (fm *FriendsMgr) findFriendShipIndex(Account1Id, Account2Id string) int { // 通常 account1Id,指自己, account2Id 指对方 if _, exists := fm.friendships[Account1Id]; exists { diff --git a/server/imserver/guild.go b/server/imserver/guild.go index a83ee87d..dc94493a 100644 --- a/server/imserver/guild.go +++ b/server/imserver/guild.go @@ -80,3 +80,7 @@ func (g *Guild) RemoveMember(accountId string) error { return nil } + +func (g *Guild) GetGuildId() int64 { + return g.GuildId +} diff --git a/server/imserver/guilddbmgr.go b/server/imserver/guilddbmgr.go index 0fe21002..e2955267 100644 --- a/server/imserver/guilddbmgr.go +++ b/server/imserver/guilddbmgr.go @@ -145,7 +145,7 @@ func (gm *GuildMgr) loadGuildLogsFromDB() { } func (gm *GuildMgr) loadGuildLogsFromDBResult(err error, pagination *f5.Pagination) { if err != nil { - panic(err) + //panic(err) return } //total := pagination.Total diff --git a/server/imserver/guildmgr.go b/server/imserver/guildmgr.go index 73d104ba..8de55833 100644 --- a/server/imserver/guildmgr.go +++ b/server/imserver/guildmgr.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" "q5" - "time" ) const ( @@ -51,9 +50,9 @@ func (gm *GuildMgr) loadFromDB() { //// 加载公会日志 gm.loadGuildLogsFromDB() - for gm.loadedFlags != 0 { - time.Sleep(time.Millisecond * 1000) - } + //for gm.loadedFlags != 0 { + // time.Sleep(time.Millisecond * 1000) + //} } // CreateGuild 创建公会 @@ -504,6 +503,14 @@ func (gm *GuildMgr) checkJoinGuild(accountId string) (bool, error) { return false, nil } +func (gm *GuildMgr) GetGuildIdByAccountId(accountId string) int64 { + guild := gm.GetGuildByAccountId(accountId) + if guild != nil { + return guild.GuildId + } + return 0 +} + func containsSubstring(s, substr string) bool { return len(s) >= len(substr) && s[len(s)-len(substr):] == substr } diff --git a/server/imserver/player.go b/server/imserver/player.go index 1064302c..421ed124 100644 --- a/server/imserver/player.go +++ b/server/imserver/player.go @@ -3,14 +3,24 @@ package main import ( "cs" "f5" + proto "github.com/golang/protobuf/proto" "q5" ) type Player struct { cs.MsgHandlerImpl - socket f5.WspCliConn - accountId string - sessionId string + socket f5.WspCliConn + accountId string + sessionId string + chatChannel int + privateTargetAccountId string // 私聊对象 accountId + worldChannelLastId uint64 // 世界聊天 last id + guildChannelLastId uint64 // 公会聊天 last id + privateChatLastId uint64 // 私聊 last id +} + +func (p *Player) GetAccountId() string { + return p.accountId } // CMSearchUser 搜索用户 @@ -225,6 +235,61 @@ func (p *Player) CMFriendInfo(hdr *f5.MsgHdr, msg *cs.CMFriendInfo) { wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) } +// CMSendChatMsg 发送聊天消息 +func (p *Player) CMSendChatMsg(hdr *f5.MsgHdr, msg *cs.CMSendChatMsg) { + chatChannel := *msg.ChatChannel + if !IsValidChatChannel(chatChannel) { + return + } + switch chatChannel { + case kCCWorld: + chatMgr.ProcWorldChat(p, msg) + case kCCPrivate: + chatMgr.ProcPrivateChat(p, msg) + case kCCGuild: + chatMgr.ProcGuildChat(p, msg) + default: + return + } +} + +func (p *Player) SyncPrivateChatRedPoint() { + //rspMsg := &cs.SMDeleteFriendShip{} + msg := &cs.SMUpdatePrivateChatRedPointNotify{} + chatMgr.FillSMUpdatePrivateChatRedPointNotify(p, msg) +} + +// CMReadMsgAndOpenChatNotify 读取聊天消息列表并且开启聊天通知 +func (p *Player) CMReadMsgAndOpenChatNotify(hdr *f5.MsgHdr, msg *cs.CMReadMsgAndOpenChatNotify) { + chatChannel := *msg.CurrChannel + if !IsValidChatChannel(chatChannel) { + return + } + if chatChannel == kCCPrivate { + p.SyncPrivateChatRedPoint() + } +} + +// CMSetCurrPrivateChatTarget 设置当前私聊目标 +func (p *Player) CMSetCurrPrivateChatTarget(hdr *f5.MsgHdr, msg *cs.CMSetCurrPrivateChatTarget) { + p.privateTargetAccountId = msg.GetTargetAccountId() + chatMgr.SyncPrivateChatMsg(p) +} + +func (p *Player) MarkNewMsg() { + rspMsg := &cs.SMUpdateChatRedPointNotify{} + chatMgr.FillSMUpdateChatRedPointNotify(p, rspMsg) + p.SendMsg(rspMsg) +} + +func (p *Player) SendMsg(rspMsg proto.Message) { + wspListener.sendProxyMsg(p.socket.Conn, p.socket.SocketHandle, rspMsg) +} + +func IsValidChatChannel(chatChannel int32) bool { + return chatChannel > kCCBegin && chatChannel < kCCEnd +} + // CMGuildInfo 我的公会信息 func (p *Player) CMGuildInfo(hdr *f5.MsgHdr, msg *cs.CMGuildInfo) { rspMsg := new(cs.SMGuildInfo) @@ -423,3 +488,8 @@ func (p *Player) FillGuild(guilds []Guild) []*cs.MFGuild { } return resGuilds } + +func (p *Player) IncrPrivateChatLastId() uint64 { + p.privateChatLastId++ + return p.privateChatLastId +} diff --git a/server/imserver/playermgr.go b/server/imserver/playermgr.go index f30b5d15..5a10356a 100644 --- a/server/imserver/playermgr.go +++ b/server/imserver/playermgr.go @@ -143,6 +143,10 @@ func (this *PlayerMgr) reportServerState(masterIp string, masterPort int32) { }) } +func (this *PlayerMgr) GetPlayers() map[string]*Player { + return this.accountIdHash +} + func (this *PlayerMgr) addPlayer(p *Player) { this.accountIdHash[p.accountId] = p } diff --git a/server/imserver/proto/cs_msgid.proto b/server/imserver/proto/cs_msgid.proto index d0c7e373..37ddf3d7 100644 --- a/server/imserver/proto/cs_msgid.proto +++ b/server/imserver/proto/cs_msgid.proto @@ -22,6 +22,11 @@ enum CMMessageId_e _CMRemoveBlacklist = 114; _CMFriendInfo = 115; + // 聊天相关 + _CMSetCurrPrivateChatTarget = 200; + _CMSendChatMsg = 201; + + // 公会相关 _CMGuildInfo = 120; _CMCreateGuild = 121; @@ -67,4 +72,8 @@ enum SMMessageId_e _SMDemoteMember = 128; _SMDisband = 129; _SMSearchGuilds = 130; + + // 聊天相关 + _SMUpdateChatRedPointNotify = 200; + _SMChatMsgNotify = 201; } diff --git a/server/imserver/proto/cs_proto.proto b/server/imserver/proto/cs_proto.proto index 5cf7ddc5..2ba57b15 100644 --- a/server/imserver/proto/cs_proto.proto +++ b/server/imserver/proto/cs_proto.proto @@ -263,6 +263,82 @@ message MFUser { optional string username = 2; } +// --- 聊天 --- +// 发送聊天消息 +message CMSendChatMsg +{ + optional int32 chat_channel = 1; //聊天频道 1: 世界 2:好友 3:战队 4:小队(这时target表示队伍Id) 5:大喇叭 6:跑马灯(只能收不能发) + optional string targetAccountId = 2; //目标 + optional int32 msg_type = 3; ////消息类型 0:文本消息(json) 1:自定义协议 (json) 2:纯文本(但是任会做屏蔽字替换) + optional string msg_body = 4; //消息内容 + repeated string members = 5; //小队成员列表(包含自己) +} + +//读取聊天消息列表并且开启聊天通知 +message CMReadMsgAndOpenChatNotify +{ + optional int32 curr_channel = 1; //当前频道 + repeated MFPair64 last_ids = 2; //所有频道 key:聊天频道 val:该频道最后一次收到的消息id +} + +//设置当前私聊目标 +message CMSetCurrPrivateChatTarget +{ + optional string target_account_id = 1; //私聊对象id, 只有当前聊频道是私聊时字段才有意义 + optional int64 last_id = 2; //最后收到想消息id +} + +//关闭聊天通知 +message CMCloseChatNotify +{ +} + +//更新聊天红点信息 +message SMUpdateChatRedPointNotify +{ + repeated int32 has_unread_msg_channels = 1; //含有未读消息的渠道id列表,不在列表里的渠道默认不含有 +} + +message SMChatMsgNotify +{ + repeated MFChatMsg msg_list = 1; //消息列表,客户端需要根据chat_channel和msg_uuid更新本地的last_ids +} + +//更新红点信息 +message SMUpdateRedPointNotify +{ + optional int32 red_point_flags = 1; //红点信息 1<<0:好友申请 1<<1:公会申请 1<<2:聊天红点 +} + +//更新私聊红点信息 +message SMUpdatePrivateChatRedPointNotify +{ + repeated string has_unread_msg_accounts = 1; //有未读消息的账号列表,不在列表里的好友more不含有 +} + +//更新频道最后一次收到的消息id +message SMUpdateChatChannelLastId +{ + repeated MFPair64 last_ids = 1; //所有频道 key:聊天频道 val:该频道最后一次收到的消息id +} + +//聊天消息 +message MFChatMsg +{ + /* + 消息唯一id,递增序列,客户端可以用chat_channel + msg_uuid作为主键 + !!!不同的频道msg_uuid可能重复 + */ + optional uint64 msg_uuid = 1; + optional string sender = 2; //发送者 + optional string receiver = 3; //接收者 + optional int32 chat_channel = 4; //聊天频道 + optional int32 msg_type = 5; //消息类型 0:文本消息(json) 1:自定义协议 (json) 2:纯文本(但是任会做屏蔽字替换) + optional string msg_body = 6; //消息内容(json类型里的字段!开头的会做屏蔽替换) + optional int64 send_time = 7; //消息发送时间 +} + +// --- 公会 --- // 请求公会信息 message CMGuildInfo {