diff --git a/server/imserver/cs/cs.auto_gen.go b/server/imserver/cs/cs.auto_gen.go index 07e84a22..424f214b 100644 --- a/server/imserver/cs/cs.auto_gen.go +++ b/server/imserver/cs/cs.auto_gen.go @@ -38,12 +38,14 @@ type MsgHandler interface { CMPing(*f5.MsgHdr, *CMPing) CMLogin(*f5.MsgHdr, *CMLogin) CMReconnect(*f5.MsgHdr, *CMReconnect) - CMSearchFriend(*f5.MsgHdr, *CMSearchFriend) + CMSearchUser(*f5.MsgHdr, *CMSearchUser) + CMSearchUserByAccountId(*f5.MsgHdr, *CMSearchUserByAccountId) CMAddFriendRequest(*f5.MsgHdr, *CMAddFriendRequest) CMAcceptFriendRequest(*f5.MsgHdr, *CMAcceptFriendRequest) CMRejectFriendRequest(*f5.MsgHdr, *CMRejectFriendRequest) CMListPendingFriendRequest(*f5.MsgHdr, *CMListPendingFriendRequest) CMListFriend(*f5.MsgHdr, *CMListFriend) + CMDeleteFriendShip(*f5.MsgHdr, *CMDeleteFriendShip) } func (this *MsgHandlerImpl) CMPing(hdr *f5.MsgHdr, msg *CMPing) { @@ -55,7 +57,10 @@ func (this *MsgHandlerImpl) CMLogin(hdr *f5.MsgHdr, msg *CMLogin) { func (this *MsgHandlerImpl) CMReconnect(hdr *f5.MsgHdr, msg *CMReconnect) { } -func (this *MsgHandlerImpl) CMSearchFriend(hdr *f5.MsgHdr, msg *CMSearchFriend) { +func (this *MsgHandlerImpl) CMSearchUser(hdr *f5.MsgHdr, msg *CMSearchUser) { +} + +func (this *MsgHandlerImpl) CMSearchUserByAccountId(hdr *f5.MsgHdr, msg *CMSearchUserByAccountId) { } func (this *MsgHandlerImpl) CMAddFriendRequest(hdr *f5.MsgHdr, msg *CMAddFriendRequest) { @@ -73,6 +78,9 @@ func (this *MsgHandlerImpl) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *CMLi func (this *MsgHandlerImpl) CMListFriend(hdr *f5.MsgHdr, msg *CMListFriend) { } +func (this *MsgHandlerImpl) CMDeleteFriendShip(hdr *f5.MsgHdr, msg *CMDeleteFriendShip) { +} + func (this *CMPing) GetNetMsgId() uint16 { return uint16(CMMessageIdE__CMPing) } @@ -101,12 +109,20 @@ func (this *SMReconnect) GetNetMsgId() uint16 { return uint16(SMMessageIdE__SMReconnect) } -func (this *CMSearchFriend) GetNetMsgId() uint16 { - return uint16(CMMessageIdE__CMSearchFriend) +func (this *CMSearchUser) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMSearchUser) } -func (this *SMSearchFriend) GetNetMsgId() uint16 { - return uint16(SMMessageIdE__SMSearchFriend) +func (this *SMSearchUser) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMSearchUser) +} + +func (this *CMSearchUserByAccountId) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMSearchUserByAccountId) +} + +func (this *SMSearchUserByAccountId) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMSearchUserByAccountId) } func (this *CMAddFriendRequest) GetNetMsgId() uint16 { @@ -149,6 +165,14 @@ func (this *SMListFriend) GetNetMsgId() uint16 { return uint16(SMMessageIdE__SMListFriend) } +func (this *CMDeleteFriendShip) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMDeleteFriendShip) +} + +func (this *SMDeleteFriendShip) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMDeleteFriendShip) +} + func init() { handlers[int(CMMessageIdE__CMPing)] = &CsNetMsgHandler{ @@ -187,15 +211,27 @@ func init() { }, } - handlers[int(CMMessageIdE__CMSearchFriend)] = &CsNetMsgHandler{ - MsgId: int(CMMessageIdE__CMSearchFriend), + handlers[int(CMMessageIdE__CMSearchUser)] = &CsNetMsgHandler{ + MsgId: int(CMMessageIdE__CMSearchUser), ParseCb: func (data []byte) interface{} { - msg := &CMSearchFriend{} + msg := &CMSearchUser{} proto.Unmarshal(data, msg) return msg }, Cb: func (hdr *f5.MsgHdr, handler MsgHandler) { - handler.CMSearchFriend(hdr, hdr.Msg.(*CMSearchFriend)) + handler.CMSearchUser(hdr, hdr.Msg.(*CMSearchUser)) + }, + } + + handlers[int(CMMessageIdE__CMSearchUserByAccountId)] = &CsNetMsgHandler{ + MsgId: int(CMMessageIdE__CMSearchUserByAccountId), + ParseCb: func (data []byte) interface{} { + msg := &CMSearchUserByAccountId{} + proto.Unmarshal(data, msg) + return msg + }, + Cb: func (hdr *f5.MsgHdr, handler MsgHandler) { + handler.CMSearchUserByAccountId(hdr, hdr.Msg.(*CMSearchUserByAccountId)) }, } @@ -259,4 +295,16 @@ func init() { }, } + handlers[int(CMMessageIdE__CMDeleteFriendShip)] = &CsNetMsgHandler{ + MsgId: int(CMMessageIdE__CMDeleteFriendShip), + ParseCb: func (data []byte) interface{} { + msg := &CMDeleteFriendShip{} + proto.Unmarshal(data, msg) + return msg + }, + Cb: func (hdr *f5.MsgHdr, handler MsgHandler) { + handler.CMDeleteFriendShip(hdr, hdr.Msg.(*CMDeleteFriendShip)) + }, + } + } \ No newline at end of file diff --git a/server/imserver/cs/cs_msgid.pb.go b/server/imserver/cs/cs_msgid.pb.go index 46d8964c..5def06b9 100644 --- a/server/imserver/cs/cs_msgid.pb.go +++ b/server/imserver/cs/cs_msgid.pb.go @@ -27,12 +27,14 @@ const ( CMMessageIdE__CMPing CMMessageIdE = 101 CMMessageIdE__CMLogin CMMessageIdE = 103 CMMessageIdE__CMReconnect CMMessageIdE = 104 - CMMessageIdE__CMSearchFriend CMMessageIdE = 105 - CMMessageIdE__CMAddFriendRequest CMMessageIdE = 106 - CMMessageIdE__CMAcceptFriendRequest CMMessageIdE = 107 - CMMessageIdE__CMRejectFriendRequest CMMessageIdE = 108 - CMMessageIdE__CMListPendingFriendRequest CMMessageIdE = 109 - CMMessageIdE__CMListFriend CMMessageIdE = 110 + CMMessageIdE__CMSearchUserByAccountId CMMessageIdE = 105 + CMMessageIdE__CMSearchUser CMMessageIdE = 106 + CMMessageIdE__CMAddFriendRequest CMMessageIdE = 107 + CMMessageIdE__CMAcceptFriendRequest CMMessageIdE = 108 + CMMessageIdE__CMRejectFriendRequest CMMessageIdE = 109 + CMMessageIdE__CMListPendingFriendRequest CMMessageIdE = 110 + CMMessageIdE__CMListFriend CMMessageIdE = 111 + CMMessageIdE__CMDeleteFriendShip CMMessageIdE = 112 ) // Enum value maps for CMMessageIdE. @@ -41,23 +43,27 @@ var ( 101: "_CMPing", 103: "_CMLogin", 104: "_CMReconnect", - 105: "_CMSearchFriend", - 106: "_CMAddFriendRequest", - 107: "_CMAcceptFriendRequest", - 108: "_CMRejectFriendRequest", - 109: "_CMListPendingFriendRequest", - 110: "_CMListFriend", + 105: "_CMSearchUserByAccountId", + 106: "_CMSearchUser", + 107: "_CMAddFriendRequest", + 108: "_CMAcceptFriendRequest", + 109: "_CMRejectFriendRequest", + 110: "_CMListPendingFriendRequest", + 111: "_CMListFriend", + 112: "_CMDeleteFriendShip", } CMMessageIdE_value = map[string]int32{ "_CMPing": 101, "_CMLogin": 103, "_CMReconnect": 104, - "_CMSearchFriend": 105, - "_CMAddFriendRequest": 106, - "_CMAcceptFriendRequest": 107, - "_CMRejectFriendRequest": 108, - "_CMListPendingFriendRequest": 109, - "_CMListFriend": 110, + "_CMSearchUserByAccountId": 105, + "_CMSearchUser": 106, + "_CMAddFriendRequest": 107, + "_CMAcceptFriendRequest": 108, + "_CMRejectFriendRequest": 109, + "_CMListPendingFriendRequest": 110, + "_CMListFriend": 111, + "_CMDeleteFriendShip": 112, } ) @@ -105,12 +111,14 @@ const ( SMMessageIdE__SMRpcError SMMessageIdE = 102 SMMessageIdE__SMLogin SMMessageIdE = 103 SMMessageIdE__SMReconnect SMMessageIdE = 104 - SMMessageIdE__SMSearchFriend SMMessageIdE = 105 - SMMessageIdE__SMAddFriendRequest SMMessageIdE = 106 - SMMessageIdE__SMAcceptFriendRequest SMMessageIdE = 107 - SMMessageIdE__SMRejectFriendRequest SMMessageIdE = 108 - SMMessageIdE__SMListPendingFriendRequest SMMessageIdE = 109 - SMMessageIdE__SMListFriend SMMessageIdE = 110 + SMMessageIdE__SMSearchUserByAccountId SMMessageIdE = 105 + SMMessageIdE__SMSearchUser SMMessageIdE = 106 + SMMessageIdE__SMAddFriendRequest SMMessageIdE = 107 + SMMessageIdE__SMAcceptFriendRequest SMMessageIdE = 108 + SMMessageIdE__SMRejectFriendRequest SMMessageIdE = 109 + SMMessageIdE__SMListPendingFriendRequest SMMessageIdE = 110 + SMMessageIdE__SMListFriend SMMessageIdE = 111 + SMMessageIdE__SMDeleteFriendShip SMMessageIdE = 112 ) // Enum value maps for SMMessageIdE. @@ -120,24 +128,28 @@ var ( 102: "_SMRpcError", 103: "_SMLogin", 104: "_SMReconnect", - 105: "_SMSearchFriend", - 106: "_SMAddFriendRequest", - 107: "_SMAcceptFriendRequest", - 108: "_SMRejectFriendRequest", - 109: "_SMListPendingFriendRequest", - 110: "_SMListFriend", + 105: "_SMSearchUserByAccountId", + 106: "_SMSearchUser", + 107: "_SMAddFriendRequest", + 108: "_SMAcceptFriendRequest", + 109: "_SMRejectFriendRequest", + 110: "_SMListPendingFriendRequest", + 111: "_SMListFriend", + 112: "_SMDeleteFriendShip", } SMMessageIdE_value = map[string]int32{ "_SMPing": 101, "_SMRpcError": 102, "_SMLogin": 103, "_SMReconnect": 104, - "_SMSearchFriend": 105, - "_SMAddFriendRequest": 106, - "_SMAcceptFriendRequest": 107, - "_SMRejectFriendRequest": 108, - "_SMListPendingFriendRequest": 109, - "_SMListFriend": 110, + "_SMSearchUserByAccountId": 105, + "_SMSearchUser": 106, + "_SMAddFriendRequest": 107, + "_SMAcceptFriendRequest": 108, + "_SMRejectFriendRequest": 109, + "_SMListPendingFriendRequest": 110, + "_SMListFriend": 111, + "_SMDeleteFriendShip": 112, } ) @@ -182,35 +194,42 @@ 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, 0xd6, 0x01, 0x0a, 0x0d, 0x43, 0x4d, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x12, 0x02, 0x63, 0x73, 0x2a, 0x8b, 0x02, 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, - 0x74, 0x10, 0x68, 0x12, 0x13, 0x0a, 0x0f, 0x5f, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x69, 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x43, 0x4d, 0x41, - 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, - 0x6a, 0x12, 0x1a, 0x0a, 0x16, 0x5f, 0x43, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, + 0x74, 0x10, 0x68, 0x12, 0x1c, 0x0a, 0x18, 0x5f, 0x43, 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, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, + 0x65, 0x72, 0x10, 0x6a, 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x43, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6b, 0x12, 0x1a, 0x0a, - 0x16, 0x5f, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6c, 0x12, 0x1f, 0x0a, 0x1b, 0x5f, 0x43, 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, 0x6d, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x43, - 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x6e, 0x2a, 0xe7, 0x01, - 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, 0x13, 0x0a, - 0x0f, 0x5f, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x10, 0x69, 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x53, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6a, 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, 0x6b, 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, 0x6c, 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, 0x6d, 0x12, 0x11, 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x63, 0x73, + 0x16, 0x5f, 0x43, 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, 0x43, 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, 0x43, 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, 0x43, 0x4d, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x6f, 0x12, 0x17, 0x0a, 0x13, 0x5f, 0x43, 0x4d, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, + 0x10, 0x70, 0x2a, 0x9c, 0x02, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x63, 0x73, } var ( diff --git a/server/imserver/cs/cs_proto.pb.go b/server/imserver/cs/cs_proto.pb.go index a1d98749..8292c6dc 100644 --- a/server/imserver/cs/cs_proto.pb.go +++ b/server/imserver/cs/cs_proto.pb.go @@ -750,7 +750,7 @@ func (x *SMReconnect) GetErrmsg() string { } // 请求搜索用户 -type CMSearchFriend struct { +type CMSearchUser struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -758,8 +758,8 @@ type CMSearchFriend struct { SearchKeyword *string `protobuf:"bytes,1,opt,name=search_keyword,json=searchKeyword" json:"search_keyword,omitempty"` //搜索文本关键字 } -func (x *CMSearchFriend) Reset() { - *x = CMSearchFriend{} +func (x *CMSearchUser) Reset() { + *x = CMSearchUser{} if protoimpl.UnsafeEnabled { mi := &file_cs_proto_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -767,13 +767,13 @@ func (x *CMSearchFriend) Reset() { } } -func (x *CMSearchFriend) String() string { +func (x *CMSearchUser) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CMSearchFriend) ProtoMessage() {} +func (*CMSearchUser) ProtoMessage() {} -func (x *CMSearchFriend) ProtoReflect() protoreflect.Message { +func (x *CMSearchUser) ProtoReflect() protoreflect.Message { mi := &file_cs_proto_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -785,12 +785,12 @@ func (x *CMSearchFriend) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CMSearchFriend.ProtoReflect.Descriptor instead. -func (*CMSearchFriend) Descriptor() ([]byte, []int) { +// Deprecated: Use CMSearchUser.ProtoReflect.Descriptor instead. +func (*CMSearchUser) Descriptor() ([]byte, []int) { return file_cs_proto_proto_rawDescGZIP(), []int{11} } -func (x *CMSearchFriend) GetSearchKeyword() string { +func (x *CMSearchUser) GetSearchKeyword() string { if x != nil && x.SearchKeyword != nil { return *x.SearchKeyword } @@ -798,16 +798,16 @@ func (x *CMSearchFriend) GetSearchKeyword() string { } // 回复搜索用户 -type SMSearchFriend struct { +type SMSearchUser struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Friends []*MFFriend `protobuf:"bytes,1,rep,name=friends" json:"friends,omitempty"` + Users []*MFUser `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"` } -func (x *SMSearchFriend) Reset() { - *x = SMSearchFriend{} +func (x *SMSearchUser) Reset() { + *x = SMSearchUser{} if protoimpl.UnsafeEnabled { mi := &file_cs_proto_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -815,13 +815,13 @@ func (x *SMSearchFriend) Reset() { } } -func (x *SMSearchFriend) String() string { +func (x *SMSearchUser) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SMSearchFriend) ProtoMessage() {} +func (*SMSearchUser) ProtoMessage() {} -func (x *SMSearchFriend) ProtoReflect() protoreflect.Message { +func (x *SMSearchUser) ProtoReflect() protoreflect.Message { mi := &file_cs_proto_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -833,18 +833,122 @@ func (x *SMSearchFriend) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SMSearchFriend.ProtoReflect.Descriptor instead. -func (*SMSearchFriend) Descriptor() ([]byte, []int) { +// Deprecated: Use SMSearchUser.ProtoReflect.Descriptor instead. +func (*SMSearchUser) Descriptor() ([]byte, []int) { return file_cs_proto_proto_rawDescGZIP(), []int{12} } -func (x *SMSearchFriend) GetFriends() []*MFFriend { +func (x *SMSearchUser) GetUsers() []*MFUser { if x != nil { - return x.Friends + return x.Users } return nil } +// 请求搜索用户 CMSearchUserByAccountId +type CMSearchUserByAccountId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SearchKeyword *string `protobuf:"bytes,1,opt,name=search_keyword,json=searchKeyword" json:"search_keyword,omitempty"` //搜索account id +} + +func (x *CMSearchUserByAccountId) Reset() { + *x = CMSearchUserByAccountId{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CMSearchUserByAccountId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CMSearchUserByAccountId) ProtoMessage() {} + +func (x *CMSearchUserByAccountId) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[13] + 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 CMSearchUserByAccountId.ProtoReflect.Descriptor instead. +func (*CMSearchUserByAccountId) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{13} +} + +func (x *CMSearchUserByAccountId) GetSearchKeyword() string { + if x != nil && x.SearchKeyword != nil { + return *x.SearchKeyword + } + return "" +} + +// 回复搜索用户 +type SMSearchUserByAccountId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountId *string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"` + Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` +} + +func (x *SMSearchUserByAccountId) Reset() { + *x = SMSearchUserByAccountId{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMSearchUserByAccountId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMSearchUserByAccountId) ProtoMessage() {} + +func (x *SMSearchUserByAccountId) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[14] + 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 SMSearchUserByAccountId.ProtoReflect.Descriptor instead. +func (*SMSearchUserByAccountId) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{14} +} + +func (x *SMSearchUserByAccountId) GetAccountId() string { + if x != nil && x.AccountId != nil { + return *x.AccountId + } + return "" +} + +func (x *SMSearchUserByAccountId) GetUsername() string { + if x != nil && x.Username != nil { + return *x.Username + } + return "" +} + // 请求发送添加好友请求 type CMAddFriendRequest struct { state protoimpl.MessageState @@ -857,7 +961,7 @@ type CMAddFriendRequest struct { func (x *CMAddFriendRequest) Reset() { *x = CMAddFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[13] + mi := &file_cs_proto_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -870,7 +974,7 @@ func (x *CMAddFriendRequest) String() string { func (*CMAddFriendRequest) ProtoMessage() {} func (x *CMAddFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[13] + mi := &file_cs_proto_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -883,7 +987,7 @@ func (x *CMAddFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CMAddFriendRequest.ProtoReflect.Descriptor instead. func (*CMAddFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{13} + return file_cs_proto_proto_rawDescGZIP(), []int{15} } func (x *CMAddFriendRequest) GetTargetAccountId() string { @@ -906,7 +1010,7 @@ type SMAddFriendRequest struct { func (x *SMAddFriendRequest) Reset() { *x = SMAddFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[14] + mi := &file_cs_proto_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -919,7 +1023,7 @@ func (x *SMAddFriendRequest) String() string { func (*SMAddFriendRequest) ProtoMessage() {} func (x *SMAddFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[14] + mi := &file_cs_proto_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -932,7 +1036,7 @@ func (x *SMAddFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SMAddFriendRequest.ProtoReflect.Descriptor instead. func (*SMAddFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{14} + return file_cs_proto_proto_rawDescGZIP(), []int{16} } func (x *SMAddFriendRequest) GetReason() string { @@ -961,7 +1065,7 @@ type CMAcceptFriendRequest struct { func (x *CMAcceptFriendRequest) Reset() { *x = CMAcceptFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[15] + mi := &file_cs_proto_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -974,7 +1078,7 @@ func (x *CMAcceptFriendRequest) String() string { func (*CMAcceptFriendRequest) ProtoMessage() {} func (x *CMAcceptFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[15] + mi := &file_cs_proto_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -987,7 +1091,7 @@ func (x *CMAcceptFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CMAcceptFriendRequest.ProtoReflect.Descriptor instead. func (*CMAcceptFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{15} + return file_cs_proto_proto_rawDescGZIP(), []int{17} } func (x *CMAcceptFriendRequest) GetTargetAccountId() string { @@ -1010,7 +1114,7 @@ type SMAcceptFriendRequest struct { func (x *SMAcceptFriendRequest) Reset() { *x = SMAcceptFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[16] + mi := &file_cs_proto_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1023,7 +1127,7 @@ func (x *SMAcceptFriendRequest) String() string { func (*SMAcceptFriendRequest) ProtoMessage() {} func (x *SMAcceptFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[16] + mi := &file_cs_proto_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1036,7 +1140,7 @@ func (x *SMAcceptFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SMAcceptFriendRequest.ProtoReflect.Descriptor instead. func (*SMAcceptFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{16} + return file_cs_proto_proto_rawDescGZIP(), []int{18} } func (x *SMAcceptFriendRequest) GetReason() string { @@ -1065,7 +1169,7 @@ type CMRejectFriendRequest struct { func (x *CMRejectFriendRequest) Reset() { *x = CMRejectFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[17] + mi := &file_cs_proto_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1078,7 +1182,7 @@ func (x *CMRejectFriendRequest) String() string { func (*CMRejectFriendRequest) ProtoMessage() {} func (x *CMRejectFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[17] + mi := &file_cs_proto_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1091,7 +1195,7 @@ func (x *CMRejectFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CMRejectFriendRequest.ProtoReflect.Descriptor instead. func (*CMRejectFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{17} + return file_cs_proto_proto_rawDescGZIP(), []int{19} } func (x *CMRejectFriendRequest) GetTargetAccountId() string { @@ -1114,7 +1218,7 @@ type SMRejectFriendRequest struct { func (x *SMRejectFriendRequest) Reset() { *x = SMRejectFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[18] + mi := &file_cs_proto_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1127,7 +1231,7 @@ func (x *SMRejectFriendRequest) String() string { func (*SMRejectFriendRequest) ProtoMessage() {} func (x *SMRejectFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[18] + mi := &file_cs_proto_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1140,7 +1244,7 @@ func (x *SMRejectFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SMRejectFriendRequest.ProtoReflect.Descriptor instead. func (*SMRejectFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{18} + return file_cs_proto_proto_rawDescGZIP(), []int{20} } func (x *SMRejectFriendRequest) GetReason() string { @@ -1167,7 +1271,7 @@ type CMListPendingFriendRequest struct { func (x *CMListPendingFriendRequest) Reset() { *x = CMListPendingFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[19] + mi := &file_cs_proto_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1180,7 +1284,7 @@ func (x *CMListPendingFriendRequest) String() string { func (*CMListPendingFriendRequest) ProtoMessage() {} func (x *CMListPendingFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[19] + mi := &file_cs_proto_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1193,7 +1297,7 @@ func (x *CMListPendingFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CMListPendingFriendRequest.ProtoReflect.Descriptor instead. func (*CMListPendingFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{19} + return file_cs_proto_proto_rawDescGZIP(), []int{21} } // 回复等待验证的好友请求 @@ -1208,7 +1312,7 @@ type SMListPendingFriendRequest struct { func (x *SMListPendingFriendRequest) Reset() { *x = SMListPendingFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[20] + mi := &file_cs_proto_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1221,7 +1325,7 @@ func (x *SMListPendingFriendRequest) String() string { func (*SMListPendingFriendRequest) ProtoMessage() {} func (x *SMListPendingFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[20] + mi := &file_cs_proto_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1234,7 +1338,7 @@ func (x *SMListPendingFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SMListPendingFriendRequest.ProtoReflect.Descriptor instead. func (*SMListPendingFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{20} + return file_cs_proto_proto_rawDescGZIP(), []int{22} } func (x *SMListPendingFriendRequest) GetPendingFriendRequest() []*MFPendingFriendRequest { @@ -1254,7 +1358,7 @@ type CMListFriend struct { func (x *CMListFriend) Reset() { *x = CMListFriend{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[21] + mi := &file_cs_proto_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1267,7 +1371,7 @@ func (x *CMListFriend) String() string { func (*CMListFriend) ProtoMessage() {} func (x *CMListFriend) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[21] + mi := &file_cs_proto_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1280,7 +1384,7 @@ func (x *CMListFriend) ProtoReflect() protoreflect.Message { // Deprecated: Use CMListFriend.ProtoReflect.Descriptor instead. func (*CMListFriend) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{21} + return file_cs_proto_proto_rawDescGZIP(), []int{23} } // 回复我的好友列表 @@ -1289,13 +1393,13 @@ type SMListFriend struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Friends []*MFFriend `protobuf:"bytes,1,rep,name=friends" json:"friends,omitempty"` + Users []*MFUser `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"` } func (x *SMListFriend) Reset() { *x = SMListFriend{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[22] + mi := &file_cs_proto_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1308,7 +1412,7 @@ func (x *SMListFriend) String() string { func (*SMListFriend) ProtoMessage() {} func (x *SMListFriend) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[22] + mi := &file_cs_proto_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1321,42 +1425,42 @@ func (x *SMListFriend) ProtoReflect() protoreflect.Message { // Deprecated: Use SMListFriend.ProtoReflect.Descriptor instead. func (*SMListFriend) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{22} + return file_cs_proto_proto_rawDescGZIP(), []int{24} } -func (x *SMListFriend) GetFriends() []*MFFriend { +func (x *SMListFriend) GetUsers() []*MFUser { if x != nil { - return x.Friends + return x.Users } return nil } -type MFFriend struct { +// 请求删除好友 +type CMDeleteFriendShip struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId *string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"` - Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` + TargetAccountId *string `protobuf:"bytes,1,opt,name=target_account_id,json=targetAccountId" json:"target_account_id,omitempty"` // 账号id } -func (x *MFFriend) Reset() { - *x = MFFriend{} +func (x *CMDeleteFriendShip) Reset() { + *x = CMDeleteFriendShip{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[23] + mi := &file_cs_proto_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MFFriend) String() string { +func (x *CMDeleteFriendShip) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MFFriend) ProtoMessage() {} +func (*CMDeleteFriendShip) ProtoMessage() {} -func (x *MFFriend) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[23] +func (x *CMDeleteFriendShip) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1367,19 +1471,123 @@ func (x *MFFriend) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MFFriend.ProtoReflect.Descriptor instead. -func (*MFFriend) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{23} +// Deprecated: Use CMDeleteFriendShip.ProtoReflect.Descriptor instead. +func (*CMDeleteFriendShip) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{25} } -func (x *MFFriend) GetAccountId() string { +func (x *CMDeleteFriendShip) GetTargetAccountId() string { + if x != nil && x.TargetAccountId != nil { + return *x.TargetAccountId + } + return "" +} + +// 回复删除好友 +type SMDeleteFriendShip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason *string `protobuf:"bytes,1,opt,name=reason" json:"reason,omitempty"` + Status *string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` +} + +func (x *SMDeleteFriendShip) Reset() { + *x = SMDeleteFriendShip{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMDeleteFriendShip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMDeleteFriendShip) ProtoMessage() {} + +func (x *SMDeleteFriendShip) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[26] + 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 SMDeleteFriendShip.ProtoReflect.Descriptor instead. +func (*SMDeleteFriendShip) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{26} +} + +func (x *SMDeleteFriendShip) GetReason() string { + if x != nil && x.Reason != nil { + return *x.Reason + } + return "" +} + +func (x *SMDeleteFriendShip) GetStatus() string { + if x != nil && x.Status != nil { + return *x.Status + } + return "" +} + +type MFUser struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountId *string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"` + Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` +} + +func (x *MFUser) Reset() { + *x = MFUser{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MFUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MFUser) ProtoMessage() {} + +func (x *MFUser) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[27] + 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 MFUser.ProtoReflect.Descriptor instead. +func (*MFUser) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{27} +} + +func (x *MFUser) GetAccountId() string { if x != nil && x.AccountId != nil { return *x.AccountId } return "" } -func (x *MFFriend) GetUsername() string { +func (x *MFUser) GetUsername() string { if x != nil && x.Username != nil { return *x.Username } @@ -1398,7 +1606,7 @@ type MFPendingFriendRequest struct { func (x *MFPendingFriendRequest) Reset() { *x = MFPendingFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[24] + mi := &file_cs_proto_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1411,7 +1619,7 @@ func (x *MFPendingFriendRequest) String() string { func (*MFPendingFriendRequest) ProtoMessage() {} func (x *MFPendingFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[24] + mi := &file_cs_proto_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1424,7 +1632,7 @@ func (x *MFPendingFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MFPendingFriendRequest.ProtoReflect.Descriptor instead. func (*MFPendingFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{24} + return file_cs_proto_proto_rawDescGZIP(), []int{28} } func (x *MFPendingFriendRequest) GetAccountId() string { @@ -1503,66 +1711,83 @@ var file_cs_proto_proto_rawDesc = []byte{ 0x53, 0x4d, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x72, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x22, 0x37, 0x0a, - 0x0e, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, - 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, - 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x73, 0x2e, 0x4d, - 0x46, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, - 0x22, 0x40, 0x0a, 0x12, 0x43, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 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, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x4d, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 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, 0x22, 0x47, 0x0a, - 0x15, 0x53, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x22, 0x35, 0x0a, + 0x0c, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x25, 0x0a, + 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, + 0x77, 0x6f, 0x72, 0x64, 0x22, 0x30, 0x0a, 0x0c, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x17, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x54, 0x0a, 0x17, 0x53, 0x4d, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 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, 0x40, + 0x0a, 0x12, 0x43, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 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, + 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, - 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x4d, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 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, 0x22, 0x47, 0x0a, 0x15, 0x53, - 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 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, 0x22, 0x6c, 0x0a, 0x1a, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 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, 0x22, 0x47, 0x0a, 0x15, 0x53, 0x4d, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 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, - 0x12, 0x4e, 0x0a, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x14, 0x70, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x22, 0x36, 0x0a, 0x0c, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x12, 0x26, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x45, 0x0a, 0x08, 0x4d, 0x46, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 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, - 0x4b, 0x0a, 0x16, 0x4d, 0x46, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 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, + 0x22, 0x6c, 0x0a, 0x1a, 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, 0x12, 0x4e, + 0x0a, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, + 0x73, 0x2e, 0x4d, 0x46, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, + 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x30, + 0x0a, 0x0c, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x20, + 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x22, 0x40, 0x0a, 0x12, 0x43, 0x4d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 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, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x06, 0x4d, 0x46, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 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, 0x4b, 0x0a, + 0x16, 0x4d, 0x46, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 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 ( @@ -1578,7 +1803,7 @@ 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, 25) +var file_cs_proto_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_cs_proto_proto_goTypes = []interface{}{ (ConstantE)(0), // 0: cs.Constant_e (*CMPing)(nil), // 1: cs.CMPing @@ -1592,25 +1817,29 @@ var file_cs_proto_proto_goTypes = []interface{}{ (*SMLogin)(nil), // 9: cs.SMLogin (*CMReconnect)(nil), // 10: cs.CMReconnect (*SMReconnect)(nil), // 11: cs.SMReconnect - (*CMSearchFriend)(nil), // 12: cs.CMSearchFriend - (*SMSearchFriend)(nil), // 13: cs.SMSearchFriend - (*CMAddFriendRequest)(nil), // 14: cs.CMAddFriendRequest - (*SMAddFriendRequest)(nil), // 15: cs.SMAddFriendRequest - (*CMAcceptFriendRequest)(nil), // 16: cs.CMAcceptFriendRequest - (*SMAcceptFriendRequest)(nil), // 17: cs.SMAcceptFriendRequest - (*CMRejectFriendRequest)(nil), // 18: cs.CMRejectFriendRequest - (*SMRejectFriendRequest)(nil), // 19: cs.SMRejectFriendRequest - (*CMListPendingFriendRequest)(nil), // 20: cs.CMListPendingFriendRequest - (*SMListPendingFriendRequest)(nil), // 21: cs.SMListPendingFriendRequest - (*CMListFriend)(nil), // 22: cs.CMListFriend - (*SMListFriend)(nil), // 23: cs.SMListFriend - (*MFFriend)(nil), // 24: cs.MFFriend - (*MFPendingFriendRequest)(nil), // 25: cs.MFPendingFriendRequest + (*CMSearchUser)(nil), // 12: cs.CMSearchUser + (*SMSearchUser)(nil), // 13: cs.SMSearchUser + (*CMSearchUserByAccountId)(nil), // 14: cs.CMSearchUserByAccountId + (*SMSearchUserByAccountId)(nil), // 15: cs.SMSearchUserByAccountId + (*CMAddFriendRequest)(nil), // 16: cs.CMAddFriendRequest + (*SMAddFriendRequest)(nil), // 17: cs.SMAddFriendRequest + (*CMAcceptFriendRequest)(nil), // 18: cs.CMAcceptFriendRequest + (*SMAcceptFriendRequest)(nil), // 19: cs.SMAcceptFriendRequest + (*CMRejectFriendRequest)(nil), // 20: cs.CMRejectFriendRequest + (*SMRejectFriendRequest)(nil), // 21: cs.SMRejectFriendRequest + (*CMListPendingFriendRequest)(nil), // 22: cs.CMListPendingFriendRequest + (*SMListPendingFriendRequest)(nil), // 23: cs.SMListPendingFriendRequest + (*CMListFriend)(nil), // 24: cs.CMListFriend + (*SMListFriend)(nil), // 25: cs.SMListFriend + (*CMDeleteFriendShip)(nil), // 26: cs.CMDeleteFriendShip + (*SMDeleteFriendShip)(nil), // 27: cs.SMDeleteFriendShip + (*MFUser)(nil), // 28: cs.MFUser + (*MFPendingFriendRequest)(nil), // 29: cs.MFPendingFriendRequest } var file_cs_proto_proto_depIdxs = []int32{ - 24, // 0: cs.SMSearchFriend.friends:type_name -> cs.MFFriend - 25, // 1: cs.SMListPendingFriendRequest.pendingFriendRequest:type_name -> cs.MFPendingFriendRequest - 24, // 2: cs.SMListFriend.friends:type_name -> cs.MFFriend + 28, // 0: cs.SMSearchUser.users:type_name -> cs.MFUser + 29, // 1: cs.SMListPendingFriendRequest.pendingFriendRequest:type_name -> cs.MFPendingFriendRequest + 28, // 2: cs.SMListFriend.users:type_name -> cs.MFUser 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -1757,7 +1986,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMSearchFriend); i { + switch v := v.(*CMSearchUser); i { case 0: return &v.state case 1: @@ -1769,7 +1998,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMSearchFriend); i { + switch v := v.(*SMSearchUser); i { case 0: return &v.state case 1: @@ -1781,7 +2010,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMAddFriendRequest); i { + switch v := v.(*CMSearchUserByAccountId); i { case 0: return &v.state case 1: @@ -1793,7 +2022,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMAddFriendRequest); i { + switch v := v.(*SMSearchUserByAccountId); i { case 0: return &v.state case 1: @@ -1805,7 +2034,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMAcceptFriendRequest); i { + switch v := v.(*CMAddFriendRequest); i { case 0: return &v.state case 1: @@ -1817,7 +2046,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMAcceptFriendRequest); i { + switch v := v.(*SMAddFriendRequest); i { case 0: return &v.state case 1: @@ -1829,7 +2058,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMRejectFriendRequest); i { + switch v := v.(*CMAcceptFriendRequest); i { case 0: return &v.state case 1: @@ -1841,7 +2070,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMRejectFriendRequest); i { + switch v := v.(*SMAcceptFriendRequest); i { case 0: return &v.state case 1: @@ -1853,7 +2082,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMListPendingFriendRequest); i { + switch v := v.(*CMRejectFriendRequest); i { case 0: return &v.state case 1: @@ -1865,7 +2094,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMListPendingFriendRequest); i { + switch v := v.(*SMRejectFriendRequest); i { case 0: return &v.state case 1: @@ -1877,7 +2106,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMListFriend); i { + switch v := v.(*CMListPendingFriendRequest); i { case 0: return &v.state case 1: @@ -1889,7 +2118,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMListFriend); i { + switch v := v.(*SMListPendingFriendRequest); i { case 0: return &v.state case 1: @@ -1901,7 +2130,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MFFriend); i { + switch v := v.(*CMListFriend); i { case 0: return &v.state case 1: @@ -1913,6 +2142,54 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMListFriend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMDeleteFriendShip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMDeleteFriendShip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MFUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MFPendingFriendRequest); i { case 0: return &v.state @@ -1931,7 +2208,7 @@ func file_cs_proto_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cs_proto_proto_rawDesc, NumEnums: 1, - NumMessages: 25, + NumMessages: 29, NumExtensions: 0, NumServices: 0, }, diff --git a/server/imserver/friendsmgr.go b/server/imserver/friendsmgr.go index 8f681f8f..97660c94 100644 --- a/server/imserver/friendsmgr.go +++ b/server/imserver/friendsmgr.go @@ -250,10 +250,31 @@ func (fm *FriendsMgr) rejectFriendRequest(account1Id string, account2Id string) } // deleteFriendShip 删除好友 -func (fm *FriendsMgr) deleteFriendShip(account1Id, account2Id string) { - fm.findFriendShipIndex(account1Id, account2Id) - //if account2Index < 0 { - //} +func (fm *FriendsMgr) deleteFriendShip(account1ID, account2ID string) error { + user1Friendships := fm.friendships[account1ID] + user2Friendships := fm.friendships[account2ID] + + var found bool + for i, friendship := range user1Friendships { + if friendship.User1.Username == account2ID || friendship.User2.Username == account2ID { + fm.friendships[account1ID] = append(user1Friendships[:i], user1Friendships[i+1:]...) + found = true + break + } + } + + if !found { + return errors.New("friendship not found") + } + + for i, friendship := range user2Friendships { + if friendship.User1.Username == account1ID || friendship.User2.Username == account1ID { + fm.friendships[account2ID] = append(user2Friendships[:i], user2Friendships[i+1:]...) + break + } + } + + return nil } // getFriendCount 好友数量 diff --git a/server/imserver/handlermgr.go b/server/imserver/handlermgr.go index 9b1a9a81..e9b1110b 100644 --- a/server/imserver/handlermgr.go +++ b/server/imserver/handlermgr.go @@ -14,12 +14,14 @@ func (this *HandlerMgr) init() { cs.RegHandlerId(int(cs.CMMessageIdE__CMPing), PLAYER_MGR_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMLogin), PLAYER_MGR_HANDLER_ID) - cs.RegHandlerId(int(cs.CMMessageIdE__CMSearchFriend), PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMSearchUser), PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMSearchUserByAccountId), PLAYER_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMAddFriendRequest), PLAYER_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMAcceptFriendRequest), PLAYER_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMRejectFriendRequest), PLAYER_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMListPendingFriendRequest), PLAYER_HANDLER_ID) cs.RegHandlerId(int(cs.CMMessageIdE__CMListFriend), PLAYER_HANDLER_ID) + cs.RegHandlerId(int(cs.CMMessageIdE__CMDeleteFriendShip), PLAYER_HANDLER_ID) } func (this *HandlerMgr) unInit() { diff --git a/server/imserver/player.go b/server/imserver/player.go index 6fc56f47..ab2d03b0 100644 --- a/server/imserver/player.go +++ b/server/imserver/player.go @@ -13,23 +13,35 @@ type Player struct { sessionId string } -// CMAddFriendRequest 搜索用户 -func (p *Player) CMSearchFriend(hdr *f5.MsgHdr, msg *cs.CMSearchFriend) { - rspMsg := new(cs.SMSearchFriend) +// CMSearchUser 搜索用户 +func (p *Player) CMSearchUser(hdr *f5.MsgHdr, msg *cs.CMSearchUser) { + rspMsg := new(cs.SMSearchUser) //rspMsg := &cs.SMSearchFriend{} listUsers := friendMgr.searchUsers(msg.GetSearchKeyword()) for _, u := range listUsers { - friend := &cs.MFFriend{ + friend := &cs.MFUser{ AccountId: &u.AccountId, Username: &u.Username, } - rspMsg.Friends = append(rspMsg.Friends, friend) + rspMsg.Users = append(rspMsg.Users, friend) } - fmt.Printf("length%d \n", len(rspMsg.Friends)) + fmt.Printf("length%d \n", len(rspMsg.Users)) wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) } +// CMSearchUserByAccountId 搜索指定用户 +func (p *Player) CMSearchUserByAccountId(hdr *f5.MsgHdr, msg *cs.CMSearchUserByAccountId) { + rspMsg := new(cs.SMSearchUserByAccountId) + user := friendMgr.searchByAccountId(msg.GetSearchKeyword()) + if user != nil { + rspMsg.AccountId = &user.AccountId + rspMsg.Username = &user.Username + fmt.Printf("search result: accountId:%s \n", *rspMsg.AccountId) + } + wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) +} + // CMAddFriendRequest 添加好友请求 func (p *Player) CMAddFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAddFriendRequest) { rspMsg := &cs.SMAddFriendRequest{} @@ -111,20 +123,39 @@ func (p *Player) CMListFriend(hdr *f5.MsgHdr, msg *cs.CMListFriend) { accountId := p.accountId for _, friendship := range friendMgr.friendships[accountId] { if friendship.User1.AccountId != accountId { - friend := &cs.MFFriend{ + friend := &cs.MFUser{ AccountId: &friendship.User1.AccountId, Username: &friendship.User1.Username, } - rspMsg.Friends = append(rspMsg.Friends, friend) + rspMsg.Users = append(rspMsg.Users, friend) } else { - friend := &cs.MFFriend{ + friend := &cs.MFUser{ AccountId: &friendship.User2.AccountId, Username: &friendship.User2.Username, } - rspMsg.Friends = append(rspMsg.Friends, friend) + rspMsg.Users = append(rspMsg.Users, friend) } } - f5.GetSysLog().Info("CMListFriend friends count:%d\n", len(rspMsg.Friends)) + f5.GetSysLog().Info("CMListFriend friends count:%d\n", len(rspMsg.Users)) + wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) +} + +// CMDeleteFriendShip 删除好友 +func (p *Player) CMDeleteFriendShip(hdr *f5.MsgHdr, msg *cs.CMDeleteFriendShip) { + rspMsg := &cs.SMDeleteFriendShip{} + user1Id := p.accountId + user2Id := msg.GetTargetAccountId() + err := friendMgr.deleteFriendShip(user1Id, user2Id) + if err != nil { + reason := err.Error() + rspMsg.Reason = &reason + wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) + f5.GetSysLog().Info("CMDeleteFriendShip: reason:%s, params: %s or %s\n", reason, user1Id, user2Id) + return + } + + status := "deleted" + rspMsg.Status = &status wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) } diff --git a/server/imserver/proto/cs_msgid.proto b/server/imserver/proto/cs_msgid.proto index f9c5bbc1..6f36c430 100644 --- a/server/imserver/proto/cs_msgid.proto +++ b/server/imserver/proto/cs_msgid.proto @@ -9,12 +9,14 @@ enum CMMessageId_e _CMLogin = 103; _CMReconnect = 104; - _CMSearchFriend = 105; - _CMAddFriendRequest = 106; - _CMAcceptFriendRequest = 107; - _CMRejectFriendRequest = 108; - _CMListPendingFriendRequest = 109; - _CMListFriend = 110; + _CMSearchUserByAccountId = 105; + _CMSearchUser = 106; + _CMAddFriendRequest = 107; + _CMAcceptFriendRequest = 108; + _CMRejectFriendRequest = 109; + _CMListPendingFriendRequest = 110; + _CMListFriend = 111; + _CMDeleteFriendShip = 112; } enum SMMessageId_e @@ -23,12 +25,14 @@ enum SMMessageId_e _SMRpcError = 102; _SMLogin = 103; _SMReconnect = 104; - - _SMSearchFriend = 105; - _SMAddFriendRequest = 106; - _SMAcceptFriendRequest = 107; - _SMRejectFriendRequest = 108; - _SMListPendingFriendRequest = 109; - _SMListFriend = 110; + + _SMSearchUserByAccountId = 105; + _SMSearchUser = 106; + _SMAddFriendRequest = 107; + _SMAcceptFriendRequest = 108; + _SMRejectFriendRequest = 109; + _SMListPendingFriendRequest = 110; + _SMListFriend = 111; + _SMDeleteFriendShip = 112; } diff --git a/server/imserver/proto/cs_proto.proto b/server/imserver/proto/cs_proto.proto index 48c7a7cd..cfe09bce 100644 --- a/server/imserver/proto/cs_proto.proto +++ b/server/imserver/proto/cs_proto.proto @@ -119,15 +119,28 @@ message SMReconnect // 请求搜索用户 -message CMSearchFriend +message CMSearchUser { optional string search_keyword = 1; //搜索文本关键字 } // 回复搜索用户 -message SMSearchFriend +message SMSearchUser { - repeated MFFriend friends = 1; + repeated MFUser users = 1; +} + +// 请求搜索用户 CMSearchUserByAccountId +message CMSearchUserByAccountId +{ + optional string search_keyword = 1; //搜索account id +} + +// 回复搜索用户 +message SMSearchUserByAccountId +{ + optional string account_id = 1; + optional string username = 2; } // 请求发送添加好友请求 @@ -189,10 +202,24 @@ message CMListFriend // 回复我的好友列表 message SMListFriend { - repeated MFFriend friends = 1; + repeated MFUser users = 1; } -message MFFriend { + +// 请求删除好友 +message CMDeleteFriendShip +{ + optional string target_account_id = 1; // 账号id +} + +// 回复删除好友 +message SMDeleteFriendShip +{ + optional string reason = 1; + optional string status = 2; +} + +message MFUser { optional string account_id = 1; optional string username = 2; }