From bf6efc3530b3a783eb44b545b871bc51c49ac0b2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 10 Feb 2022 18:32:02 +0800 Subject: [PATCH] Refactor code --- internal/rpc/msg/friend_notification.go | 9 ++ internal/rpc/msg/group_notification.go | 8 ++ pkg/proto/sdk_ws/ws.pb.go | 161 +++++++++++++----------- pkg/proto/sdk_ws/ws.proto | 1 + 4 files changed, 103 insertions(+), 76 deletions(-) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index 231906fa8..91d926bf9 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -9,6 +9,7 @@ import ( pbFriend "Open_IM/pkg/proto/friend" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" ) @@ -34,6 +35,14 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess return } + marshaler := jsonpb.Marshaler{ + OrigName: true, + EnumsAsInts: false, + EmitDefaults: false, + } + + tips.JsonDetail, _ = marshaler.MarshalToString(m) + fromUserNickname, toUserNickname, err := getFromToUserNickname(commID.FromUserID, commID.ToUserID) if err != nil { log.Error(commID.OperationID, "getFromToUserNickname failed ", err.Error(), commID.FromUserID, commID.ToUserID) diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index b252c6513..16c81600a 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -10,6 +10,7 @@ import ( pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" ) @@ -109,6 +110,13 @@ func groupNotification(contentType int32, m proto.Message, sendID, groupID, recv log.Error(operationID, "Marshal failed ", err.Error(), m.String()) return } + marshaler := jsonpb.Marshaler{ + OrigName: true, + EnumsAsInts: false, + EmitDefaults: false, + } + + tips.JsonDetail, _ = marshaler.MarshalToString(m) from, err := imdb.GetUserByUserID(sendID) if err != nil { diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index c99165093..59c51c7f6 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{0} + return fileDescriptor_ws_36d5733e27207cb1, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{1} + return fileDescriptor_ws_36d5733e27207cb1, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{2} + return fileDescriptor_ws_36d5733e27207cb1, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{3} + return fileDescriptor_ws_36d5733e27207cb1, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{4} + return fileDescriptor_ws_36d5733e27207cb1, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{5} + return fileDescriptor_ws_36d5733e27207cb1, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{6} + return fileDescriptor_ws_36d5733e27207cb1, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{7} + return fileDescriptor_ws_36d5733e27207cb1, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -863,7 +863,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{8} + return fileDescriptor_ws_36d5733e27207cb1, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -917,7 +917,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_ws_dd0597f97f3a9074, []int{9} + return fileDescriptor_ws_36d5733e27207cb1, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -968,7 +968,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_ws_dd0597f97f3a9074, []int{10} + return fileDescriptor_ws_36d5733e27207cb1, []int{10} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1000,7 +1000,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_ws_dd0597f97f3a9074, []int{11} + return fileDescriptor_ws_36d5733e27207cb1, []int{11} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1047,7 +1047,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_ws_dd0597f97f3a9074, []int{12} + return fileDescriptor_ws_36d5733e27207cb1, []int{12} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1116,7 +1116,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{13} + return fileDescriptor_ws_36d5733e27207cb1, []int{13} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1277,7 +1277,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{14} + return fileDescriptor_ws_36d5733e27207cb1, []int{14} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1335,6 +1335,7 @@ func (m *OfflinePushInfo) GetIOSBadgeCount() bool { type TipsComm struct { Detail []byte `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` DefaultTips string `protobuf:"bytes,2,opt,name=defaultTips" json:"defaultTips,omitempty"` + JsonDetail string `protobuf:"bytes,3,opt,name=jsonDetail" json:"jsonDetail,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1344,7 +1345,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{15} + return fileDescriptor_ws_36d5733e27207cb1, []int{15} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1378,6 +1379,13 @@ func (m *TipsComm) GetDefaultTips() string { return "" } +func (m *TipsComm) GetJsonDetail() string { + if m != nil { + return m.JsonDetail + } + return "" +} + // OnGroupCreated() type GroupCreatedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` @@ -1394,7 +1402,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{16} + return fileDescriptor_ws_36d5733e27207cb1, []int{16} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1463,7 +1471,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoSetTips) ProtoMessage() {} func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{17} + return fileDescriptor_ws_36d5733e27207cb1, []int{17} } func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) @@ -1518,7 +1526,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{18} + return fileDescriptor_ws_36d5733e27207cb1, []int{18} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1574,7 +1582,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } func (*MemberQuitTips) ProtoMessage() {} func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{19} + return fileDescriptor_ws_36d5733e27207cb1, []int{19} } func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) @@ -1629,7 +1637,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationAcceptedTips) ProtoMessage() {} func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{20} + return fileDescriptor_ws_36d5733e27207cb1, []int{20} } func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) @@ -1684,7 +1692,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationRejectedTips) ProtoMessage() {} func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{21} + return fileDescriptor_ws_36d5733e27207cb1, []int{21} } func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) @@ -1740,7 +1748,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } func (*GroupOwnerTransferredTips) ProtoMessage() {} func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{22} + return fileDescriptor_ws_36d5733e27207cb1, []int{22} } func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) @@ -1803,7 +1811,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{23} + return fileDescriptor_ws_36d5733e27207cb1, []int{23} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1866,7 +1874,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{24} + return fileDescriptor_ws_36d5733e27207cb1, []int{24} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1928,7 +1936,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{25} + return fileDescriptor_ws_36d5733e27207cb1, []int{25} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1982,7 +1990,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{26} + return fileDescriptor_ws_36d5733e27207cb1, []int{26} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2035,7 +2043,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{27} + return fileDescriptor_ws_36d5733e27207cb1, []int{27} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2081,7 +2089,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationTips) ProtoMessage() {} func (*FriendApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{28} + return fileDescriptor_ws_36d5733e27207cb1, []int{28} } func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) @@ -2121,7 +2129,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationApprovedTips) ProtoMessage() {} func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{29} + return fileDescriptor_ws_36d5733e27207cb1, []int{29} } func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) @@ -2168,7 +2176,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationRejectedTips) ProtoMessage() {} func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{30} + return fileDescriptor_ws_36d5733e27207cb1, []int{30} } func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) @@ -2216,7 +2224,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{31} + return fileDescriptor_ws_36d5733e27207cb1, []int{31} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2269,7 +2277,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{32} + return fileDescriptor_ws_36d5733e27207cb1, []int{32} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2307,7 +2315,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{33} + return fileDescriptor_ws_36d5733e27207cb1, []int{33} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2345,7 +2353,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{34} + return fileDescriptor_ws_36d5733e27207cb1, []int{34} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2383,7 +2391,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{35} + return fileDescriptor_ws_36d5733e27207cb1, []int{35} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2422,7 +2430,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*UserInfoUpdatedTips) ProtoMessage() {} func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_dd0597f97f3a9074, []int{36} + return fileDescriptor_ws_36d5733e27207cb1, []int{36} } func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) @@ -2490,10 +2498,10 @@ func init() { proto.RegisterType((*UserInfoUpdatedTips)(nil), "server_api_params.UserInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_dd0597f97f3a9074) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_36d5733e27207cb1) } -var fileDescriptor_ws_dd0597f97f3a9074 = []byte{ - // 1901 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_36d5733e27207cb1 = []byte{ + // 1911 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6f, 0x23, 0x4b, 0x11, 0xd7, 0xd8, 0xb1, 0x63, 0x97, 0xe3, 0x38, 0x3b, 0xfb, 0x58, 0xcc, 0xb2, 0x6f, 0x09, 0xa3, 0xa7, 0xc7, 0x0a, 0x89, 0x20, 0x2d, 0x42, 0x82, 0x45, 0x80, 0xb2, 0xc9, 0x26, 0xec, 0x23, 0x4e, @@ -2577,40 +2585,41 @@ var fileDescriptor_ws_dd0597f97f3a9074 = []byte{ 0x75, 0x1a, 0xa5, 0x31, 0xd1, 0x1a, 0x14, 0xe1, 0xba, 0xb0, 0x16, 0x12, 0x31, 0xd2, 0x29, 0x8c, 0xbf, 0x75, 0x27, 0xab, 0x17, 0xe3, 0xa2, 0xbc, 0xe8, 0x9d, 0x0c, 0xa5, 0xa2, 0x21, 0xcb, 0x68, 0x58, 0x5c, 0xf4, 0x0c, 0x9e, 0x4c, 0xa1, 0xe8, 0x64, 0xf8, 0x3c, 0x08, 0x27, 0x44, 0x5d, 0xc7, - 0x1a, 0x68, 0x93, 0xcd, 0xf4, 0xf6, 0xa1, 0x75, 0x16, 0x25, 0x62, 0x8f, 0x4d, 0xa7, 0x32, 0x10, - 0x21, 0x49, 0xe5, 0xac, 0xea, 0x60, 0xbc, 0x35, 0x25, 0x53, 0x25, 0x24, 0xe3, 0x20, 0x8b, 0x53, - 0xb9, 0x34, 0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 0x92, 0xb0, 0xb8, 0xa2, 0x5c, + 0xf3, 0x30, 0x73, 0xde, 0xc4, 0x3f, 0xfb, 0xbe, 0xf3, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe5, + 0xdc, 0xac, 0x39, 0xff, 0x1b, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index a3f018db3..511409227 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -170,6 +170,7 @@ message OfflinePushInfo{ message TipsComm{ bytes detail = 1; string defaultTips = 2; + string jsonDetail = 3; } //////////////////////group/////////////////////