From 570c0cb9a1ec7cab4111ff02bc8e88bf37b9bf15 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 7 Dec 2021 16:13:11 +0800 Subject: [PATCH 01/25] remove log --- cmd/open_im_timer_task/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/open_im_timer_task/main.go b/cmd/open_im_timer_task/main.go index d5cf8150c..56fd6a4c0 100644 --- a/cmd/open_im_timer_task/main.go +++ b/cmd/open_im_timer_task/main.go @@ -42,17 +42,17 @@ func main() { for { uidList, err := im_mysql_model.SelectAllUID() if err != nil { - log.NewError("999999", err.Error()) + //log.NewError("999999", err.Error()) } else { for _, v := range uidList { minSeq, err := commonDB.DB.GetMinSeqFromMongo(v) if err != nil { - log.NewError("999999", "get user minSeq err", err.Error(), v) + //log.NewError("999999", "get user minSeq err", err.Error(), v) continue } else { err := commonDB.DB.SetUserMinSeq(v, minSeq) if err != nil { - log.NewError("999999", "set user minSeq err", err.Error(), v) + //log.NewError("999999", "set user minSeq err", err.Error(), v) } } time.Sleep(time.Duration(100) * time.Millisecond) From 5b026e13f6ef58366d31ea0fdf4cf11b093b5f7a Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 10:42:04 +0800 Subject: [PATCH 02/25] conversation update --- internal/api/conversation/conversation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 718af6f9f..c1e42daf8 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -31,7 +31,7 @@ type SetReceiveMessageOptResp struct { } type paramGetReceiveMessageOpt struct { - ConversationIdList []string `json:"ConversationIdList" binding:"required"` + ConversationIdList []string `json:"conversationIdList" binding:"required"` OperationID string `json:"operationID" binding:"required"` } From c9a48081fdb13df59d76422cffffcec139e9a25a Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 12:24:55 +0800 Subject: [PATCH 03/25] conversation update --- internal/api/conversation/conversation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index c1e42daf8..810e157db 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -15,7 +15,7 @@ import ( type paramsSetReceiveMessageOpt struct { OperationID string `json:"operationID" binding:"required"` - Option int32 `json:"option" binding:"required"` + Option int32 `json:"option"` ConversationIdList []string `json:"conversationIdList" binding:"required"` } From a090e602b321cfdd036bb5a587ef2136cc53f0bc Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 12:30:17 +0800 Subject: [PATCH 04/25] conversation update --- internal/api/conversation/conversation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 810e157db..4e4316b05 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -15,7 +15,7 @@ import ( type paramsSetReceiveMessageOpt struct { OperationID string `json:"operationID" binding:"required"` - Option int32 `json:"option"` + Option *int32 `json:"option" binding:"required"` ConversationIdList []string `json:"conversationIdList" binding:"required"` } @@ -159,7 +159,7 @@ func SetReceiveMessageOpt(c *gin.Context) { req := &user.SetReceiveMessageOptReq{ UId: claims.UID, - Opt: params.Option, + Opt: *params.Option, ConversationId: params.ConversationIdList, OperationID: params.OperationID, } From 687933a63ed87deefebc9e8144588c3c1879a7f5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 17:23:26 +0800 Subject: [PATCH 05/25] conversation update --- pkg/utils/map.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/utils/map.go b/pkg/utils/map.go index 48acadc60..f2c2d07b5 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -116,7 +116,7 @@ func JsonStringToMap(str string) (tempMap map[string]interface{}) { return tempMap } func GetSwitchFromOptions(Options map[string]interface{}, key string) (result bool) { - if flag, ok := Options[key]; !ok || flag.(int) == 1 { + if flag, ok := Options[key]; !ok || flag.(float64) == 1 { return true } return false From ebd867a6d5d32db9769f676f744bdc7b75e906bf Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 17:44:16 +0800 Subject: [PATCH 06/25] conversation update --- internal/api/chat/get_max_min_seq.go | 3 ++- internal/api/chat/pull_msg.go | 3 ++- internal/api/chat/send_msg.go | 7 ++++++- internal/rpc/chat/send_msg.go | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/internal/api/chat/get_max_min_seq.go b/internal/api/chat/get_max_min_seq.go index 7103cae4a..984497c18 100644 --- a/internal/api/chat/get_max_min_seq.go +++ b/internal/api/chat/get_max_min_seq.go @@ -42,7 +42,8 @@ func UserGetSeq(c *gin.Context) { msgClient := pbMsg.NewChatClient(grpcConn) reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData) if err != nil { - log.ErrorByKv("rpc call failed to getNewSeq", pbData.OperationID, "err", err, "pbData", pbData.String()) + log.NewError(params.OperationID, "UserGetSeq rpc failed, ", params, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserGetSeq rpc failed, " + err.Error()}) return } diff --git a/internal/api/chat/pull_msg.go b/internal/api/chat/pull_msg.go index 46b568284..c0fa578e9 100644 --- a/internal/api/chat/pull_msg.go +++ b/internal/api/chat/pull_msg.go @@ -43,7 +43,8 @@ func UserPullMsg(c *gin.Context) { msgClient := pbChat.NewChatClient(grpcConn) reply, err := msgClient.PullMessage(context.Background(), &pbData) if err != nil { - log.ErrorByKv("PullMessage error", pbData.OperationID, "err", err.Error()) + log.NewError(params.OperationID, "UserPullMsg rpc failed, ", params, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserPullMsg rpc failed, " + err.Error()}) return } log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 6d7294109..4d53bf769 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -77,7 +77,12 @@ func UserSendMsg(c *gin.Context) { log.Info("", "", "api UserSendMsg call, api call rpc...") - reply, _ := client.UserSendMsg(context.Background(), pbData) + reply, err := client.UserSendMsg(context.Background(), pbData) + if err != nil { + log.NewError(params.OperationID, "UserSendMsg rpc failed, ", params, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserSendMsg rpc failed, " + err.Error()}) + return + } log.Info("", "", "api UserSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) c.JSON(http.StatusOK, gin.H{ diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index b0e8f663a..42d83e1a7 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -224,7 +224,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i case constant.NotReceiveMessage: return false case constant.ReceiveNotNotifyMessage: - m := utils.JsonStringToMap(msg.OfflineInfo) + m := utils.JsonStringToMap(msg.Options) utils.SetSwitchFromOptions(m, "offlinePush", 0) s := utils.MapToJsonString(m) msg.OfflineInfo = s From 058a191e6150bc205684efa246ec83ab548b69e2 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 18:08:48 +0800 Subject: [PATCH 07/25] rpc protocol update --- pkg/proto/chat/chat.proto | 6 +-- pkg/proto/push/push.pb.go | 106 ++++++++++++++++++++------------------ pkg/proto/push/push.proto | 2 +- 3 files changed, 59 insertions(+), 55 deletions(-) diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 3c66c99dc..f65b1de73 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -16,7 +16,7 @@ message WSToMsgSvrChatMsg{ string MsgID = 11; string Token = 12; string OfflineInfo =13; - string Options = 14; + map Options = 14; int32 PlatformID =15; repeated string ForceList = 16; string ClientMsgID = 17; @@ -37,7 +37,7 @@ message MsgSvrToPushSvrChatMsg { string OperationID = 11; string MsgID = 12; string OfflineInfo = 13; - string Options =14; + map Options =14; int32 PlatformID =15; string ClientMsgID = 16; @@ -121,7 +121,7 @@ message UserSendMsgReq { string RecvID = 11; repeated string ForceList = 12; string Content = 13; - string Options = 14; + map Options = 14; string ClientMsgID = 15; string OffLineInfo = 16; string Ex = 17; diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go index 2fdbd2f53..ea30d3911 100644 --- a/pkg/proto/push/push.pb.go +++ b/pkg/proto/push/push.pb.go @@ -24,32 +24,32 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PushMsgReq struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,10,opt,name=MsgID" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,12,opt,name=Options" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID" json:"PlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` + SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,10,opt,name=MsgID" json:"MsgID,omitempty"` + OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` + Options map[string]int32 `protobuf:"bytes,12,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID" json:"PlatformID,omitempty"` + SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PushMsgReq) Reset() { *m = PushMsgReq{} } func (m *PushMsgReq) String() string { return proto.CompactTextString(m) } func (*PushMsgReq) ProtoMessage() {} func (*PushMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_push_4f08d2ff54ba8af2, []int{0} + return fileDescriptor_push_380e4afdaa5f6119, []int{0} } func (m *PushMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgReq.Unmarshal(m, b) @@ -146,11 +146,11 @@ func (m *PushMsgReq) GetOfflineInfo() string { return "" } -func (m *PushMsgReq) GetOptions() string { +func (m *PushMsgReq) GetOptions() map[string]int32 { if m != nil { return m.Options } - return "" + return nil } func (m *PushMsgReq) GetPlatformID() int32 { @@ -192,7 +192,7 @@ func (m *PushMsgResp) Reset() { *m = PushMsgResp{} } func (m *PushMsgResp) String() string { return proto.CompactTextString(m) } func (*PushMsgResp) ProtoMessage() {} func (*PushMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_push_4f08d2ff54ba8af2, []int{1} + return fileDescriptor_push_380e4afdaa5f6119, []int{1} } func (m *PushMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgResp.Unmarshal(m, b) @@ -221,6 +221,7 @@ func (m *PushMsgResp) GetResultCode() int32 { func init() { proto.RegisterType((*PushMsgReq)(nil), "push.PushMsgReq") + proto.RegisterMapType((map[string]int32)(nil), "push.PushMsgReq.OptionsEntry") proto.RegisterType((*PushMsgResp)(nil), "push.PushMsgResp") } @@ -296,32 +297,35 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{ Metadata: "push/push.proto", } -func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_4f08d2ff54ba8af2) } - -var fileDescriptor_push_4f08d2ff54ba8af2 = []byte{ - // 378 bytes of a gzipped FileDescriptorPro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d, 0xfd, 0x1f, 0x00, 0x00, - 0xff, 0xff, 0x6b, 0x53, 0xf4, 0xd4, 0x92, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_380e4afdaa5f6119) } + +var fileDescriptor_push_380e4afdaa5f6119 = []byte{ + // 426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x5f, 0x6b, 0xdb, 0x30, + 0x14, 0xc5, 0x71, 0x13, 0x27, 0xed, 0x4d, 0xf3, 0x67, 0x62, 0x0c, 0x11, 0xd8, 0x30, 0x65, 0x8c, + 0xbc, 0xcc, 0x83, 0xee, 0x61, 0xa3, 0x7b, 0x19, 0xab, 0x57, 0x30, 0x2c, 0x6d, 0x51, 0xba, 0x97, + 0xbd, 0xb9, 0xe9, 0x4d, 0x6a, 0xea, 0x48, 0xaa, 0x25, 0x07, 0xf2, 0x11, 0xf7, 0xad, 0x86, 0xae, + 0xec, 0xc6, 0xcb, 0x8b, 0xd1, 0xf9, 0xdd, 0xa3, 0x6b, 0xdd, 0xc3, 0x85, 0xb1, 0xae, 0xcc, 0xe3, + 0x27, 0xf7, 0x89, 0x75, 0xa9, 0xac, 0x62, 0x5d, 0x77, 0x3e, 0xfb, 0xdb, 0x05, 0xb8, 0xad, 0xcc, + 0xe3, 0xdc, 0xac, 0x05, 0x3e, 0xb3, 0x37, 0xd0, 0x5b, 0xa0, 0x7c, 0x48, 0x13, 0x1e, 0x44, 0xc1, + 0xec, 0x44, 0xd4, 0xca, 0x71, 0x81, 0xcb, 0x6d, 0x9a, 0xf0, 0x23, 0xcf, 0xbd, 0x62, 0x1c, 0xfa, + 0x97, 0x4a, 0x5a, 0x94, 0x96, 0x77, 0xa8, 0xd0, 0x48, 0x57, 0x71, 0x9e, 0x05, 0x3e, 0xf3, 0x6e, + 0x14, 0xcc, 0x3a, 0xa2, 0x91, 0x6c, 0x0a, 0x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x04, 0x3a, 0x4f, 0xb8, 0xab, + 0xb7, 0xc1, 0x1d, 0x5d, 0x44, 0xdb, 0xac, 0xa8, 0x90, 0x36, 0x21, 0x14, 0x5e, 0x5c, 0x1c, 0x7d, + 0x0d, 0xce, 0x3e, 0xc2, 0xe0, 0x65, 0x5e, 0xa3, 0xdd, 0x68, 0x02, 0x4d, 0x55, 0xd8, 0x4b, 0xf5, + 0x80, 0xd4, 0x21, 0x14, 0x2d, 0x72, 0xfe, 0x1d, 0x46, 0xb5, 0x7d, 0x81, 0xe5, 0x36, 0x5f, 0x22, + 0x8b, 0xa1, 0x5f, 0x13, 0x36, 0x39, 0xcc, 0x6f, 0xfa, 0xea, 0x80, 0x18, 0xfd, 0x63, 0xfc, 0x67, + 0x18, 0xd3, 0x4a, 0x7f, 0xd3, 0xf7, 0x8e, 0xdf, 0xf7, 0x68, 0xb5, 0x3f, 0xff, 0x0b, 0x00, 0x00, + 0xff, 0xff, 0xf0, 0x9a, 0xaa, 0x81, 0xed, 0x02, 0x00, 0x00, } diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index 60fddfe3b..ed8dd4337 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -14,7 +14,7 @@ message PushMsgReq { string OperationID = 9; string MsgID = 10; string OfflineInfo = 11; - string Options =12; + map Options =12; int32 PlatformID =13; string SenderNickName = 14; string SenderFaceURL = 15; From 0e99fb27b551423014bc01bd931cf4e143e09c12 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 18:09:34 +0800 Subject: [PATCH 08/25] rpc protocol update --- pkg/proto/chat/chat.pb.go | 293 +++++++++++++++++++------------------- 1 file changed, 150 insertions(+), 143 deletions(-) diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index b48d2cee1..06118c3d1 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -24,33 +24,33 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type WSToMsgSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - SendTime int64 `protobuf:"varint,4,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - SenderNickName string `protobuf:"bytes,6,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,7,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,11,opt,name=MsgID" json:"MsgID,omitempty"` - Token string `protobuf:"bytes,12,opt,name=Token" json:"Token,omitempty"` - OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` - ForceList []string `protobuf:"bytes,16,rep,name=ForceList" json:"ForceList,omitempty"` - ClientMsgID string `protobuf:"bytes,17,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + SendTime int64 `protobuf:"varint,4,opt,name=SendTime" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + SenderNickName string `protobuf:"bytes,6,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,7,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,11,opt,name=MsgID" json:"MsgID,omitempty"` + Token string `protobuf:"bytes,12,opt,name=Token" json:"Token,omitempty"` + OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` + Options map[string]int32 `protobuf:"bytes,14,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` + ForceList []string `protobuf:"bytes,16,rep,name=ForceList" json:"ForceList,omitempty"` + ClientMsgID string `protobuf:"bytes,17,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *WSToMsgSvrChatMsg) Reset() { *m = WSToMsgSvrChatMsg{} } func (m *WSToMsgSvrChatMsg) String() string { return proto.CompactTextString(m) } func (*WSToMsgSvrChatMsg) ProtoMessage() {} func (*WSToMsgSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{0} + return fileDescriptor_chat_3707ac912effe95d, []int{0} } func (m *WSToMsgSvrChatMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WSToMsgSvrChatMsg.Unmarshal(m, b) @@ -161,11 +161,11 @@ func (m *WSToMsgSvrChatMsg) GetOfflineInfo() string { return "" } -func (m *WSToMsgSvrChatMsg) GetOptions() string { +func (m *WSToMsgSvrChatMsg) GetOptions() map[string]int32 { if m != nil { return m.Options } - return "" + return nil } func (m *WSToMsgSvrChatMsg) GetPlatformID() int32 { @@ -190,32 +190,32 @@ func (m *WSToMsgSvrChatMsg) GetClientMsgID() string { } type MsgSvrToPushSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - SenderNickName string `protobuf:"bytes,7,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,8,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ContentType int32 `protobuf:"varint,9,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,10,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,11,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,12,opt,name=MsgID" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` + SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + SenderNickName string `protobuf:"bytes,7,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,8,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + ContentType int32 `protobuf:"varint,9,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,10,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,11,opt,name=OperationID" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,12,opt,name=MsgID" json:"MsgID,omitempty"` + OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` + Options map[string]int32 `protobuf:"bytes,14,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgSvrToPushSvrChatMsg) Reset() { *m = MsgSvrToPushSvrChatMsg{} } func (m *MsgSvrToPushSvrChatMsg) String() string { return proto.CompactTextString(m) } func (*MsgSvrToPushSvrChatMsg) ProtoMessage() {} func (*MsgSvrToPushSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{1} + return fileDescriptor_chat_3707ac912effe95d, []int{1} } func (m *MsgSvrToPushSvrChatMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Unmarshal(m, b) @@ -326,11 +326,11 @@ func (m *MsgSvrToPushSvrChatMsg) GetOfflineInfo() string { return "" } -func (m *MsgSvrToPushSvrChatMsg) GetOptions() string { +func (m *MsgSvrToPushSvrChatMsg) GetOptions() map[string]int32 { if m != nil { return m.Options } - return "" + return nil } func (m *MsgSvrToPushSvrChatMsg) GetPlatformID() int32 { @@ -361,7 +361,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{2} + return fileDescriptor_chat_3707ac912effe95d, []int{2} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -425,7 +425,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{3} + return fileDescriptor_chat_3707ac912effe95d, []int{3} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -500,7 +500,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{4} + return fileDescriptor_chat_3707ac912effe95d, []int{4} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -553,7 +553,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{5} + return fileDescriptor_chat_3707ac912effe95d, []int{5} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -601,7 +601,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{6} + return fileDescriptor_chat_3707ac912effe95d, []int{6} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -663,7 +663,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{7} + return fileDescriptor_chat_3707ac912effe95d, []int{7} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -731,7 +731,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{8} + return fileDescriptor_chat_3707ac912effe95d, []int{8} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -836,34 +836,34 @@ func (m *MsgFormat) GetClientMsgID() string { } type UserSendMsgReq struct { - ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` - Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` - SendID string `protobuf:"bytes,3,opt,name=SendID" json:"SendID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` - SenderNickName string `protobuf:"bytes,5,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,6,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - PlatformID int32 `protobuf:"varint,7,opt,name=PlatformID" json:"PlatformID,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,9,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,10,opt,name=ContentType" json:"ContentType,omitempty"` - RecvID string `protobuf:"bytes,11,opt,name=RecvID" json:"RecvID,omitempty"` - ForceList []string `protobuf:"bytes,12,rep,name=ForceList" json:"ForceList,omitempty"` - Content string `protobuf:"bytes,13,opt,name=Content" json:"Content,omitempty"` - Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` - ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo" json:"OffLineInfo,omitempty"` - Ex string `protobuf:"bytes,17,opt,name=Ex" json:"Ex,omitempty"` - SendTime int64 `protobuf:"varint,18,opt,name=sendTime" json:"sendTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` + Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` + SendID string `protobuf:"bytes,3,opt,name=SendID" json:"SendID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + SenderNickName string `protobuf:"bytes,5,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,6,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + PlatformID int32 `protobuf:"varint,7,opt,name=PlatformID" json:"PlatformID,omitempty"` + SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,9,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,10,opt,name=ContentType" json:"ContentType,omitempty"` + RecvID string `protobuf:"bytes,11,opt,name=RecvID" json:"RecvID,omitempty"` + ForceList []string `protobuf:"bytes,12,rep,name=ForceList" json:"ForceList,omitempty"` + Content string `protobuf:"bytes,13,opt,name=Content" json:"Content,omitempty"` + Options map[string]int32 `protobuf:"bytes,14,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo" json:"OffLineInfo,omitempty"` + Ex string `protobuf:"bytes,17,opt,name=Ex" json:"Ex,omitempty"` + SendTime int64 `protobuf:"varint,18,opt,name=sendTime" json:"sendTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } func (*UserSendMsgReq) ProtoMessage() {} func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{9} + return fileDescriptor_chat_3707ac912effe95d, []int{9} } func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) @@ -974,11 +974,11 @@ func (m *UserSendMsgReq) GetContent() string { return "" } -func (m *UserSendMsgReq) GetOptions() string { +func (m *UserSendMsgReq) GetOptions() map[string]int32 { if m != nil { return m.Options } - return "" + return nil } func (m *UserSendMsgReq) GetClientMsgID() string { @@ -1025,7 +1025,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_feb94a5514034c46, []int{10} + return fileDescriptor_chat_3707ac912effe95d, []int{10} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1089,7 +1089,9 @@ func (m *UserSendMsgResp) GetSendTime() int64 { func init() { proto.RegisterType((*WSToMsgSvrChatMsg)(nil), "pbChat.WSToMsgSvrChatMsg") + proto.RegisterMapType((map[string]int32)(nil), "pbChat.WSToMsgSvrChatMsg.OptionsEntry") proto.RegisterType((*MsgSvrToPushSvrChatMsg)(nil), "pbChat.MsgSvrToPushSvrChatMsg") + proto.RegisterMapType((map[string]int32)(nil), "pbChat.MsgSvrToPushSvrChatMsg.OptionsEntry") proto.RegisterType((*PullMessageReq)(nil), "pbChat.PullMessageReq") proto.RegisterType((*PullMessageResp)(nil), "pbChat.PullMessageResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "pbChat.PullMessageBySeqListReq") @@ -1098,6 +1100,7 @@ func init() { proto.RegisterType((*GatherFormat)(nil), "pbChat.GatherFormat") proto.RegisterType((*MsgFormat)(nil), "pbChat.MsgFormat") proto.RegisterType((*UserSendMsgReq)(nil), "pbChat.UserSendMsgReq") + proto.RegisterMapType((map[string]int32)(nil), "pbChat.UserSendMsgReq.OptionsEntry") proto.RegisterType((*UserSendMsgResp)(nil), "pbChat.UserSendMsgResp") } @@ -1272,70 +1275,74 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_feb94a5514034c46) } - -var fileDescriptor_chat_feb94a5514034c46 = []byte{ - // 981 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x6a, 0xe3, 0x46, - 0x14, 0xc6, 0x92, 0x2d, 0xdb, 0xc7, 0xbf, 0x99, 0x86, 0xec, 0x90, 0x96, 0xd6, 0x88, 0x6d, 0x31, - 0xbd, 0x48, 0x61, 0x7b, 0x53, 0x5a, 0x58, 0x68, 0x62, 0x27, 0xa8, 0x44, 0xd9, 0x20, 0x7b, 0x29, - 0xf4, 0x4e, 0x6b, 0x8f, 0x15, 0xb1, 0xb6, 0x24, 0xcf, 0x28, 0x69, 0xf6, 0xa6, 0xaf, 0xd0, 0x97, - 0xe8, 0x65, 0x5f, 0xa4, 0x8f, 0xd2, 0x57, 0x28, 0x14, 0xca, 0xcc, 0x48, 0xd6, 0xe8, 0xc7, 0x49, - 0xd8, 0xb2, 0x7b, 0x13, 0x38, 0x9f, 0xce, 0xfc, 0x9c, 0xf3, 0x7d, 0xf3, 0x1d, 0x07, 0x06, 0x8b, - 0x1b, 0x37, 0xfe, 0x86, 0xff, 0x39, 0x89, 0x68, 0x18, 0x87, 0xc8, 0x88, 0xde, 0x9c, 0xdd, 0xb8, - 0xb1, 0xf9, 0x7b, 0x1d, 0x0e, 0x7e, 0x9e, 0xcd, 0x43, 0x9b, 0x79, 0xb3, 0x3b, 0xca, 0x21, 0x9b, - 0x79, 0xe8, 0x08, 0x8c, 0x19, 0x09, 0x96, 0xd6, 0x04, 0xd7, 0x46, 0xb5, 0x71, 0xdb, 0x49, 0x22, - 0x8e, 0x3b, 0x64, 0x71, 0x67, 0x4d, 0xb0, 0x26, 0x71, 0x19, 0x21, 0x0c, 0xcd, 0xb3, 0x30, 0x88, - 0x49, 0x10, 0x63, 0x5d, 0x7c, 0x48, 0x43, 0x74, 0x0c, 0x2d, 0xbe, 0x76, 0xee, 0x6f, 0x08, 0xae, - 0x8f, 0x6a, 0x63, 0xdd, 0xd9, 0xc5, 0x7c, 0x95, 0xcd, 0xbc, 0x73, 0x1a, 0x6e, 0x70, 0x63, 0x54, - 0x1b, 0x37, 0x9c, 0x34, 0x44, 0x5f, 0x41, 0x9f, 0x67, 0x11, 0x7a, 0xe5, 0x2f, 0xde, 0x5e, 0xb9, - 0x1b, 0x82, 0x0d, 0xb1, 0x6d, 0x01, 0x45, 0xcf, 0xa1, 0x27, 0x91, 0x73, 0x77, 0x41, 0x5e, 0x3b, - 0x97, 0xb8, 0x29, 0xd2, 0xf2, 0x20, 0x1a, 0x41, 0x27, 0xb9, 0xce, 0xfc, 0x5d, 0x44, 0x70, 0x4b, - 0x9c, 0xa5, 0x42, 0x3c, 0x63, 0x46, 0x18, 0xf3, 0xc3, 0x40, 0x64, 0xb4, 0x65, 0x86, 0x02, 0xf1, - 0x8c, 0x57, 0x11, 0xa1, 0x6e, 0xec, 0x87, 0x81, 0x35, 0xc1, 0x20, 0xce, 0x51, 0x21, 0x74, 0x08, - 0x0d, 0x9b, 0x79, 0xd6, 0x04, 0x77, 0xc4, 0x37, 0x19, 0x70, 0x74, 0x1e, 0xbe, 0x25, 0x01, 0xee, - 0x4a, 0x54, 0x04, 0x62, 0xb7, 0xd5, 0x6a, 0xed, 0x07, 0xc4, 0x0a, 0x56, 0x21, 0xee, 0x25, 0xbb, - 0x65, 0x10, 0xef, 0xcd, 0xab, 0x88, 0xef, 0xcc, 0x70, 0x5f, 0x76, 0x34, 0x09, 0xd1, 0xe7, 0x00, - 0xd7, 0x6b, 0x37, 0x5e, 0x85, 0x74, 0x63, 0x4d, 0xf0, 0x40, 0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 0x46, 0xbe, - 0x96, 0x17, 0x7f, 0x68, 0x50, 0xe7, 0x9e, 0x84, 0x7e, 0x82, 0x41, 0xc1, 0x43, 0xd1, 0xf1, 0x6e, - 0x72, 0x94, 0xcc, 0xfa, 0xf8, 0xd3, 0xbd, 0xdf, 0x58, 0x84, 0x5e, 0x42, 0x47, 0x19, 0x27, 0xe8, - 0x28, 0xcd, 0xcd, 0xcf, 0xf3, 0xe3, 0x67, 0x95, 0x38, 0x8b, 0xd0, 0x35, 0x1c, 0x56, 0x8d, 0x23, - 0xf4, 0x45, 0xc5, 0x02, 0x75, 0x58, 0xed, 0xdf, 0xf1, 0x25, 0x74, 0x14, 0xc6, 0xb2, 0x1b, 0xe5, - 0x5f, 0x7d, 0xb6, 0xbe, 0x40, 0xef, 0xe9, 0xe0, 0x97, 0xde, 0x89, 0xf8, 0x9f, 0xe5, 0x07, 0x99, - 0xf0, 0xc6, 0x10, 0xff, 0xbb, 0x7c, 0xfb, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x44, 0x4e, - 0x52, 0xce, 0x0c, 0x00, 0x00, +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_3707ac912effe95d) } + +var fileDescriptor_chat_3707ac912effe95d = []byte{ + // 1049 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xc7, 0x15, 0x3b, 0x4e, 0x9a, 0x93, 0xcf, 0x0e, 0x55, 0x77, 0x14, 0x10, 0x44, 0x61, 0x59, + 0x45, 0x20, 0x05, 0x69, 0xb9, 0x59, 0x15, 0xb1, 0x82, 0x36, 0x69, 0x15, 0xd4, 0x74, 0x2b, 0x27, + 0x2b, 0x24, 0xee, 0xbc, 0xc9, 0x24, 0xb5, 0x9a, 0xd8, 0xc9, 0x8c, 0x5b, 0xda, 0x1b, 0xde, 0x80, +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, 0xaf, + 0xa1, 0xac, 0xcc, 0x2b, 0x74, 0x18, 0xc5, 0xea, 0x17, 0x86, 0xe6, 0xb3, 0x4c, 0x3f, 0x5b, 0xa1, + 0x4b, 0x38, 0xc8, 0x9a, 0x77, 0xe8, 0xb3, 0x8c, 0x05, 0xea, 0x34, 0xdc, 0xbe, 0xe3, 0x6b, 0x28, + 0x2b, 0x1d, 0x8b, 0x4f, 0xa4, 0xb3, 0x19, 0xaf, 0x4f, 0xb4, 0xf7, 0xb8, 0xfe, 0x73, 0xb5, 0x2b, + 0x7e, 0xe1, 0x7d, 0x2b, 0x03, 0xde, 0x15, 0xc4, 0x2f, 0xbd, 0x6f, 0xfe, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0xa2, 0x9b, 0xc2, 0xf2, 0xfc, 0x0d, 0x00, 0x00, } From c6ade8d9bcaed4e1f86f13ffaeac9fcebedfa590 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 18:15:14 +0800 Subject: [PATCH 09/25] rpc protocol update --- internal/api/chat/send_msg.go | 4 ++-- internal/api/manage/management_chat.go | 2 +- internal/push/logic/push_to_client.go | 6 ++---- internal/rpc/chat/send_msg.go | 8 ++------ pkg/utils/map.go | 6 +++--- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 4d53bf769..2c4eee371 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -27,7 +27,7 @@ type paramsUserSendMsg struct { RecvID string `json:"recvID" binding:"required"` ForceList []string `json:"forceList"` Content string `json:"content" binding:"required"` - Options map[string]interface{} `json:"options" ` + Options map[string]int32 `json:"options" ` ClientMsgID string `json:"clientMsgID" binding:"required"` OffLineInfo map[string]interface{} `json:"offlineInfo" ` Ex map[string]interface{} `json:"ext"` @@ -49,7 +49,7 @@ func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.UserSend RecvID: params.Data.RecvID, ForceList: params.Data.ForceList, Content: params.Data.Content, - Options: utils.MapToJsonString(params.Data.Options), + Options: params.Data.Options, ClientMsgID: params.Data.ClientMsgID, OffLineInfo: utils.MapToJsonString(params.Data.OffLineInfo), Ex: utils.MapToJsonString(params.Data.Ex), diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index ba056eba1..4cb8f6364 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -72,7 +72,7 @@ func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.UserSendMsgReq { ForceList: params.ForceList, Content: newContent, ClientMsgID: utils.GetMsgID(params.SendID), - Options: utils.MapIntToJsonString(options), + Options: options, } return &pbData } diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 390ba42c5..7051360f3 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -34,11 +34,9 @@ type AtContent struct { IsAtSelf bool `json:"isAtSelf"` } -func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo, Options string) { +func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo string, Options map[string]int32) { var wsResult []*pbRelay.SingleMsgToUser - MOptions := utils.JsonStringToMap(Options) //Control whether to push message to sender's other terminal - //isSenderSync := utils.GetSwitchFromOptions(MOptions, "senderSync") - isOfflinePush := utils.GetSwitchFromOptions(MOptions, "offlinePush") + isOfflinePush := utils.GetSwitchFromOptions(Options, "offlinePush") log.InfoByKv("Get chat from msg_transfer And push chat", sendPbData.OperationID, "PushData", sendPbData) grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) //Online push message diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index 42d83e1a7..d81e9d580 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -71,8 +71,7 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (* } else { pbData.SendTime = pb.SendTime } - Options := utils.JsonStringToMap(pbData.Options) - isHistory := utils.GetSwitchFromOptions(Options, "history") + isHistory := utils.GetSwitchFromOptions(pbData.Options, "history") mReq := MsgCallBackReq{ SendID: pb.SendID, RecvID: pb.RecvID, @@ -224,10 +223,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i case constant.NotReceiveMessage: return false case constant.ReceiveNotNotifyMessage: - m := utils.JsonStringToMap(msg.Options) - utils.SetSwitchFromOptions(m, "offlinePush", 0) - s := utils.MapToJsonString(m) - msg.OfflineInfo = s + utils.SetSwitchFromOptions(msg.Options, "offlinePush", 0) return true } diff --git a/pkg/utils/map.go b/pkg/utils/map.go index f2c2d07b5..fec4da23e 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -115,12 +115,12 @@ func JsonStringToMap(str string) (tempMap map[string]interface{}) { _ = json.Unmarshal([]byte(str), &tempMap) return tempMap } -func GetSwitchFromOptions(Options map[string]interface{}, key string) (result bool) { - if flag, ok := Options[key]; !ok || flag.(float64) == 1 { +func GetSwitchFromOptions(Options map[string]int32, key string) (result bool) { + if flag, ok := Options[key]; !ok || flag == 1 { return true } return false } -func SetSwitchFromOptions(Options map[string]interface{}, key string, value interface{}) { +func SetSwitchFromOptions(Options map[string]int32, key string, value int32) { Options[key] = value } From 822f689c482dcdb4c920006545044b9f76c5967f Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 18:17:57 +0800 Subject: [PATCH 10/25] rpc protocol update --- internal/msg_gateway/gate/logic.go | 2 +- internal/msg_transfer/logic/history_msg_handler.go | 5 ++--- internal/msg_transfer/logic/persistent_msg_handler.go | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 9b449d4b2..58358a1e6 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -214,7 +214,7 @@ func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { SenderNickName: data.SenderNickName, SenderFaceURL: data.SenderFaceURL, Content: data.Content, - Options: utils.MapIntToJsonString(data.Options), + Options: data.Options, ClientMsgID: data.ClientMsgID, SendTime: sendTime, } diff --git a/internal/msg_transfer/logic/history_msg_handler.go b/internal/msg_transfer/logic/history_msg_handler.go index e3b5efb05..ce6e2ade5 100644 --- a/internal/msg_transfer/logic/history_msg_handler.go +++ b/internal/msg_transfer/logic/history_msg_handler.go @@ -54,11 +54,10 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) pbSaveData.OperationID = pbData.OperationID pbSaveData.RecvID = pbData.RecvID pbSaveData.PlatformID = pbData.PlatformID - Options := utils.JsonStringToMap(pbData.Options) //Control whether to store offline messages (mongo) - isHistory := utils.GetSwitchFromOptions(Options, "history") + isHistory := utils.GetSwitchFromOptions(pbData.Options, "history") //Control whether to store history messages (mysql) - isPersist := utils.GetSwitchFromOptions(Options, "persistent") + isPersist := utils.GetSwitchFromOptions(pbData.Options, "persistent") switch pbData.SessionType { case constant.SingleChatType: log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = SingleChatType", isHistory, isPersist) diff --git a/internal/msg_transfer/logic/persistent_msg_handler.go b/internal/msg_transfer/logic/persistent_msg_handler.go index 88039041c..aa4c0c7ba 100644 --- a/internal/msg_transfer/logic/persistent_msg_handler.go +++ b/internal/msg_transfer/logic/persistent_msg_handler.go @@ -40,9 +40,8 @@ func (pc *PersistentConsumerHandler) handleChatWs2Mysql(msg []byte, msgKey strin log.ErrorByKv("msg_transfer Unmarshal chat err", "", "chat", string(msg), "err", err.Error()) return } - Options := utils.JsonStringToMap(pbData.Options) //Control whether to store history messages (mysql) - isPersist := utils.GetSwitchFromOptions(Options, "persistent") + isPersist := utils.GetSwitchFromOptions(pbData.Options, "persistent") //Only process receiver data if isPersist { if msgKey == pbData.RecvID && pbData.SessionType == constant.SingleChatType { From d2ce4192cc38932f0ddc9d6be69e35cc47611cb7 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 8 Dec 2021 18:30:23 +0800 Subject: [PATCH 11/25] rpc protocol update --- internal/rpc/chat/send_msg.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index d81e9d580..dd4090435 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -223,6 +223,9 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i case constant.NotReceiveMessage: return false case constant.ReceiveNotNotifyMessage: + if msg.Options == nil { + msg.Options = make(map[string]int32, 2) + } utils.SetSwitchFromOptions(msg.Options, "offlinePush", 0) return true } From fa028fdafd6883cfeca04cb00a4546c86c68df61 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 15:43:36 +0800 Subject: [PATCH 12/25] push add ios push --- internal/push/jpush/push.go | 3 +-- .../push/jpush/requestBody/notification.go | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 2fe39c27f..03827d9e9 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -20,8 +20,7 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin var au requestBody.Audience au.SetAlias(accounts) var no requestBody.Notification - no.SetAlert(content) - no.SetAndroidIntent() + no.SetAlert(content, platform) var me requestBody.Message me.SetMsgContent(detailContent) var po requestBody.PushObj diff --git a/internal/push/jpush/requestBody/notification.go b/internal/push/jpush/requestBody/notification.go index 838621606..3f2876612 100644 --- a/internal/push/jpush/requestBody/notification.go +++ b/internal/push/jpush/requestBody/notification.go @@ -1,6 +1,9 @@ package requestBody -import "Open_IM/pkg/common/config" +import ( + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" +) type Notification struct { Alert string `json:"alert,omitempty"` @@ -15,11 +18,23 @@ type Android struct { } `json:"intent,omitempty"` } type Ios struct { + Alert string `json:"alert,omitempty"` + Sound string `json:"sound,omitempty"` + Badge string `json:"badge,omitempty"` } -func (n *Notification) SetAlert(alert string) { +func (n *Notification) SetAlert(alert, platform string) { n.Alert = alert - n.Android.Alert = alert + switch platform { + case constant.AndroidPlatformStr: + n.Android.Alert = alert + n.SetAndroidIntent() + case constant.IOSPlatformStr: + n.IOS.Alert = alert + n.IOS.Sound = "default" + n.IOS.Badge = "+1" + default: + } } func (n *Notification) SetAndroidIntent() { n.Android.Intent.URL = config.Config.Push.Jpns.PushIntent From 3e51e781a6aca291c70219a8237fa608180e4f53 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 16:05:20 +0800 Subject: [PATCH 13/25] push add ios push --- internal/push/logic/push_to_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 7051360f3..1e8d3acd3 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -37,7 +37,7 @@ type AtContent struct { func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo string, Options map[string]int32) { var wsResult []*pbRelay.SingleMsgToUser isOfflinePush := utils.GetSwitchFromOptions(Options, "offlinePush") - log.InfoByKv("Get chat from msg_transfer And push chat", sendPbData.OperationID, "PushData", sendPbData) + log.InfoByKv("Get chat from msg_transfer And push chat", sendPbData.OperationID, "PushData", sendPbData, Options, isOfflinePush) grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) //Online push message log.InfoByKv("test", sendPbData.OperationID, "len grpc", len(grpcCons), "data", sendPbData) From 8085c627742e811d5ba7e817b43706172281d176 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 17:14:24 +0800 Subject: [PATCH 14/25] push add ios push --- internal/push/jpush/push.go | 2 ++ internal/push/jpush/requestBody/options.go | 9 +++++++++ internal/push/jpush/requestBody/pushObj.go | 4 ++++ internal/push/logic/push_to_client.go | 4 ++-- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 internal/push/jpush/requestBody/options.go diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 03827d9e9..e5ce9b4ac 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -23,6 +23,8 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin no.SetAlert(content, platform) var me requestBody.Message me.SetMsgContent(detailContent) + var o requestBody.Options + o.SetApnsProduction(true) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) diff --git a/internal/push/jpush/requestBody/options.go b/internal/push/jpush/requestBody/options.go new file mode 100644 index 000000000..97a452fad --- /dev/null +++ b/internal/push/jpush/requestBody/options.go @@ -0,0 +1,9 @@ +package requestBody + +type Options struct { + ApnsProduction bool `json:"apns_production,omitempty"` +} + +func (o *Options) SetApnsProduction(c bool) { + o.ApnsProduction = c +} diff --git a/internal/push/jpush/requestBody/pushObj.go b/internal/push/jpush/requestBody/pushObj.go index 24c912b26..974161407 100644 --- a/internal/push/jpush/requestBody/pushObj.go +++ b/internal/push/jpush/requestBody/pushObj.go @@ -5,6 +5,7 @@ type PushObj struct { Audience interface{} `json:"audience"` Notification interface{} `json:"notification,omitempty"` Message interface{} `json:"message,omitempty"` + Options interface{} `json:"options,omitempty"` } func (p *PushObj) SetPlatform(pf *Platform) { @@ -22,3 +23,6 @@ func (p *PushObj) SetNotification(no *Notification) { func (p *PushObj) SetMessage(m *Message) { p.Message = m } +func (p *PushObj) SetOptions(o *Options) { + p.Options = o +} diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 1e8d3acd3..b7c8c94af 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -98,9 +98,9 @@ func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo string, Options map } pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t)) if err != nil { - log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), t) + log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), constant.PlatformIDToName(t)) } else { - log.NewDebug(sendPbData.OperationID, "offline push return result is ", string(pushResult), sendPbData, t) + log.NewDebug(sendPbData.OperationID, "offline push return result is ", string(pushResult), sendPbData, constant.PlatformIDToName(t)) } } From a69ebf42996302fad9bc174ba475577130724df3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 17:41:06 +0800 Subject: [PATCH 15/25] push add ios push --- internal/push/jpush/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index e5ce9b4ac..3334ef7ca 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -24,7 +24,7 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options - o.SetApnsProduction(true) + o.SetApnsProduction(false) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) From d7cd8ba780505534ee034dbe99bc0565b9f34de3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 17:42:02 +0800 Subject: [PATCH 16/25] push add ios push --- internal/push/jpush/push.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 3334ef7ca..0d639c868 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -24,12 +24,13 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options - o.SetApnsProduction(false) + o.SetApnsProduction(true) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) po.SetNotification(&no) po.SetMessage(&me) + po.SetOptions(&o) con, err := json.Marshal(po) if err != nil { From 74beec2b858cb135bb87dce91573b5616950d311 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 17:52:05 +0800 Subject: [PATCH 17/25] push add ios push --- internal/push/jpush/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 0d639c868..1258a80a7 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -24,7 +24,7 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options - o.SetApnsProduction(true) + o.SetApnsProduction(false) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) From adc4fec19bf0ea96b91697d05f06cc7bc920565c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 17:54:58 +0800 Subject: [PATCH 18/25] push add ios push --- internal/push/jpush/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 1258a80a7..0d639c868 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -24,7 +24,7 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options - o.SetApnsProduction(false) + o.SetApnsProduction(true) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) From 31a558cfea2fa7cdb04976380ca36d0878999027 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 18:10:39 +0800 Subject: [PATCH 19/25] push add ios push --- internal/push/jpush/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 0d639c868..1258a80a7 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -24,7 +24,7 @@ func JGAccountListPush(accounts []string, content, detailContent, platform strin var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options - o.SetApnsProduction(true) + o.SetApnsProduction(false) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) From 170310e23c0bab12462b8fa0644e7002fa882b39 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 18:15:40 +0800 Subject: [PATCH 20/25] push add ios push --- internal/push/jpush/requestBody/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/jpush/requestBody/options.go b/internal/push/jpush/requestBody/options.go index 97a452fad..f82ebd035 100644 --- a/internal/push/jpush/requestBody/options.go +++ b/internal/push/jpush/requestBody/options.go @@ -1,7 +1,7 @@ package requestBody type Options struct { - ApnsProduction bool `json:"apns_production,omitempty"` + ApnsProduction bool `json:"apns_production"` } func (o *Options) SetApnsProduction(c bool) { From 043f9bde592aedf740453025df7af9d83532e057 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 9 Dec 2021 21:22:54 +0800 Subject: [PATCH 21/25] msg add notification --- internal/rpc/chat/send_msg.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index dd4090435..8e6ad5db5 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -189,6 +189,20 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (* } +} + +type WSToMsgSvrChatMsg struct { + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` +} + +func Notification(m *WSToMsgSvrChatMsg, onlineUserOnly bool, offlineInfo interface{}) { + } func (rpc *rpcChat) sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string) error { pid, offset, err := rpc.producer.SendMessage(m, key) From aaf834a33b601e452ec749eb0ce6b1c467dc61f8 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 10 Dec 2021 10:35:21 +0800 Subject: [PATCH 22/25] pb change --- pkg/proto/chat/chat.proto | 6 +++--- pkg/proto/push/push.proto | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index f65b1de73..3c66c99dc 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -16,7 +16,7 @@ message WSToMsgSvrChatMsg{ string MsgID = 11; string Token = 12; string OfflineInfo =13; - map Options = 14; + string Options = 14; int32 PlatformID =15; repeated string ForceList = 16; string ClientMsgID = 17; @@ -37,7 +37,7 @@ message MsgSvrToPushSvrChatMsg { string OperationID = 11; string MsgID = 12; string OfflineInfo = 13; - map Options =14; + string Options =14; int32 PlatformID =15; string ClientMsgID = 16; @@ -121,7 +121,7 @@ message UserSendMsgReq { string RecvID = 11; repeated string ForceList = 12; string Content = 13; - map Options = 14; + string Options = 14; string ClientMsgID = 15; string OffLineInfo = 16; string Ex = 17; diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index ed8dd4337..60fddfe3b 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -14,7 +14,7 @@ message PushMsgReq { string OperationID = 9; string MsgID = 10; string OfflineInfo = 11; - map Options =12; + string Options =12; int32 PlatformID =13; string SenderNickName = 14; string SenderFaceURL = 15; From d6ec8f49307732f79cb6a5b4f9ea7639f9d94a5f Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 10 Dec 2021 10:49:49 +0800 Subject: [PATCH 23/25] pb change --- internal/api/chat/send_msg.go | 2 +- internal/api/manage/management_chat.go | 2 +- internal/msg_gateway/gate/logic.go | 2 +- .../msg_transfer/logic/history_msg_handler.go | 5 +- .../logic/persistent_msg_handler.go | 3 +- internal/push/logic/push_handler.go | 3 +- internal/rpc/chat/send_msg.go | 11 +- pkg/common/db/mongoModel.go | 6 +- pkg/proto/push/push.pb.go | 106 +++++++++--------- pkg/utils/map.go | 2 +- 10 files changed, 72 insertions(+), 70 deletions(-) diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 2c4eee371..e48582eb1 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -49,7 +49,7 @@ func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.UserSend RecvID: params.Data.RecvID, ForceList: params.Data.ForceList, Content: params.Data.Content, - Options: params.Data.Options, + Options: utils.MapIntToJsonString(params.Data.Options), ClientMsgID: params.Data.ClientMsgID, OffLineInfo: utils.MapToJsonString(params.Data.OffLineInfo), Ex: utils.MapToJsonString(params.Data.Ex), diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 4cb8f6364..ba056eba1 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -72,7 +72,7 @@ func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.UserSendMsgReq { ForceList: params.ForceList, Content: newContent, ClientMsgID: utils.GetMsgID(params.SendID), - Options: options, + Options: utils.MapIntToJsonString(options), } return &pbData } diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 58358a1e6..9b449d4b2 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -214,7 +214,7 @@ func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { SenderNickName: data.SenderNickName, SenderFaceURL: data.SenderFaceURL, Content: data.Content, - Options: data.Options, + Options: utils.MapIntToJsonString(data.Options), ClientMsgID: data.ClientMsgID, SendTime: sendTime, } diff --git a/internal/msg_transfer/logic/history_msg_handler.go b/internal/msg_transfer/logic/history_msg_handler.go index ce6e2ade5..4b25bd9bc 100644 --- a/internal/msg_transfer/logic/history_msg_handler.go +++ b/internal/msg_transfer/logic/history_msg_handler.go @@ -54,10 +54,11 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) pbSaveData.OperationID = pbData.OperationID pbSaveData.RecvID = pbData.RecvID pbSaveData.PlatformID = pbData.PlatformID + options := utils.JsonStringToMap(pbData.Options) //Control whether to store offline messages (mongo) - isHistory := utils.GetSwitchFromOptions(pbData.Options, "history") + isHistory := utils.GetSwitchFromOptions(options, "history") //Control whether to store history messages (mysql) - isPersist := utils.GetSwitchFromOptions(pbData.Options, "persistent") + isPersist := utils.GetSwitchFromOptions(options, "persistent") switch pbData.SessionType { case constant.SingleChatType: log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = SingleChatType", isHistory, isPersist) diff --git a/internal/msg_transfer/logic/persistent_msg_handler.go b/internal/msg_transfer/logic/persistent_msg_handler.go index aa4c0c7ba..2a13bb4a2 100644 --- a/internal/msg_transfer/logic/persistent_msg_handler.go +++ b/internal/msg_transfer/logic/persistent_msg_handler.go @@ -40,8 +40,9 @@ func (pc *PersistentConsumerHandler) handleChatWs2Mysql(msg []byte, msgKey strin log.ErrorByKv("msg_transfer Unmarshal chat err", "", "chat", string(msg), "err", err.Error()) return } + options := utils.JsonStringToMap(pbData.Options) //Control whether to store history messages (mysql) - isPersist := utils.GetSwitchFromOptions(pbData.Options, "persistent") + isPersist := utils.GetSwitchFromOptions(options, "persistent") //Only process receiver data if isPersist { if msgKey == pbData.RecvID && pbData.SessionType == constant.SingleChatType { diff --git a/internal/push/logic/push_handler.go b/internal/push/logic/push_handler.go index 22382a5b9..5058ce26d 100644 --- a/internal/push/logic/push_handler.go +++ b/internal/push/logic/push_handler.go @@ -12,6 +12,7 @@ import ( "Open_IM/pkg/common/log" pbChat "Open_IM/pkg/proto/chat" pbRelay "Open_IM/pkg/proto/relay" + "Open_IM/pkg/utils" "github.com/Shopify/sarama" "github.com/golang/protobuf/proto" ) @@ -53,7 +54,7 @@ func (ms *PushConsumerHandler) handleMs2PsChat(msg []byte) { sendPbData.PlatformID = pbData.PlatformID sendPbData.RecvSeq = pbData.RecvSeq //Call push module to send message to the user - MsgToUser(&sendPbData, pbData.OfflineInfo, pbData.Options) + MsgToUser(&sendPbData, pbData.OfflineInfo, utils.JsonStringToMap(pbData.Options)) } func (PushConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } func (PushConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index 8e6ad5db5..cc9e56177 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -71,7 +71,8 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (* } else { pbData.SendTime = pb.SendTime } - isHistory := utils.GetSwitchFromOptions(pbData.Options, "history") + options := utils.JsonStringToMap(pbData.Options) + isHistory := utils.GetSwitchFromOptions(options, "history") mReq := MsgCallBackReq{ SendID: pb.SendID, RecvID: pb.RecvID, @@ -237,10 +238,12 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i case constant.NotReceiveMessage: return false case constant.ReceiveNotNotifyMessage: - if msg.Options == nil { - msg.Options = make(map[string]int32, 2) + options := utils.JsonStringToMap(msg.Options) + if options == nil { + options = make(map[string]int32, 2) } - utils.SetSwitchFromOptions(msg.Options, "offlinePush", 0) + utils.SetSwitchFromOptions(options, "offlinePush", 0) + msg.Options = utils.MapIntToJsonString(options) return true } diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 93f64ff5f..4137616ea 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -198,14 +198,14 @@ func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgSvrToPu return errors.New("session == nil") } defer session.Close() - log.NewInfo("", "get mgoSession cost time", getCurrentTimestampByMill()-newTime) + log.NewDebug("", "get mgoSession cost time", getCurrentTimestampByMill()-newTime) c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) seqUid = getSeqUid(uid, m.RecvSeq) n, err := c.Find(bson.M{"uid": seqUid}).Count() if err != nil { return err } - log.NewInfo("", "find mgo uid cost time", getCurrentTimestampByMill()-newTime) + log.NewDebug("", "find mgo uid cost time", getCurrentTimestampByMill()-newTime) sMsg := MsgInfo{} sMsg.SendTime = sendTime if sMsg.Msg, err = proto.Marshal(m); err != nil { @@ -225,7 +225,7 @@ func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgSvrToPu return err } } - log.NewInfo("", "insert mgo data cost time", getCurrentTimestampByMill()-newTime) + log.NewDebug("", "insert mgo data cost time", getCurrentTimestampByMill()-newTime) return nil } diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go index ea30d3911..b53d2b8a1 100644 --- a/pkg/proto/push/push.pb.go +++ b/pkg/proto/push/push.pb.go @@ -24,32 +24,32 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PushMsgReq struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,10,opt,name=MsgID" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options map[string]int32 `protobuf:"bytes,12,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID" json:"PlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` + SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,10,opt,name=MsgID" json:"MsgID,omitempty"` + OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,12,opt,name=Options" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID" json:"PlatformID,omitempty"` + SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PushMsgReq) Reset() { *m = PushMsgReq{} } func (m *PushMsgReq) String() string { return proto.CompactTextString(m) } func (*PushMsgReq) ProtoMessage() {} func (*PushMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_push_380e4afdaa5f6119, []int{0} + return fileDescriptor_push_e44270f7d93180b9, []int{0} } func (m *PushMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgReq.Unmarshal(m, b) @@ -146,11 +146,11 @@ func (m *PushMsgReq) GetOfflineInfo() string { return "" } -func (m *PushMsgReq) GetOptions() map[string]int32 { +func (m *PushMsgReq) GetOptions() string { if m != nil { return m.Options } - return nil + return "" } func (m *PushMsgReq) GetPlatformID() int32 { @@ -192,7 +192,7 @@ func (m *PushMsgResp) Reset() { *m = PushMsgResp{} } func (m *PushMsgResp) String() string { return proto.CompactTextString(m) } func (*PushMsgResp) ProtoMessage() {} func (*PushMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_push_380e4afdaa5f6119, []int{1} + return fileDescriptor_push_e44270f7d93180b9, []int{1} } func (m *PushMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgResp.Unmarshal(m, b) @@ -221,7 +221,6 @@ func (m *PushMsgResp) GetResultCode() int32 { func init() { proto.RegisterType((*PushMsgReq)(nil), "push.PushMsgReq") - proto.RegisterMapType((map[string]int32)(nil), "push.PushMsgReq.OptionsEntry") proto.RegisterType((*PushMsgResp)(nil), "push.PushMsgResp") } @@ -297,35 +296,32 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{ Metadata: "push/push.proto", } -func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_380e4afdaa5f6119) } - -var fileDescriptor_push_380e4afdaa5f6119 = []byte{ - // 426 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x5f, 0x6b, 0xdb, 0x30, - 0x14, 0xc5, 0x71, 0x13, 0x27, 0xed, 0x4d, 0xf3, 0x67, 0x62, 0x0c, 0x11, 0xd8, 0x30, 0x65, 0x8c, - 0xbc, 0xcc, 0x83, 0xee, 0x61, 0xa3, 0x7b, 0x19, 0xab, 0x57, 0x30, 0x2c, 0x6d, 0x51, 0xba, 0x97, - 0xbd, 0xb9, 0xe9, 0x4d, 0x6a, 0xea, 0x48, 0xaa, 0x25, 0x07, 0xf2, 0x11, 0xf7, 0xad, 0x86, 0xae, - 0xec, 0xc6, 0xcb, 0x8b, 0xd1, 0xf9, 0xdd, 0xa3, 0x6b, 0xdd, 0xc3, 0x85, 0xb1, 0xae, 0xcc, 0xe3, - 0x27, 0xf7, 0x89, 0x75, 0xa9, 0xac, 0x62, 0x5d, 0x77, 0x3e, 0xfb, 0xdb, 0x05, 0xb8, 0xad, 0xcc, - 0xe3, 0xdc, 0xac, 0x05, 0x3e, 0xb3, 0x37, 0xd0, 0x5b, 0xa0, 0x7c, 0x48, 0x13, 0x1e, 0x44, 0xc1, - 0xec, 0x44, 0xd4, 0xca, 0x71, 0x81, 0xcb, 0x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0x30, 0xf4, 0xe4, 0x2a, - 0x5b, 0xe2, 0x6f, 0xf1, 0x8b, 0x8f, 0xc9, 0xf6, 0x3f, 0xa4, 0x10, 0x8b, 0x1c, 0xa5, 0xf5, 0x43, - 0x4e, 0xfc, 0x20, 0x2d, 0x34, 0xbd, 0x80, 0xd3, 0xf6, 0x43, 0xd9, 0x04, 0x3a, 0x4f, 0xb8, 0xab, - 0xb7, 0xc1, 0x1d, 0x5d, 0x44, 0xdb, 0xac, 0xa8, 0x90, 0x36, 0x21, 0x14, 0x5e, 0x5c, 0x1c, 0x7d, - 0x0d, 0xce, 0x3e, 0xc2, 0xe0, 0x65, 0x5e, 0xa3, 0xdd, 0x68, 0x02, 0x4d, 0x55, 0xd8, 0x4b, 0xf5, - 0x80, 0xd4, 0x21, 0x14, 0x2d, 0x72, 0xfe, 0x1d, 0x46, 0xb5, 0x7d, 0x81, 0xe5, 0x36, 0x5f, 0x22, - 0x8b, 0xa1, 0x5f, 0x13, 0x36, 0x39, 0xcc, 0x6f, 0xfa, 0xea, 0x80, 0x18, 0xfd, 0x63, 0xfc, 0x67, - 0x18, 0xd3, 0x4a, 0x7f, 0xd3, 0xf7, 0x8e, 0xdf, 0xf7, 0x68, 0xb5, 0x3f, 0xff, 0x0b, 0x00, 0x00, - 0xff, 0xff, 0xf0, 0x9a, 0xaa, 0x81, 0xed, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_e44270f7d93180b9) } + +var fileDescriptor_push_e44270f7d93180b9 = []byte{ + // 378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x5d, 0xeb, 0xda, 0x30, + 0x14, 0xc6, 0xe9, 0xb4, 0xbe, 0x1c, 0xe7, 0xcb, 0xc2, 0x18, 0xc1, 0x8b, 0x51, 0x64, 0x0c, 0x6f, + 0xd6, 0xc1, 0x76, 0xb9, 0x9b, 0x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 0x4b, 0xd3, 0x3c, 0xe3, + 0x18, 0xf2, 0x54, 0xd0, 0x41, 0xdd, 0xf7, 0x40, 0x3a, 0xf7, 0x46, 0xea, 0x19, 0x8a, 0xbe, 0xb6, + 0xf7, 0x50, 0x4b, 0xf2, 0x1e, 0x60, 0x9b, 0xc7, 0x55, 0x2a, 0xca, 0x22, 0x0c, 0xe8, 0xd0, 0x84, + 0x6a, 0x10, 0xf2, 0x11, 0x46, 0xfa, 0xf4, 0x58, 0xae, 0xb3, 0xe4, 0xcf, 0x3a, 0x2e, 0x90, 0x8e, + 0xcc, 0x80, 0x27, 0x4a, 0x3e, 0xc0, 0xd0, 0x92, 0x65, 0x9c, 0xe0, 0x2f, 0xf6, 0x93, 0x8e, 0x8d, + 0xed, 0x25, 0x34, 0xb7, 0x94, 0x67, 0xc8, 0x2b, 0x7b, 0x8a, 0x89, 0x4d, 0xda, 0x40, 0xb3, 0x4f, + 0x30, 0xb8, 0xbf, 0xb7, 0x92, 0x3a, 0x1e, 0x43, 0x75, 0xc9, 0xab, 0x85, 0x38, 0xa0, 0x79, 0x74, + 0x97, 0x35, 0xc8, 0x97, 0xef, 0x30, 0xaa, 0xed, 0x11, 0x96, 0xd7, 0x2c, 0x41, 0xe2, 0x43, 0xb7, + 0x26, 0x64, 0xe2, 0x9b, 0x7d, 0x7a, 0xec, 0xcf, 0xf4, 0xcd, 0x13, 0x51, 0xf2, 0xc7, 0xf8, 0xf7, + 0xd0, 0x37, 0x7b, 0xf7, 0x4d, 0xee, 0x35, 0xdf, 0x77, 0xcc, 0xfe, 0x7d, 0xfd, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0x6b, 0x53, 0xf4, 0xd4, 0x92, 0x02, 0x00, 0x00, } diff --git a/pkg/utils/map.go b/pkg/utils/map.go index fec4da23e..4b8f9fa8d 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -111,7 +111,7 @@ func MapIntToJsonString(param map[string]int32) string { dataString := string(dataType) return dataString } -func JsonStringToMap(str string) (tempMap map[string]interface{}) { +func JsonStringToMap(str string) (tempMap map[string]int32) { _ = json.Unmarshal([]byte(str), &tempMap) return tempMap } From eabef540cfbf1f9b3497581a0f9c303ad808f37a Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 10 Dec 2021 10:51:20 +0800 Subject: [PATCH 24/25] pb change --- pkg/proto/chat/chat.pb.go | 293 +++++++++++++++++++------------------- 1 file changed, 143 insertions(+), 150 deletions(-) diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 06118c3d1..dfe51b472 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -24,33 +24,33 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type WSToMsgSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - SendTime int64 `protobuf:"varint,4,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - SenderNickName string `protobuf:"bytes,6,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,7,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,11,opt,name=MsgID" json:"MsgID,omitempty"` - Token string `protobuf:"bytes,12,opt,name=Token" json:"Token,omitempty"` - OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options map[string]int32 `protobuf:"bytes,14,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` - ForceList []string `protobuf:"bytes,16,rep,name=ForceList" json:"ForceList,omitempty"` - ClientMsgID string `protobuf:"bytes,17,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + SendTime int64 `protobuf:"varint,4,opt,name=SendTime" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + SenderNickName string `protobuf:"bytes,6,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,7,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,11,opt,name=MsgID" json:"MsgID,omitempty"` + Token string `protobuf:"bytes,12,opt,name=Token" json:"Token,omitempty"` + OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` + ForceList []string `protobuf:"bytes,16,rep,name=ForceList" json:"ForceList,omitempty"` + ClientMsgID string `protobuf:"bytes,17,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *WSToMsgSvrChatMsg) Reset() { *m = WSToMsgSvrChatMsg{} } func (m *WSToMsgSvrChatMsg) String() string { return proto.CompactTextString(m) } func (*WSToMsgSvrChatMsg) ProtoMessage() {} func (*WSToMsgSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{0} + return fileDescriptor_chat_163a8d226aa6edb5, []int{0} } func (m *WSToMsgSvrChatMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WSToMsgSvrChatMsg.Unmarshal(m, b) @@ -161,11 +161,11 @@ func (m *WSToMsgSvrChatMsg) GetOfflineInfo() string { return "" } -func (m *WSToMsgSvrChatMsg) GetOptions() map[string]int32 { +func (m *WSToMsgSvrChatMsg) GetOptions() string { if m != nil { return m.Options } - return nil + return "" } func (m *WSToMsgSvrChatMsg) GetPlatformID() int32 { @@ -190,32 +190,32 @@ func (m *WSToMsgSvrChatMsg) GetClientMsgID() string { } type MsgSvrToPushSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - SenderNickName string `protobuf:"bytes,7,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,8,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ContentType int32 `protobuf:"varint,9,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,10,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,11,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,12,opt,name=MsgID" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options map[string]int32 `protobuf:"bytes,14,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` + RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` + SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + SenderNickName string `protobuf:"bytes,7,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,8,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + ContentType int32 `protobuf:"varint,9,opt,name=ContentType" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,10,opt,name=SessionType" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,11,opt,name=OperationID" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,12,opt,name=MsgID" json:"MsgID,omitempty"` + OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgSvrToPushSvrChatMsg) Reset() { *m = MsgSvrToPushSvrChatMsg{} } func (m *MsgSvrToPushSvrChatMsg) String() string { return proto.CompactTextString(m) } func (*MsgSvrToPushSvrChatMsg) ProtoMessage() {} func (*MsgSvrToPushSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{1} + return fileDescriptor_chat_163a8d226aa6edb5, []int{1} } func (m *MsgSvrToPushSvrChatMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Unmarshal(m, b) @@ -326,11 +326,11 @@ func (m *MsgSvrToPushSvrChatMsg) GetOfflineInfo() string { return "" } -func (m *MsgSvrToPushSvrChatMsg) GetOptions() map[string]int32 { +func (m *MsgSvrToPushSvrChatMsg) GetOptions() string { if m != nil { return m.Options } - return nil + return "" } func (m *MsgSvrToPushSvrChatMsg) GetPlatformID() int32 { @@ -361,7 +361,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{2} + return fileDescriptor_chat_163a8d226aa6edb5, []int{2} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -425,7 +425,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{3} + return fileDescriptor_chat_163a8d226aa6edb5, []int{3} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -500,7 +500,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{4} + return fileDescriptor_chat_163a8d226aa6edb5, []int{4} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -553,7 +553,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{5} + return fileDescriptor_chat_163a8d226aa6edb5, []int{5} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -601,7 +601,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{6} + return fileDescriptor_chat_163a8d226aa6edb5, []int{6} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -663,7 +663,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{7} + return fileDescriptor_chat_163a8d226aa6edb5, []int{7} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -731,7 +731,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{8} + return fileDescriptor_chat_163a8d226aa6edb5, []int{8} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -836,34 +836,34 @@ func (m *MsgFormat) GetClientMsgID() string { } type UserSendMsgReq struct { - ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` - Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` - SendID string `protobuf:"bytes,3,opt,name=SendID" json:"SendID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` - SenderNickName string `protobuf:"bytes,5,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,6,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - PlatformID int32 `protobuf:"varint,7,opt,name=PlatformID" json:"PlatformID,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,9,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,10,opt,name=ContentType" json:"ContentType,omitempty"` - RecvID string `protobuf:"bytes,11,opt,name=RecvID" json:"RecvID,omitempty"` - ForceList []string `protobuf:"bytes,12,rep,name=ForceList" json:"ForceList,omitempty"` - Content string `protobuf:"bytes,13,opt,name=Content" json:"Content,omitempty"` - Options map[string]int32 `protobuf:"bytes,14,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo" json:"OffLineInfo,omitempty"` - Ex string `protobuf:"bytes,17,opt,name=Ex" json:"Ex,omitempty"` - SendTime int64 `protobuf:"varint,18,opt,name=sendTime" json:"sendTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` + Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` + SendID string `protobuf:"bytes,3,opt,name=SendID" json:"SendID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + SenderNickName string `protobuf:"bytes,5,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,6,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + PlatformID int32 `protobuf:"varint,7,opt,name=PlatformID" json:"PlatformID,omitempty"` + SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,9,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,10,opt,name=ContentType" json:"ContentType,omitempty"` + RecvID string `protobuf:"bytes,11,opt,name=RecvID" json:"RecvID,omitempty"` + ForceList []string `protobuf:"bytes,12,rep,name=ForceList" json:"ForceList,omitempty"` + Content string `protobuf:"bytes,13,opt,name=Content" json:"Content,omitempty"` + Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` + ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo" json:"OffLineInfo,omitempty"` + Ex string `protobuf:"bytes,17,opt,name=Ex" json:"Ex,omitempty"` + SendTime int64 `protobuf:"varint,18,opt,name=sendTime" json:"sendTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } func (*UserSendMsgReq) ProtoMessage() {} func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{9} + return fileDescriptor_chat_163a8d226aa6edb5, []int{9} } func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) @@ -974,11 +974,11 @@ func (m *UserSendMsgReq) GetContent() string { return "" } -func (m *UserSendMsgReq) GetOptions() map[string]int32 { +func (m *UserSendMsgReq) GetOptions() string { if m != nil { return m.Options } - return nil + return "" } func (m *UserSendMsgReq) GetClientMsgID() string { @@ -1025,7 +1025,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_3707ac912effe95d, []int{10} + return fileDescriptor_chat_163a8d226aa6edb5, []int{10} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1089,9 +1089,7 @@ func (m *UserSendMsgResp) GetSendTime() int64 { func init() { proto.RegisterType((*WSToMsgSvrChatMsg)(nil), "pbChat.WSToMsgSvrChatMsg") - proto.RegisterMapType((map[string]int32)(nil), "pbChat.WSToMsgSvrChatMsg.OptionsEntry") proto.RegisterType((*MsgSvrToPushSvrChatMsg)(nil), "pbChat.MsgSvrToPushSvrChatMsg") - proto.RegisterMapType((map[string]int32)(nil), "pbChat.MsgSvrToPushSvrChatMsg.OptionsEntry") proto.RegisterType((*PullMessageReq)(nil), "pbChat.PullMessageReq") proto.RegisterType((*PullMessageResp)(nil), "pbChat.PullMessageResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "pbChat.PullMessageBySeqListReq") @@ -1100,7 +1098,6 @@ func init() { proto.RegisterType((*GatherFormat)(nil), "pbChat.GatherFormat") proto.RegisterType((*MsgFormat)(nil), "pbChat.MsgFormat") proto.RegisterType((*UserSendMsgReq)(nil), "pbChat.UserSendMsgReq") - proto.RegisterMapType((map[string]int32)(nil), "pbChat.UserSendMsgReq.OptionsEntry") proto.RegisterType((*UserSendMsgResp)(nil), "pbChat.UserSendMsgResp") } @@ -1275,74 +1272,70 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_3707ac912effe95d) } - -var fileDescriptor_chat_3707ac912effe95d = []byte{ - // 1049 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0xc7, 0x15, 0x3b, 0x4e, 0x9a, 0x93, 0xcf, 0x0e, 0x55, 0x77, 0x14, 0x10, 0x44, 0x61, 0x59, - 0x45, 0x20, 0x05, 0x69, 0xb9, 0x59, 0x15, 0xb1, 0x82, 0x36, 0x69, 0x15, 0xd4, 0x74, 0x2b, 0x27, - 0x2b, 0x24, 0xee, 0xbc, 0xc9, 0x24, 0xb5, 0x9a, 0xd8, 0xc9, 0x8c, 0x5b, 0xda, 0x1b, 0xde, 0x80, - 0xb7, 0xe0, 0x65, 0x78, 0x0e, 0xae, 0xb8, 0xe6, 0x1a, 0x09, 0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0x86, 0xe6, 0xb3, 0x4c, 0x3f, 0x5b, 0xa1, - 0x4b, 0x38, 0xc8, 0x9a, 0x77, 0xe8, 0xb3, 0x8c, 0x05, 0xea, 0x34, 0xdc, 0xbe, 0xe3, 0x6b, 0x28, - 0x2b, 0x1d, 0x8b, 0x4f, 0xa4, 0xb3, 0x19, 0xaf, 0x4f, 0xb4, 0xf7, 0xb8, 0xfe, 0x73, 0xb5, 0x2b, - 0x7e, 0xe1, 0x7d, 0x2b, 0x03, 0xde, 0x15, 0xc4, 0x2f, 0xbd, 0x6f, 0xfe, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0xa2, 0x9b, 0xc2, 0xf2, 0xfc, 0x0d, 0x00, 0x00, +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_163a8d226aa6edb5) } + +var fileDescriptor_chat_163a8d226aa6edb5 = []byte{ + // 981 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x6a, 0xe3, 0x46, + 0x14, 0xc6, 0x92, 0x2d, 0xdb, 0xc7, 0xbf, 0x99, 0x86, 0xec, 0x90, 0x96, 0xd6, 0x88, 0x6d, 0x31, + 0xbd, 0x48, 0x61, 0x7b, 0x53, 0x5a, 0x58, 0x68, 0x62, 0x27, 0xa8, 0x44, 0xd9, 0x20, 0x7b, 0x29, + 0xf4, 0x4e, 0x6b, 0x8f, 0x15, 0xb1, 0xb6, 0x24, 0xcf, 0x28, 0x69, 0xf6, 0xa6, 0xaf, 0xd0, 0x97, + 0xe8, 0x65, 0x5f, 0xa4, 0x8f, 0xd2, 0x57, 0x28, 0x14, 0xca, 0xcc, 0x48, 0xd6, 0xe8, 0xc7, 0x49, + 0xd8, 0xb2, 0x7b, 0x13, 0x38, 0x9f, 0xce, 0xfc, 0x9c, 0xf3, 0x7d, 0xf3, 0x1d, 0x07, 0x06, 0x8b, + 0x1b, 0x37, 0xfe, 0x86, 0xff, 0x39, 0x89, 0x68, 0x18, 0x87, 0xc8, 0x88, 0xde, 0x9c, 0xdd, 0xb8, + 0xb1, 0xf9, 0x7b, 0x1d, 0x0e, 0x7e, 0x9e, 0xcd, 0x43, 0x9b, 0x79, 0xb3, 0x3b, 0xca, 0x21, 0x9b, + 0x79, 0xe8, 0x08, 0x8c, 0x19, 0x09, 0x96, 0xd6, 0x04, 0xd7, 0x46, 0xb5, 0x71, 0xdb, 0x49, 0x22, + 0x8e, 0x3b, 0x64, 0x71, 0x67, 0x4d, 0xb0, 0x26, 0x71, 0x19, 0x21, 0x0c, 0xcd, 0xb3, 0x30, 0x88, + 0x49, 0x10, 0x63, 0x5d, 0x7c, 0x48, 0x43, 0x74, 0x0c, 0x2d, 0xbe, 0x76, 0xee, 0x6f, 0x08, 0xae, + 0x8f, 0x6a, 0x63, 0xdd, 0xd9, 0xc5, 0x7c, 0x95, 0xcd, 0xbc, 0x73, 0x1a, 0x6e, 0x70, 0x63, 0x54, + 0x1b, 0x37, 0x9c, 0x34, 0x44, 0x5f, 0x41, 0x9f, 0x67, 0x11, 0x7a, 0xe5, 0x2f, 0xde, 0x5e, 0xb9, + 0x1b, 0x82, 0x0d, 0xb1, 0x6d, 0x01, 0x45, 0xcf, 0xa1, 0x27, 0x91, 0x73, 0x77, 0x41, 0x5e, 0x3b, + 0x97, 0xb8, 0x29, 0xd2, 0xf2, 0x20, 0x1a, 0x41, 0x27, 0xb9, 0xce, 0xfc, 0x5d, 0x44, 0x70, 0x4b, + 0x9c, 0xa5, 0x42, 0x3c, 0x63, 0x46, 0x18, 0xf3, 0xc3, 0x40, 0x64, 0xb4, 0x65, 0x86, 0x02, 0xf1, + 0x8c, 0x57, 0x11, 0xa1, 0x6e, 0xec, 0x87, 0x81, 0x35, 0xc1, 0x20, 0xce, 0x51, 0x21, 0x74, 0x08, + 0x0d, 0x9b, 0x79, 0xd6, 0x04, 0x77, 0xc4, 0x37, 0x19, 0x70, 0x74, 0x1e, 0xbe, 0x25, 0x01, 0xee, + 0x4a, 0x54, 0x04, 0x62, 0xb7, 0xd5, 0x6a, 0xed, 0x07, 0xc4, 0x0a, 0x56, 0x21, 0xee, 0x25, 0xbb, + 0x65, 0x10, 0xef, 0xcd, 0xab, 0x88, 0xef, 0xcc, 0x70, 0x5f, 0x76, 0x34, 0x09, 0xd1, 0xe7, 0x00, + 0xd7, 0x6b, 0x37, 0x5e, 0x85, 0x74, 0x63, 0x4d, 0xf0, 0x40, 0x5c, 0x55, 0x41, 0xd0, 0x67, 0xd0, + 0x3e, 0x0f, 0xe9, 0x82, 0x5c, 0xfa, 0x2c, 0xc6, 0xc3, 0x91, 0x3e, 0x6e, 0x3b, 0x19, 0x20, 0x7a, + 0xb1, 0xf6, 0x49, 0x10, 0xcb, 0xbb, 0x1e, 0xc8, 0x93, 0x15, 0xc8, 0xfc, 0x47, 0x87, 0x23, 0xa9, + 0x86, 0x79, 0x78, 0x7d, 0xcb, 0x6e, 0x3e, 0x88, 0x2c, 0x30, 0x34, 0x79, 0xce, 0x8c, 0x6c, 0x13, + 0x55, 0xa4, 0x61, 0x4e, 0x30, 0x8d, 0xfd, 0x82, 0x31, 0x1e, 0x13, 0x4c, 0xf3, 0x69, 0x82, 0x69, + 0x3d, 0x41, 0x30, 0xed, 0x47, 0x05, 0x03, 0x8f, 0x0a, 0xa6, 0xf3, 0x80, 0x60, 0xba, 0xaa, 0x60, + 0x3e, 0xa4, 0x34, 0x0a, 0xe4, 0x0f, 0xcb, 0xe4, 0xff, 0x06, 0xfd, 0xeb, 0xdb, 0xf5, 0xda, 0x26, + 0x8c, 0xb9, 0x1e, 0x71, 0xc8, 0x96, 0x73, 0xfb, 0x9a, 0x11, 0x9a, 0x71, 0x2e, 0x23, 0xc9, 0xd3, + 0xf6, 0x94, 0x78, 0x7e, 0x20, 0x58, 0x17, 0x3c, 0xc9, 0x58, 0xea, 0x64, 0x3b, 0x0d, 0x96, 0x82, + 0x76, 0xdd, 0x49, 0xa2, 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c, 0xe9, 0x7d, 0xf2, 0x1b, 0x44, 0x9b, 0xde, 0x73, 0x29, 0xb3, 0x54, 0xca, 0x48, 0x4a, + 0x39, 0x8d, 0xcd, 0xbf, 0x6a, 0x30, 0xc8, 0xc9, 0xe5, 0xbd, 0xbc, 0xa6, 0xa4, 0x30, 0xbd, 0x4a, + 0x61, 0x85, 0x07, 0x5a, 0x2f, 0x3f, 0xd0, 0x42, 0xf5, 0x8d, 0x72, 0xf5, 0x6a, 0x2d, 0x46, 0xbe, + 0x96, 0x17, 0x7f, 0x68, 0x50, 0xe7, 0x9e, 0x84, 0x7e, 0x82, 0x41, 0xc1, 0x43, 0xd1, 0xf1, 0x6e, + 0x72, 0x94, 0xcc, 0xfa, 0xf8, 0xd3, 0xbd, 0xdf, 0x58, 0x84, 0x5e, 0x42, 0x47, 0x19, 0x27, 0xe8, + 0x28, 0xcd, 0xcd, 0xcf, 0xf3, 0xe3, 0x67, 0x95, 0x38, 0x8b, 0xd0, 0x35, 0x1c, 0x56, 0x8d, 0x23, + 0xf4, 0x45, 0xc5, 0x02, 0x75, 0x58, 0xed, 0xdf, 0xf1, 0x25, 0x74, 0x14, 0xc6, 0xb2, 0x1b, 0xe5, + 0x5f, 0x7d, 0xb6, 0xbe, 0x40, 0xef, 0xe9, 0xe0, 0x97, 0xde, 0x89, 0xf8, 0x9f, 0xe5, 0x07, 0x99, + 0xf0, 0xc6, 0x10, 0xff, 0xbb, 0x7c, 0xfb, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x44, 0x4e, + 0x52, 0xce, 0x0c, 0x00, 0x00, } From 776fa2f4f6252523c8ddc437fedbcf1b70e473f2 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 10 Dec 2021 11:04:05 +0800 Subject: [PATCH 25/25] pb change --- internal/push/logic/push_rpc_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/logic/push_rpc_server.go b/internal/push/logic/push_rpc_server.go index ca0e93880..570f5c28b 100644 --- a/internal/push/logic/push_rpc_server.go +++ b/internal/push/logic/push_rpc_server.go @@ -65,7 +65,7 @@ func (r *RPCServer) PushMsg(_ context.Context, pbData *pbPush.PushMsgReq) (*pbPu sendPbData.PlatformID = pbData.PlatformID sendPbData.RecvSeq = pbData.RecvSeq //Call push module to send message to the user - MsgToUser(&sendPbData, pbData.OfflineInfo, pbData.Options) + MsgToUser(&sendPbData, pbData.OfflineInfo, utils.JsonStringToMap(pbData.Options)) return &pbPush.PushMsgResp{ ResultCode: 0, }, nil