diff --git a/server/imserver/cs/cs.auto_gen.go b/server/imserver/cs/cs.auto_gen.go index fcf90fd7..1b59d7e8 100644 --- a/server/imserver/cs/cs.auto_gen.go +++ b/server/imserver/cs/cs.auto_gen.go @@ -44,6 +44,7 @@ type MsgHandler interface { CMLogin(*f5.MsgHdr, *CMLogin) CMReconnect(*f5.MsgHdr, *CMReconnect) CMSearchFriend(*f5.MsgHdr, *CMSearchFriend) + CMListPendingFriendRequest(*f5.MsgHdr, *CMListPendingFriendRequest) CMAddFriendRequest(*f5.MsgHdr, *CMAddFriendRequest) CMAcceptFriendRequest(*f5.MsgHdr, *CMAcceptFriendRequest) CMListFriend(*f5.MsgHdr, *CMListFriend) @@ -61,6 +62,9 @@ func (this *MsgHandlerImpl) CMReconnect(hdr *f5.MsgHdr, msg *CMReconnect) { func (this *MsgHandlerImpl) CMSearchFriend(hdr *f5.MsgHdr, msg *CMSearchFriend) { } +func (this *MsgHandlerImpl) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *CMListPendingFriendRequest) { +} + func (this *MsgHandlerImpl) CMAddFriendRequest(hdr *f5.MsgHdr, msg *CMAddFriendRequest) { } @@ -106,6 +110,14 @@ func (this *SMSearchFriend) GetNetMsgId() uint16 { return uint16(SMMessageIdE__SMSearchFriend) } +func (this *CMListPendingFriendRequest) GetNetMsgId() uint16 { + return uint16(CMMessageIdE__CMListPendingFriendRequest) +} + +func (this *SMListPendingFriendRequest) GetNetMsgId() uint16 { + return uint16(SMMessageIdE__SMListPendingFriendRequest) +} + func (this *CMAddFriendRequest) GetNetMsgId() uint16 { return uint16(CMMessageIdE__CMAddFriendRequest) } @@ -180,6 +192,18 @@ func init() { }, } + handlers[int(CMMessageIdE__CMListPendingFriendRequest)] = &NetMsgHandler{ + MsgId: int(CMMessageIdE__CMListPendingFriendRequest), + parseCb: func (data []byte) interface{} { + msg := &CMListPendingFriendRequest{} + proto.Unmarshal(data, msg) + return msg + }, + cb: func (hdr *f5.MsgHdr, handler MsgHandler) { + handler.CMListPendingFriendRequest(hdr, hdr.Msg.(*CMListPendingFriendRequest)) + }, + } + handlers[int(CMMessageIdE__CMAddFriendRequest)] = &NetMsgHandler{ MsgId: int(CMMessageIdE__CMAddFriendRequest), parseCb: func (data []byte) interface{} { diff --git a/server/imserver/cs/cs_msgid.pb.go b/server/imserver/cs/cs_msgid.pb.go index 461c3fb2..8d57796b 100644 --- a/server/imserver/cs/cs_msgid.pb.go +++ b/server/imserver/cs/cs_msgid.pb.go @@ -24,13 +24,14 @@ const ( type CMMessageIdE int32 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__CMListFriend CMMessageIdE = 108 + CMMessageIdE__CMPing CMMessageIdE = 101 + CMMessageIdE__CMLogin CMMessageIdE = 103 + CMMessageIdE__CMReconnect CMMessageIdE = 104 + CMMessageIdE__CMSearchFriend CMMessageIdE = 105 + CMMessageIdE__CMListPendingFriendRequest CMMessageIdE = 106 + CMMessageIdE__CMAddFriendRequest CMMessageIdE = 107 + CMMessageIdE__CMAcceptFriendRequest CMMessageIdE = 108 + CMMessageIdE__CMListFriend CMMessageIdE = 109 ) // Enum value maps for CMMessageIdE. @@ -40,18 +41,20 @@ var ( 103: "_CMLogin", 104: "_CMReconnect", 105: "_CMSearchFriend", - 106: "_CMAddFriendRequest", - 107: "_CMAcceptFriendRequest", - 108: "_CMListFriend", + 106: "_CMListPendingFriendRequest", + 107: "_CMAddFriendRequest", + 108: "_CMAcceptFriendRequest", + 109: "_CMListFriend", } CMMessageIdE_value = map[string]int32{ - "_CMPing": 101, - "_CMLogin": 103, - "_CMReconnect": 104, - "_CMSearchFriend": 105, - "_CMAddFriendRequest": 106, - "_CMAcceptFriendRequest": 107, - "_CMListFriend": 108, + "_CMPing": 101, + "_CMLogin": 103, + "_CMReconnect": 104, + "_CMSearchFriend": 105, + "_CMListPendingFriendRequest": 106, + "_CMAddFriendRequest": 107, + "_CMAcceptFriendRequest": 108, + "_CMListFriend": 109, } ) @@ -95,14 +98,15 @@ func (CMMessageIdE) EnumDescriptor() ([]byte, []int) { type SMMessageIdE int32 const ( - SMMessageIdE__SMPing SMMessageIdE = 101 - SMMessageIdE__SMRpcError SMMessageIdE = 102 - SMMessageIdE__SMReconnect SMMessageIdE = 104 - SMMessageIdE__SMSearchFriend SMMessageIdE = 105 - SMMessageIdE__SMAddFriendRequest SMMessageIdE = 106 - SMMessageIdE__SMAcceptFriendRequest SMMessageIdE = 107 - SMMessageIdE__SMListFriend SMMessageIdE = 108 - SMMessageIdE__SMLogin SMMessageIdE = 103 + SMMessageIdE__SMPing SMMessageIdE = 101 + SMMessageIdE__SMRpcError SMMessageIdE = 102 + SMMessageIdE__SMReconnect SMMessageIdE = 104 + SMMessageIdE__SMSearchFriend SMMessageIdE = 105 + SMMessageIdE__SMListPendingFriendRequest SMMessageIdE = 106 + SMMessageIdE__SMAddFriendRequest SMMessageIdE = 107 + SMMessageIdE__SMAcceptFriendRequest SMMessageIdE = 108 + SMMessageIdE__SMListFriend SMMessageIdE = 109 + SMMessageIdE__SMLogin SMMessageIdE = 103 ) // Enum value maps for SMMessageIdE. @@ -112,20 +116,22 @@ var ( 102: "_SMRpcError", 104: "_SMReconnect", 105: "_SMSearchFriend", - 106: "_SMAddFriendRequest", - 107: "_SMAcceptFriendRequest", - 108: "_SMListFriend", + 106: "_SMListPendingFriendRequest", + 107: "_SMAddFriendRequest", + 108: "_SMAcceptFriendRequest", + 109: "_SMListFriend", 103: "_SMLogin", } SMMessageIdE_value = map[string]int32{ - "_SMPing": 101, - "_SMRpcError": 102, - "_SMReconnect": 104, - "_SMSearchFriend": 105, - "_SMAddFriendRequest": 106, - "_SMAcceptFriendRequest": 107, - "_SMListFriend": 108, - "_SMLogin": 103, + "_SMPing": 101, + "_SMRpcError": 102, + "_SMReconnect": 104, + "_SMSearchFriend": 105, + "_SMListPendingFriendRequest": 106, + "_SMAddFriendRequest": 107, + "_SMAcceptFriendRequest": 108, + "_SMListFriend": 109, + "_SMLogin": 103, } ) @@ -170,28 +176,32 @@ 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, 0x99, 0x01, 0x0a, 0x0d, 0x43, 0x4d, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x12, 0x02, 0x63, 0x73, 0x2a, 0xba, 0x01, 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, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6b, 0x12, 0x11, 0x0a, - 0x0d, 0x5f, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x6c, - 0x2a, 0xaa, 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, 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, 0x11, 0x0a, 0x0d, - 0x5f, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x6c, 0x12, - 0x0c, 0x0a, 0x08, 0x5f, 0x53, 0x4d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x67, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x63, 0x73, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, 0x69, 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, 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, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x6c, 0x12, 0x11, + 0x0a, 0x0d, 0x5f, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, + 0x6d, 0x2a, 0xcb, 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, 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, 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, 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, 0x11, + 0x0a, 0x0d, 0x5f, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x10, + 0x6d, 0x12, 0x0c, 0x0a, 0x08, 0x5f, 0x53, 0x4d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x10, 0x67, 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 5e57fe5d..6c3bf8eb 100644 --- a/server/imserver/cs/cs_proto.pb.go +++ b/server/imserver/cs/cs_proto.pb.go @@ -861,6 +861,110 @@ func (x *SMSearchFriend) GetFriends() []*MFFriend { return nil } +// 请求等待验证的好友请求 +type CMListPendingFriendRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId *int32 `protobuf:"varint,1,opt,name=server_id,json=serverId" json:"server_id,omitempty"` //保留 + TeamUuid *string `protobuf:"bytes,2,opt,name=team_uuid,json=teamUuid" json:"team_uuid,omitempty"` //保留 +} + +func (x *CMListPendingFriendRequest) Reset() { + *x = CMListPendingFriendRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CMListPendingFriendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CMListPendingFriendRequest) ProtoMessage() {} + +func (x *CMListPendingFriendRequest) 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 CMListPendingFriendRequest.ProtoReflect.Descriptor instead. +func (*CMListPendingFriendRequest) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{13} +} + +func (x *CMListPendingFriendRequest) GetServerId() int32 { + if x != nil && x.ServerId != nil { + return *x.ServerId + } + return 0 +} + +func (x *CMListPendingFriendRequest) GetTeamUuid() string { + if x != nil && x.TeamUuid != nil { + return *x.TeamUuid + } + return "" +} + +// 回复等待验证的好友请求 +type SMListPendingFriendRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PendingFriendRequest []*MFPendingFriendRequest `protobuf:"bytes,1,rep,name=pendingFriendRequest" json:"pendingFriendRequest,omitempty"` +} + +func (x *SMListPendingFriendRequest) Reset() { + *x = SMListPendingFriendRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMListPendingFriendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMListPendingFriendRequest) ProtoMessage() {} + +func (x *SMListPendingFriendRequest) 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 SMListPendingFriendRequest.ProtoReflect.Descriptor instead. +func (*SMListPendingFriendRequest) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{14} +} + +func (x *SMListPendingFriendRequest) GetPendingFriendRequest() []*MFPendingFriendRequest { + if x != nil { + return x.PendingFriendRequest + } + return nil +} + // 请求发送添加好友请求 type CMAddFriendRequest struct { state protoimpl.MessageState @@ -875,7 +979,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) } @@ -888,7 +992,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 { @@ -901,7 +1005,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) GetServerId() int32 { @@ -938,7 +1042,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) } @@ -951,7 +1055,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 { @@ -964,7 +1068,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 { @@ -995,7 +1099,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) } @@ -1008,7 +1112,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 { @@ -1021,7 +1125,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) GetServerId() int32 { @@ -1058,7 +1162,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) } @@ -1071,7 +1175,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 { @@ -1084,7 +1188,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 { @@ -1114,7 +1218,7 @@ type CMListFriend struct { func (x *CMListFriend) Reset() { *x = CMListFriend{} 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) } @@ -1127,7 +1231,7 @@ func (x *CMListFriend) String() string { func (*CMListFriend) ProtoMessage() {} func (x *CMListFriend) 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 { @@ -1140,7 +1244,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{17} + return file_cs_proto_proto_rawDescGZIP(), []int{19} } func (x *CMListFriend) GetServerId() int32 { @@ -1157,6 +1261,62 @@ func (x *CMListFriend) GetTeamUuid() string { return "" } +// 回复等待验证的好友请求 +type MFPendingFriendRequest 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"` + Flag *bool `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` +} + +func (x *MFPendingFriendRequest) Reset() { + *x = MFPendingFriendRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cs_proto_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MFPendingFriendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MFPendingFriendRequest) ProtoMessage() {} + +func (x *MFPendingFriendRequest) ProtoReflect() protoreflect.Message { + mi := &file_cs_proto_proto_msgTypes[20] + 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 MFPendingFriendRequest.ProtoReflect.Descriptor instead. +func (*MFPendingFriendRequest) Descriptor() ([]byte, []int) { + return file_cs_proto_proto_rawDescGZIP(), []int{20} +} + +func (x *MFPendingFriendRequest) GetAccountId() string { + if x != nil && x.AccountId != nil { + return *x.AccountId + } + return "" +} + +func (x *MFPendingFriendRequest) GetFlag() bool { + if x != nil && x.Flag != nil { + return *x.Flag + } + return false +} + // 回复我的好友列表 type MFFriend struct { state protoimpl.MessageState @@ -1170,7 +1330,7 @@ type MFFriend struct { func (x *MFFriend) Reset() { *x = MFFriend{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[18] + mi := &file_cs_proto_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1183,7 +1343,7 @@ func (x *MFFriend) String() string { func (*MFFriend) ProtoMessage() {} func (x *MFFriend) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[18] + mi := &file_cs_proto_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1196,7 +1356,7 @@ func (x *MFFriend) ProtoReflect() protoreflect.Message { // Deprecated: Use MFFriend.ProtoReflect.Descriptor instead. func (*MFFriend) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{18} + return file_cs_proto_proto_rawDescGZIP(), []int{21} } func (x *MFFriend) GetAccountId() string { @@ -1224,7 +1384,7 @@ type SMListFriend struct { func (x *SMListFriend) Reset() { *x = SMListFriend{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[19] + mi := &file_cs_proto_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1237,7 +1397,7 @@ func (x *SMListFriend) String() string { func (*SMListFriend) ProtoMessage() {} func (x *SMListFriend) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[19] + mi := &file_cs_proto_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1250,7 +1410,7 @@ func (x *SMListFriend) ProtoReflect() protoreflect.Message { // Deprecated: Use SMListFriend.ProtoReflect.Descriptor instead. func (*SMListFriend) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{19} + return file_cs_proto_proto_rawDescGZIP(), []int{22} } func (x *SMListFriend) GetFriends() []*MFFriend { @@ -1333,47 +1493,64 @@ var file_cs_proto_proto_rawDesc = []byte{ 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, 0x7a, 0x0a, 0x12, 0x43, 0x4d, - 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x03, 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, 0x7d, 0x0a, 0x15, - 0x43, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x75, 0x69, 0x64, 0x12, - 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 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, 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, 0x48, 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x75, 0x69, 0x64, 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, 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, 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, + 0x64, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x56, 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, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x75, + 0x69, 0x64, 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, 0x7a, 0x0a, 0x12, 0x43, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x75, 0x69, 0x64, + 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 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, 0x7d, 0x0a, 0x15, 0x43, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, + 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, + 0x6d, 0x55, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 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, 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, 0x48, 0x0a, 0x0c, 0x43, 0x4d, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, + 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, + 0x55, 0x75, 0x69, 0x64, 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, 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, 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, + 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 ( @@ -1389,38 +1566,42 @@ 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, 20) +var file_cs_proto_proto_msgTypes = make([]protoimpl.MessageInfo, 23) 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 - (*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 - (*CMListFriend)(nil), // 18: cs.CMListFriend - (*MFFriend)(nil), // 19: cs.MFFriend - (*SMListFriend)(nil), // 20: cs.SMListFriend + (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 + (*CMSearchFriend)(nil), // 12: cs.CMSearchFriend + (*SMSearchFriend)(nil), // 13: cs.SMSearchFriend + (*CMListPendingFriendRequest)(nil), // 14: cs.CMListPendingFriendRequest + (*SMListPendingFriendRequest)(nil), // 15: cs.SMListPendingFriendRequest + (*CMAddFriendRequest)(nil), // 16: cs.CMAddFriendRequest + (*SMAddFriendRequest)(nil), // 17: cs.SMAddFriendRequest + (*CMAcceptFriendRequest)(nil), // 18: cs.CMAcceptFriendRequest + (*SMAcceptFriendRequest)(nil), // 19: cs.SMAcceptFriendRequest + (*CMListFriend)(nil), // 20: cs.CMListFriend + (*MFPendingFriendRequest)(nil), // 21: cs.MFPendingFriendRequest + (*MFFriend)(nil), // 22: cs.MFFriend + (*SMListFriend)(nil), // 23: cs.SMListFriend } var file_cs_proto_proto_depIdxs = []int32{ - 19, // 0: cs.SMSearchFriend.friends:type_name -> cs.MFFriend - 19, // 1: cs.SMListFriend.friends:type_name -> cs.MFFriend - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 22, // 0: cs.SMSearchFriend.friends:type_name -> cs.MFFriend + 21, // 1: cs.SMListPendingFriendRequest.pendingFriendRequest:type_name -> cs.MFPendingFriendRequest + 22, // 2: cs.SMListFriend.friends:type_name -> cs.MFFriend + 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 + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_cs_proto_proto_init() } @@ -1586,7 +1767,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.(*CMListPendingFriendRequest); i { case 0: return &v.state case 1: @@ -1598,7 +1779,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.(*SMListPendingFriendRequest); i { case 0: return &v.state case 1: @@ -1610,7 +1791,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: @@ -1622,7 +1803,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: @@ -1634,7 +1815,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMListFriend); i { + switch v := v.(*CMAcceptFriendRequest); i { case 0: return &v.state case 1: @@ -1646,7 +1827,7 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MFFriend); i { + switch v := v.(*SMAcceptFriendRequest); i { case 0: return &v.state case 1: @@ -1658,6 +1839,42 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CMListFriend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MFPendingFriendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MFFriend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cs_proto_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMListFriend); i { case 0: return &v.state @@ -1676,7 +1893,7 @@ func file_cs_proto_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cs_proto_proto_rawDesc, NumEnums: 1, - NumMessages: 20, + NumMessages: 23, NumExtensions: 0, NumServices: 0, }, diff --git a/server/imserver/cs/go.mod b/server/imserver/cs/go.mod index 16fa3ffc..54a731da 100644 --- a/server/imserver/cs/go.mod +++ b/server/imserver/cs/go.mod @@ -2,9 +2,9 @@ module cs go 1.20 +require q5 v1.0.0 require f5 v1.0.0 - require ( github.com/golang/protobuf v1.4.2 google.golang.org/protobuf v1.23.0 diff --git a/server/imserver/friendsmgr.go b/server/imserver/friendsmgr.go index 78343221..2f2ac7b6 100644 --- a/server/imserver/friendsmgr.go +++ b/server/imserver/friendsmgr.go @@ -259,23 +259,29 @@ func (fm *FriendsMgr) loadFriendshipsFromDB(conn *q5.Mysql) { } func (fm *FriendsMgr) loadPendingRequestsFromDB(conn *q5.Mysql) { - rows, err := conn.Query("select sender_account_id, receiver_account_id, flag from t_pending_friend_requests where flag ;") + rows, err := conn.Query("select sender_account_id, receiver_account_id, flag from t_pending_friend_requests;") if err != nil { f5.GetSysLog().Info("mysql error", err) return } - pendingReqs := make(map[string]map[string]bool) - + pendingReqs := make(map[string]map[string]bool, 10) for rows.Next() { - var senderAccountId, receiverAccountId string - var pendingRequestStatus string - if err := rows.Scan(&senderAccountId, &receiverAccountId, &pendingRequestStatus); err != nil { + var ( + senderAccountId, receiverAccountId string + requestStatus string + ) + if err := rows.Scan(&senderAccountId, &receiverAccountId, &requestStatus); err != nil { continue } if pendingReqs[senderAccountId] == nil { pendingReqs[senderAccountId] = make(map[string]bool) } - pendingReqs[senderAccountId][receiverAccountId] = true + status := true + if requestStatus == "1" { + // 等待验证的好友请求, 拒绝 + status = false + } + pendingReqs[senderAccountId][receiverAccountId] = status } if err := rows.Err(); err != nil { return diff --git a/server/imserver/mt/go.mod b/server/imserver/mt/go.mod index c3abaebd..53d319d6 100644 --- a/server/imserver/mt/go.mod +++ b/server/imserver/mt/go.mod @@ -2,9 +2,13 @@ module mt go 1.20 +require q5 v1.0.0 +require f5 v1.0.0 require mtb v1.0.0 require ( ) +replace q5 => ../../../third_party/q5 +replace f5 => ../../../third_party/f5 replace mtb => ../mtb \ No newline at end of file diff --git a/server/imserver/mtb/go.mod b/server/imserver/mtb/go.mod index 0c45c6a3..0e5eff86 100644 --- a/server/imserver/mtb/go.mod +++ b/server/imserver/mtb/go.mod @@ -2,7 +2,14 @@ module mtb go 1.20 +require q5 v1.0.0 +require f5 v1.0.0 + + require ( github.com/golang/protobuf v1.4.2 google.golang.org/protobuf v1.23.0 ) + +replace q5 => ../../../third_party/q5 +replace f5 => ../../../third_party/f5 \ No newline at end of file diff --git a/server/imserver/player.go b/server/imserver/player.go index 8749d991..6ebc1c49 100644 --- a/server/imserver/player.go +++ b/server/imserver/player.go @@ -26,6 +26,21 @@ func (p *Player) CMSearchFriends(hdr *f5.MsgHdr, msg *cs.CMSearchFriend) { wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) } +// CMListPendingFriendRequest 等待验证的好友请求 +func (p *Player) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *cs.CMListPendingFriendRequest) { + rspMsg := &cs.SMListPendingFriendRequest{} + accountId := p.accountId + for accountId, flag := range friendMgr.pendingReqs[accountId] { + row := &cs.MFPendingFriendRequest{ + AccountId: &accountId, + Flag: &flag, + } + rspMsg.PendingFriendRequest = append(rspMsg.PendingFriendRequest, row) + } + f5.GetSysLog().Info("CMListPendingFriendRequest requests count:%d\n", len(rspMsg.PendingFriendRequest)) + wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) +} + func (p *Player) CMAddFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAddFriendRequest) { rspMsg := &cs.SMAddFriendRequest{} diff --git a/server/imserver/proto/cs_msgid.proto b/server/imserver/proto/cs_msgid.proto index b3977eea..ffed4b64 100644 --- a/server/imserver/proto/cs_msgid.proto +++ b/server/imserver/proto/cs_msgid.proto @@ -10,9 +10,10 @@ enum CMMessageId_e _CMLogin = 103; _CMReconnect = 104; _CMSearchFriend = 105; - _CMAddFriendRequest = 106; - _CMAcceptFriendRequest = 107; - _CMListFriend = 108; + _CMListPendingFriendRequest = 106; + _CMAddFriendRequest = 107; + _CMAcceptFriendRequest = 108; + _CMListFriend = 109; } enum SMMessageId_e @@ -21,8 +22,9 @@ enum SMMessageId_e _SMRpcError = 102; _SMReconnect = 104; _SMSearchFriend = 105; - _SMAddFriendRequest = 106; - _SMAcceptFriendRequest = 107; - _SMListFriend = 108; + _SMListPendingFriendRequest = 106; + _SMAddFriendRequest = 107; + _SMAcceptFriendRequest = 108; + _SMListFriend = 109; _SMLogin = 103; } diff --git a/server/imserver/proto/cs_proto.proto b/server/imserver/proto/cs_proto.proto index 4634d571..3be588f7 100644 --- a/server/imserver/proto/cs_proto.proto +++ b/server/imserver/proto/cs_proto.proto @@ -132,6 +132,19 @@ message SMSearchFriend repeated MFFriend friends = 1; } +// 请求等待验证的好友请求 +message CMListPendingFriendRequest +{ + optional int32 server_id = 1; //保留 + optional string team_uuid = 2; //保留 +} + +// 回复等待验证的好友请求 +message SMListPendingFriendRequest +{ + repeated MFPendingFriendRequest pendingFriendRequest = 1; +} + // 请求发送添加好友请求 message CMAddFriendRequest { @@ -169,6 +182,12 @@ message CMListFriend optional string team_uuid = 2; //保留 } +// 回复等待验证的好友请求 +message MFPendingFriendRequest { + optional string account_id = 1; + optional bool flag = 2; +} + // 回复我的好友列表 message MFFriend { optional string account_id = 1;