mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
forward message supported.
This commit is contained in:
parent
2accd73f8b
commit
802dd69755
@ -2,6 +2,7 @@ package binary
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"compress/gzip"
|
||||||
"compress/zlib"
|
"compress/zlib"
|
||||||
binary2 "encoding/binary"
|
binary2 "encoding/binary"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
@ -19,6 +20,22 @@ func ZlibUncompress(src []byte) []byte {
|
|||||||
return out.Bytes()
|
return out.Bytes()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ZlibCompress(data []byte) []byte {
|
||||||
|
buf := new(bytes.Buffer)
|
||||||
|
w := zlib.NewWriter(buf)
|
||||||
|
_, _ = w.Write(data)
|
||||||
|
w.Close()
|
||||||
|
return buf.Bytes()
|
||||||
|
}
|
||||||
|
|
||||||
|
func GZipCompress(data []byte) []byte {
|
||||||
|
buf := new(bytes.Buffer)
|
||||||
|
w := gzip.NewWriter(buf)
|
||||||
|
_, _ = w.Write(data)
|
||||||
|
w.Close()
|
||||||
|
return buf.Bytes()
|
||||||
|
}
|
||||||
|
|
||||||
func CalculateImageResourceId(md5 []byte) string {
|
func CalculateImageResourceId(md5 []byte) string {
|
||||||
return strings.ToUpper(fmt.Sprintf(
|
return strings.ToUpper(fmt.Sprintf(
|
||||||
"{%s}.png", GenUUID(md5),
|
"{%s}.png", GenUUID(md5),
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"github.com/Mrs4s/MiraiGo/client/pb"
|
"github.com/Mrs4s/MiraiGo/client/pb"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x352"
|
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x352"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
||||||
|
"github.com/Mrs4s/MiraiGo/client/pb/multimsg"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/structmsg"
|
"github.com/Mrs4s/MiraiGo/client/pb/structmsg"
|
||||||
"github.com/Mrs4s/MiraiGo/message"
|
"github.com/Mrs4s/MiraiGo/message"
|
||||||
@ -384,19 +385,34 @@ func (c *QQClient) buildDeleteOnlinePushPacket(uin int64, seq uint16, delMsg []j
|
|||||||
// MessageSvc.PbSendMsg
|
// MessageSvc.PbSendMsg
|
||||||
func (c *QQClient) buildGroupSendingPacket(groupCode int64, r int32, m *message.SendingMessage) (uint16, []byte) {
|
func (c *QQClient) buildGroupSendingPacket(groupCode int64, r int32, m *message.SendingMessage) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
|
forward := func() bool {
|
||||||
|
for _, elem := range m.Elements {
|
||||||
|
if e, ok := elem.(*message.ServiceElement); ok {
|
||||||
|
if e.Id == 35 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}()
|
||||||
req := &msg.SendMessageRequest{
|
req := &msg.SendMessageRequest{
|
||||||
RoutingHead: &msg.RoutingHead{Grp: &msg.Grp{GroupCode: groupCode}},
|
RoutingHead: &msg.RoutingHead{Grp: &msg.Grp{GroupCode: groupCode}},
|
||||||
ContentHead: &msg.ContentHead{PkgNum: 1},
|
ContentHead: &msg.ContentHead{PkgNum: 1},
|
||||||
MsgBody: &msg.MessageBody{
|
MsgBody: &msg.MessageBody{
|
||||||
RichText: &msg.RichText{
|
RichText: &msg.RichText{
|
||||||
Elems: message.ToProtoElems(m.Elements),
|
Elems: message.ToProtoElems(m.Elements, true),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
MsgSeq: c.nextGroupSeq(),
|
MsgSeq: c.nextGroupSeq(),
|
||||||
MsgRand: r,
|
MsgRand: r,
|
||||||
SyncCookie: EmptyBytes,
|
SyncCookie: EmptyBytes,
|
||||||
MsgVia: 1,
|
MsgVia: 1,
|
||||||
MsgCtrl: nil,
|
MsgCtrl: func() *msg.MsgCtrl {
|
||||||
|
if forward {
|
||||||
|
return &msg.MsgCtrl{MsgFlag: 4}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(),
|
||||||
}
|
}
|
||||||
payload, _ := proto.Marshal(req)
|
payload, _ := proto.Marshal(req)
|
||||||
packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbSendMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbSendMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
@ -411,7 +427,7 @@ func (c *QQClient) buildFriendSendingPacket(target int64, msgSeq, r int32, time
|
|||||||
ContentHead: &msg.ContentHead{PkgNum: 1},
|
ContentHead: &msg.ContentHead{PkgNum: 1},
|
||||||
MsgBody: &msg.MessageBody{
|
MsgBody: &msg.MessageBody{
|
||||||
RichText: &msg.RichText{
|
RichText: &msg.RichText{
|
||||||
Elems: message.ToProtoElems(m.Elements),
|
Elems: message.ToProtoElems(m.Elements, false),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
MsgSeq: msgSeq,
|
MsgSeq: msgSeq,
|
||||||
@ -508,6 +524,9 @@ func (c *QQClient) buildImageUploadPacket(data, updKey []byte, commandId int32,
|
|||||||
if commandId == 2 {
|
if commandId == 2 {
|
||||||
return c.nextGroupDataTransSeq()
|
return c.nextGroupDataTransSeq()
|
||||||
}
|
}
|
||||||
|
if commandId == 27 {
|
||||||
|
return c.nextHighwayApplySeq()
|
||||||
|
}
|
||||||
return c.nextGroupDataTransSeq()
|
return c.nextGroupDataTransSeq()
|
||||||
}(),
|
}(),
|
||||||
Appid: 537062409,
|
Appid: 537062409,
|
||||||
@ -813,3 +832,27 @@ func (c *QQClient) buildGroupMutePacket(groupCode, memberUin int64, time uint32)
|
|||||||
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x570_8", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x570_8", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MultiMsg.ApplyUp
|
||||||
|
func (c *QQClient) buildMultiApplyUpPacket(data, hash []byte, groupUin int64) (uint16, []byte) {
|
||||||
|
seq := c.nextSeq()
|
||||||
|
req := &multimsg.MultiReqBody{
|
||||||
|
Subcmd: 1,
|
||||||
|
TermType: 5,
|
||||||
|
PlatformType: 9,
|
||||||
|
NetType: 3,
|
||||||
|
BuildVer: "8.2.0.1296",
|
||||||
|
MultimsgApplyupReq: []*multimsg.MultiMsgApplyUpReq{
|
||||||
|
{
|
||||||
|
DstUin: groupUin,
|
||||||
|
MsgSize: int64(len(data)),
|
||||||
|
MsgMd5: hash,
|
||||||
|
MsgType: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
BuType: 2,
|
||||||
|
}
|
||||||
|
payload, _ := proto.Marshal(req)
|
||||||
|
packet := packets.BuildUniPacket(c.Uin, seq, "MultiMsg.ApplyUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
|
return seq, packet
|
||||||
|
}
|
||||||
|
@ -3,13 +3,18 @@ package client
|
|||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"github.com/Mrs4s/MiraiGo/binary"
|
"github.com/Mrs4s/MiraiGo/binary"
|
||||||
|
"github.com/Mrs4s/MiraiGo/client/pb/longmsg"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
||||||
|
"github.com/Mrs4s/MiraiGo/client/pb/multimsg"
|
||||||
"github.com/Mrs4s/MiraiGo/message"
|
"github.com/Mrs4s/MiraiGo/message"
|
||||||
"github.com/Mrs4s/MiraiGo/protocol/packets"
|
"github.com/Mrs4s/MiraiGo/protocol/packets"
|
||||||
"github.com/Mrs4s/MiraiGo/utils"
|
"github.com/Mrs4s/MiraiGo/utils"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -59,6 +64,7 @@ type QQClient struct {
|
|||||||
groupSeq int32
|
groupSeq int32
|
||||||
friendSeq int32
|
friendSeq int32
|
||||||
groupDataTransSeq int32
|
groupDataTransSeq int32
|
||||||
|
highwayApplyUpSeq int32
|
||||||
eventHandlers *eventHandlers
|
eventHandlers *eventHandlers
|
||||||
|
|
||||||
groupListLock *sync.Mutex
|
groupListLock *sync.Mutex
|
||||||
@ -111,13 +117,14 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
|||||||
"LongConn.OffPicUp": decodeOffPicUpResponse,
|
"LongConn.OffPicUp": decodeOffPicUpResponse,
|
||||||
"ProfileService.Pb.ReqSystemMsgNew.Group": decodeSystemMsgGroupPacket,
|
"ProfileService.Pb.ReqSystemMsgNew.Group": decodeSystemMsgGroupPacket,
|
||||||
"ProfileService.Pb.ReqSystemMsgNew.Friend": decodeSystemMsgFriendPacket,
|
"ProfileService.Pb.ReqSystemMsgNew.Friend": decodeSystemMsgFriendPacket,
|
||||||
//"MultiMsg.ApplyDown": decodeMultiMsgDownPacket,
|
"MultiMsg.ApplyUp": decodeMultiApplyUpResponse,
|
||||||
},
|
},
|
||||||
handlers: map[uint16]func(interface{}, error){},
|
handlers: map[uint16]func(interface{}, error){},
|
||||||
sigInfo: &loginSigInfo{},
|
sigInfo: &loginSigInfo{},
|
||||||
requestPacketRequestId: 1921334513,
|
requestPacketRequestId: 1921334513,
|
||||||
groupSeq: 22911,
|
groupSeq: 22911,
|
||||||
friendSeq: 22911,
|
friendSeq: 22911,
|
||||||
|
highwayApplyUpSeq: 77918,
|
||||||
ksid: []byte("|454001228437590|A8.2.7.27f6ea96"),
|
ksid: []byte("|454001228437590|A8.2.7.27f6ea96"),
|
||||||
eventHandlers: &eventHandlers{},
|
eventHandlers: &eventHandlers{},
|
||||||
groupListLock: new(sync.Mutex),
|
groupListLock: new(sync.Mutex),
|
||||||
@ -250,6 +257,48 @@ func (c *QQClient) SendPrivateMessage(target int64, m *message.SendingMessage) *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Need fix
|
||||||
|
func (c *QQClient) SendForwardMessage(groupCode int64, m *message.ForwardMessage) *message.GroupMessage {
|
||||||
|
if len(m.Nodes) >= 200 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
group := c.FindGroup(groupCode)
|
||||||
|
ts := time.Now().Unix()
|
||||||
|
seq := c.nextGroupSeq()
|
||||||
|
data, hash := m.CalculateValidationData(seq, rand.Int31(), groupCode)
|
||||||
|
i, err := c.sendAndWait(c.buildMultiApplyUpPacket(data, hash, group.Uin))
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
rsp := i.(*multimsg.MultiMsgApplyUpRsp)
|
||||||
|
body, _ := proto.Marshal(&longmsg.LongReqBody{
|
||||||
|
Subcmd: 1,
|
||||||
|
TermType: 5,
|
||||||
|
PlatformType: 9,
|
||||||
|
MsgUpReq: []*longmsg.LongMsgUpReq{
|
||||||
|
{
|
||||||
|
MsgType: 3,
|
||||||
|
DstUin: group.Uin,
|
||||||
|
MsgContent: data,
|
||||||
|
StoreType: 2,
|
||||||
|
MsgUkey: rsp.MsgUkey,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
for i, ip := range rsp.Uint32UpIp {
|
||||||
|
updServer := binary.UInt32ToIPV4Address(uint32(ip))
|
||||||
|
err := c.highwayUploadImage(updServer+":"+strconv.FormatInt(int64(rsp.Uint32UpPort[i]), 10), rsp.MsgSig, body, 27)
|
||||||
|
if err == nil {
|
||||||
|
var pv string
|
||||||
|
for i := 0; i < int(math.Min(4, float64(len(m.Nodes)))); i++ {
|
||||||
|
pv += fmt.Sprintf(`<title size="26" color="#777777">%s: %s</title>`, m.Nodes[i].SenderName, message.ToReadableString(m.Nodes[i].Message))
|
||||||
|
}
|
||||||
|
return c.SendGroupMessage(groupCode, genForwardMessage(rsp.MsgResid, pv, "群聊的聊天记录", "[聊天记录]", "聊天记录", fmt.Sprintf("查看 %d 条转发消息", len(m.Nodes)), ts))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *QQClient) RecallGroupMessage(groupCode int64, msgId, msgInternalId int32) {
|
func (c *QQClient) RecallGroupMessage(groupCode int64, msgId, msgInternalId int32) {
|
||||||
_, pkt := c.buildGroupRecallPacket(groupCode, msgId, msgInternalId)
|
_, pkt := c.buildGroupRecallPacket(groupCode, msgId, msgInternalId)
|
||||||
_ = c.send(pkt)
|
_ = c.send(pkt)
|
||||||
@ -271,7 +320,7 @@ func (c *QQClient) UploadGroupImage(groupCode int64, img []byte) (*message.Group
|
|||||||
}
|
}
|
||||||
for i, ip := range rsp.UploadIp {
|
for i, ip := range rsp.UploadIp {
|
||||||
updServer := binary.UInt32ToIPV4Address(uint32(ip))
|
updServer := binary.UInt32ToIPV4Address(uint32(ip))
|
||||||
err := c.highwayUploadImage(updServer+":"+strconv.FormatInt(int64(rsp.UploadPort[i]), 10), rsp.UploadKey, img)
|
err := c.highwayUploadImage(updServer+":"+strconv.FormatInt(int64(rsp.UploadPort[i]), 10), rsp.UploadKey, img, 2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -535,6 +584,12 @@ func (c *QQClient) nextGroupDataTransSeq() int32 {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *QQClient) nextHighwayApplySeq() int32 {
|
||||||
|
s := atomic.LoadInt32(&c.highwayApplyUpSeq)
|
||||||
|
atomic.AddInt32(&c.highwayApplyUpSeq, 2)
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
func (c *QQClient) send(pkt []byte) error {
|
func (c *QQClient) send(pkt []byte) error {
|
||||||
_, err := c.Conn.Write(pkt)
|
_, err := c.Conn.Write(pkt)
|
||||||
return err
|
return err
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/Mrs4s/MiraiGo/client/pb"
|
"github.com/Mrs4s/MiraiGo/client/pb"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x352"
|
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x352"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
||||||
|
"github.com/Mrs4s/MiraiGo/client/pb/multimsg"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/structmsg"
|
"github.com/Mrs4s/MiraiGo/client/pb/structmsg"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"sync"
|
"sync"
|
||||||
@ -667,3 +668,21 @@ func decodeForceOfflinePacket(c *QQClient, _ uint16, payload []byte) (interface{
|
|||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func decodeMultiApplyUpResponse(c *QQClient, _ uint16, payload []byte) (interface{}, error) {
|
||||||
|
body := multimsg.MultiRspBody{}
|
||||||
|
if err := proto.Unmarshal(payload, &body); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if len(body.MultimsgApplyupRsp) == 0 {
|
||||||
|
return nil, errors.New("rsp is empty")
|
||||||
|
}
|
||||||
|
rsp := body.MultimsgApplyupRsp[0]
|
||||||
|
switch rsp.Result {
|
||||||
|
case 0:
|
||||||
|
return rsp, nil
|
||||||
|
case 193:
|
||||||
|
return nil, errors.New("too large")
|
||||||
|
}
|
||||||
|
return nil, errors.New("failed")
|
||||||
|
}
|
||||||
|
@ -3,6 +3,7 @@ package client
|
|||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"github.com/Mrs4s/MiraiGo/binary"
|
"github.com/Mrs4s/MiraiGo/binary"
|
||||||
devinfo "github.com/Mrs4s/MiraiGo/client/pb"
|
devinfo "github.com/Mrs4s/MiraiGo/client/pb"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
||||||
@ -276,3 +277,23 @@ func packRequestDataV3(data []byte) (r []byte) {
|
|||||||
r = append(r, 0x0B)
|
r = append(r, 0x0B)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func genForwardMessage(resId, preview, title, brief, source, summary string, ts int64) *message.SendingMessage {
|
||||||
|
template := fmt.Sprintf(`
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<msg serviceID="35" templateID="1" action="viewMultiMsg" brief="%s" m_resid="%s" m_fileName="%d" tSum="3" sourceMsgId="0" url="" flag="3" adverSign="0" multiMsgFlag="0">
|
||||||
|
<item layout="1">
|
||||||
|
<title color="#000000" size="34">%s</title>
|
||||||
|
%s
|
||||||
|
<hr></hr>
|
||||||
|
<summary size="26" color="#808080">%s</summary>
|
||||||
|
</item>
|
||||||
|
<source name="%s"></source>
|
||||||
|
</msg>`, brief, resId, ts, title, preview, summary, source)
|
||||||
|
return &message.SendingMessage{Elements: []message.IMessageElement{
|
||||||
|
&message.ServiceElement{
|
||||||
|
Id: 35,
|
||||||
|
Content: template,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *QQClient) highwayUploadImage(ser string, updKey, img []byte) error {
|
func (c *QQClient) highwayUploadImage(ser string, updKey, img []byte, cmdId int32) error {
|
||||||
conn, err := net.DialTimeout("tcp", ser, time.Second*5)
|
conn, err := net.DialTimeout("tcp", ser, time.Second*5)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -20,7 +20,7 @@ func (c *QQClient) highwayUploadImage(ser string, updKey, img []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
h := md5.Sum(img)
|
h := md5.Sum(img)
|
||||||
pkt := c.buildImageUploadPacket(img, updKey, 2, h)
|
pkt := c.buildImageUploadPacket(img, updKey, cmdId, h)
|
||||||
for _, p := range pkt {
|
for _, p := range pkt {
|
||||||
_, err = conn.Write(p)
|
_, err = conn.Write(p)
|
||||||
}
|
}
|
||||||
|
832
client/pb/longmsg/longmsg.pb.go
Normal file
832
client/pb/longmsg/longmsg.pb.go
Normal file
@ -0,0 +1,832 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.11.4
|
||||||
|
// source: longmsg.proto
|
||||||
|
|
||||||
|
package longmsg
|
||||||
|
|
||||||
|
import (
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||||
|
// of the legacy proto package is being used.
|
||||||
|
const _ = proto.ProtoPackageIsVersion4
|
||||||
|
|
||||||
|
type LongMsgDeleteReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
MsgResid []byte `protobuf:"bytes,1,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
|
||||||
|
MsgType int32 `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteReq) Reset() {
|
||||||
|
*x = LongMsgDeleteReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongMsgDeleteReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongMsgDeleteReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongMsgDeleteReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteReq) GetMsgResid() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgResid
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteReq) GetMsgType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongMsgDeleteRsp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
|
||||||
|
MsgResid []byte `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteRsp) Reset() {
|
||||||
|
*x = LongMsgDeleteRsp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteRsp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongMsgDeleteRsp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteRsp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongMsgDeleteRsp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongMsgDeleteRsp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteRsp) GetResult() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Result
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDeleteRsp) GetMsgResid() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgResid
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongMsgDownReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
SrcUin int32 `protobuf:"varint,1,opt,name=srcUin,proto3" json:"srcUin,omitempty"`
|
||||||
|
MsgResid []byte `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
|
||||||
|
MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType,omitempty"`
|
||||||
|
NeedCache int32 `protobuf:"varint,4,opt,name=needCache,proto3" json:"needCache,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) Reset() {
|
||||||
|
*x = LongMsgDownReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongMsgDownReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[2]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongMsgDownReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongMsgDownReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) GetSrcUin() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.SrcUin
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) GetMsgResid() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgResid
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) GetMsgType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownReq) GetNeedCache() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NeedCache
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongMsgDownRsp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
|
||||||
|
MsgResid []byte `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
|
||||||
|
MsgContent []byte `protobuf:"bytes,3,opt,name=msgContent,proto3" json:"msgContent,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownRsp) Reset() {
|
||||||
|
*x = LongMsgDownRsp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownRsp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongMsgDownRsp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongMsgDownRsp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[3]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongMsgDownRsp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongMsgDownRsp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownRsp) GetResult() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Result
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownRsp) GetMsgResid() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgResid
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgDownRsp) GetMsgContent() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgContent
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongMsgUpReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
MsgType int32 `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"`
|
||||||
|
DstUin int64 `protobuf:"varint,2,opt,name=dstUin,proto3" json:"dstUin,omitempty"`
|
||||||
|
MsgId int32 `protobuf:"varint,3,opt,name=msgId,proto3" json:"msgId,omitempty"`
|
||||||
|
MsgContent []byte `protobuf:"bytes,4,opt,name=msgContent,proto3" json:"msgContent,omitempty"`
|
||||||
|
StoreType int32 `protobuf:"varint,5,opt,name=storeType,proto3" json:"storeType,omitempty"`
|
||||||
|
MsgUkey []byte `protobuf:"bytes,6,opt,name=msgUkey,proto3" json:"msgUkey,omitempty"`
|
||||||
|
NeedCache int32 `protobuf:"varint,7,opt,name=needCache,proto3" json:"needCache,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) Reset() {
|
||||||
|
*x = LongMsgUpReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongMsgUpReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[4]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongMsgUpReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongMsgUpReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetMsgType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetDstUin() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.DstUin
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetMsgId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetMsgContent() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgContent
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetStoreType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.StoreType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetMsgUkey() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgUkey
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpReq) GetNeedCache() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NeedCache
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongMsgUpRsp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
|
||||||
|
MsgId int32 `protobuf:"varint,2,opt,name=msgId,proto3" json:"msgId,omitempty"`
|
||||||
|
MsgResid []byte `protobuf:"bytes,3,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpRsp) Reset() {
|
||||||
|
*x = LongMsgUpRsp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpRsp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongMsgUpRsp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongMsgUpRsp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[5]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongMsgUpRsp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongMsgUpRsp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpRsp) GetResult() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Result
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpRsp) GetMsgId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongMsgUpRsp) GetMsgResid() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgResid
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongReqBody struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Subcmd int32 `protobuf:"varint,1,opt,name=subcmd,proto3" json:"subcmd,omitempty"`
|
||||||
|
TermType int32 `protobuf:"varint,2,opt,name=termType,proto3" json:"termType,omitempty"`
|
||||||
|
PlatformType int32 `protobuf:"varint,3,opt,name=platformType,proto3" json:"platformType,omitempty"`
|
||||||
|
MsgUpReq []*LongMsgUpReq `protobuf:"bytes,4,rep,name=msgUpReq,proto3" json:"msgUpReq,omitempty"`
|
||||||
|
MsgDownReq []*LongMsgDownReq `protobuf:"bytes,5,rep,name=msgDownReq,proto3" json:"msgDownReq,omitempty"`
|
||||||
|
MsgDelReq []*LongMsgDeleteReq `protobuf:"bytes,6,rep,name=msgDelReq,proto3" json:"msgDelReq,omitempty"`
|
||||||
|
AgentType int32 `protobuf:"varint,10,opt,name=agentType,proto3" json:"agentType,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) Reset() {
|
||||||
|
*x = LongReqBody{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[6]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongReqBody) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongReqBody) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[6]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongReqBody.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongReqBody) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetSubcmd() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Subcmd
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetTermType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TermType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetPlatformType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PlatformType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetMsgUpReq() []*LongMsgUpReq {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgUpReq
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetMsgDownReq() []*LongMsgDownReq {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgDownReq
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetMsgDelReq() []*LongMsgDeleteReq {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgDelReq
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongReqBody) GetAgentType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AgentType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type LongRspBody struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Subcmd int32 `protobuf:"varint,1,opt,name=subcmd,proto3" json:"subcmd,omitempty"`
|
||||||
|
MsgUpRsp []*LongMsgUpRsp `protobuf:"bytes,2,rep,name=msgUpRsp,proto3" json:"msgUpRsp,omitempty"`
|
||||||
|
MsgDownRsp []*LongMsgDownRsp `protobuf:"bytes,3,rep,name=msgDownRsp,proto3" json:"msgDownRsp,omitempty"`
|
||||||
|
MsgDelRsp []*LongMsgDeleteRsp `protobuf:"bytes,4,rep,name=msgDelRsp,proto3" json:"msgDelRsp,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongRspBody) Reset() {
|
||||||
|
*x = LongRspBody{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[7]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongRspBody) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LongRspBody) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LongRspBody) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_longmsg_proto_msgTypes[7]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LongRspBody.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LongRspBody) Descriptor() ([]byte, []int) {
|
||||||
|
return file_longmsg_proto_rawDescGZIP(), []int{7}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongRspBody) GetSubcmd() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Subcmd
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongRspBody) GetMsgUpRsp() []*LongMsgUpRsp {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgUpRsp
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongRspBody) GetMsgDownRsp() []*LongMsgDownRsp {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgDownRsp
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LongRspBody) GetMsgDelRsp() []*LongMsgDeleteRsp {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgDelRsp
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_longmsg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_longmsg_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x0d, 0x6c, 0x6f, 0x6e, 0x67, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||||
|
0x48, 0x0a, 0x10, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||||
|
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18,
|
||||||
|
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x12,
|
||||||
|
0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||||
|
0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x22, 0x46, 0x0a, 0x10, 0x4c, 0x6f, 0x6e,
|
||||||
|
0x67, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a,
|
||||||
|
0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72,
|
||||||
|
0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69,
|
||||||
|
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69,
|
||||||
|
0x64, 0x22, 0x7c, 0x0a, 0x0e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e,
|
||||||
|
0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d,
|
||||||
|
0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d,
|
||||||
|
0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79,
|
||||||
|
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70,
|
||||||
|
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22,
|
||||||
|
0x64, 0x0a, 0x0e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73,
|
||||||
|
0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67,
|
||||||
|
0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67,
|
||||||
|
0x52, 0x65, 0x73, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74,
|
||||||
|
0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f,
|
||||||
|
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xcc, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73,
|
||||||
|
0x67, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70,
|
||||||
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65,
|
||||||
|
0x12, 0x16, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
||||||
|
0x52, 0x06, 0x64, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49,
|
||||||
|
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1e,
|
||||||
|
0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||||
|
0x28, 0x0c, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c,
|
||||||
|
0x0a, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||||
|
0x05, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
||||||
|
0x6d, 0x73, 0x67, 0x55, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d,
|
||||||
|
0x73, 0x67, 0x55, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x61,
|
||||||
|
0x63, 0x68, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43,
|
||||||
|
0x61, 0x63, 0x68, 0x65, 0x22, 0x58, 0x0a, 0x0c, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x55,
|
||||||
|
0x70, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05,
|
||||||
|
0x6d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67,
|
||||||
|
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x03,
|
||||||
|
0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x22, 0x90,
|
||||||
|
0x02, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16,
|
||||||
|
0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
|
0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54, 0x79,
|
||||||
|
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54, 0x79,
|
||||||
|
0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79,
|
||||||
|
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||||
|
0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x55, 0x70, 0x52,
|
||||||
|
0x65, 0x71, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d,
|
||||||
|
0x73, 0x67, 0x55, 0x70, 0x52, 0x65, 0x71, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x55, 0x70, 0x52, 0x65,
|
||||||
|
0x71, 0x12, 0x2f, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x18,
|
||||||
|
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44,
|
||||||
|
0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52,
|
||||||
|
0x65, 0x71, 0x12, 0x2f, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x18,
|
||||||
|
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44,
|
||||||
|
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x52, 0x09, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x6c,
|
||||||
|
0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
|
||||||
|
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
|
||||||
|
0x65, 0x22, 0xb2, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64,
|
||||||
|
0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x05, 0x52, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x29, 0x0a, 0x08, 0x6d, 0x73, 0x67,
|
||||||
|
0x55, 0x70, 0x52, 0x73, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x4c, 0x6f,
|
||||||
|
0x6e, 0x67, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x52, 0x73, 0x70, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x55,
|
||||||
|
0x70, 0x52, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52,
|
||||||
|
0x73, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d,
|
||||||
|
0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f,
|
||||||
|
0x77, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x52,
|
||||||
|
0x73, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d,
|
||||||
|
0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x52, 0x09, 0x6d, 0x73, 0x67,
|
||||||
|
0x44, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x3b, 0x6c, 0x6f, 0x6e, 0x67,
|
||||||
|
0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_longmsg_proto_rawDescOnce sync.Once
|
||||||
|
file_longmsg_proto_rawDescData = file_longmsg_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_longmsg_proto_rawDescGZIP() []byte {
|
||||||
|
file_longmsg_proto_rawDescOnce.Do(func() {
|
||||||
|
file_longmsg_proto_rawDescData = protoimpl.X.CompressGZIP(file_longmsg_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_longmsg_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_longmsg_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||||
|
var file_longmsg_proto_goTypes = []interface{}{
|
||||||
|
(*LongMsgDeleteReq)(nil), // 0: LongMsgDeleteReq
|
||||||
|
(*LongMsgDeleteRsp)(nil), // 1: LongMsgDeleteRsp
|
||||||
|
(*LongMsgDownReq)(nil), // 2: LongMsgDownReq
|
||||||
|
(*LongMsgDownRsp)(nil), // 3: LongMsgDownRsp
|
||||||
|
(*LongMsgUpReq)(nil), // 4: LongMsgUpReq
|
||||||
|
(*LongMsgUpRsp)(nil), // 5: LongMsgUpRsp
|
||||||
|
(*LongReqBody)(nil), // 6: LongReqBody
|
||||||
|
(*LongRspBody)(nil), // 7: LongRspBody
|
||||||
|
}
|
||||||
|
var file_longmsg_proto_depIdxs = []int32{
|
||||||
|
4, // 0: LongReqBody.msgUpReq:type_name -> LongMsgUpReq
|
||||||
|
2, // 1: LongReqBody.msgDownReq:type_name -> LongMsgDownReq
|
||||||
|
0, // 2: LongReqBody.msgDelReq:type_name -> LongMsgDeleteReq
|
||||||
|
5, // 3: LongRspBody.msgUpRsp:type_name -> LongMsgUpRsp
|
||||||
|
3, // 4: LongRspBody.msgDownRsp:type_name -> LongMsgDownRsp
|
||||||
|
1, // 5: LongRspBody.msgDelRsp:type_name -> LongMsgDeleteRsp
|
||||||
|
6, // [6:6] is the sub-list for method output_type
|
||||||
|
6, // [6:6] is the sub-list for method input_type
|
||||||
|
6, // [6:6] is the sub-list for extension type_name
|
||||||
|
6, // [6:6] is the sub-list for extension extendee
|
||||||
|
0, // [0:6] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_longmsg_proto_init() }
|
||||||
|
func file_longmsg_proto_init() {
|
||||||
|
if File_longmsg_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_longmsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongMsgDeleteReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongMsgDeleteRsp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongMsgDownReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongMsgDownRsp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongMsgUpReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongMsgUpRsp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongReqBody); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_longmsg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LongRspBody); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_longmsg_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 8,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_longmsg_proto_goTypes,
|
||||||
|
DependencyIndexes: file_longmsg_proto_depIdxs,
|
||||||
|
MessageInfos: file_longmsg_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_longmsg_proto = out.File
|
||||||
|
file_longmsg_proto_rawDesc = nil
|
||||||
|
file_longmsg_proto_goTypes = nil
|
||||||
|
file_longmsg_proto_depIdxs = nil
|
||||||
|
}
|
53
client/pb/longmsg/longmsg.proto
Normal file
53
client/pb/longmsg/longmsg.proto
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option go_package = ".;longmsg";
|
||||||
|
|
||||||
|
message LongMsgDeleteReq {
|
||||||
|
bytes msgResid = 1;
|
||||||
|
int32 msgType = 2;
|
||||||
|
}
|
||||||
|
message LongMsgDeleteRsp {
|
||||||
|
int32 result = 1;
|
||||||
|
bytes msgResid = 2;
|
||||||
|
}
|
||||||
|
message LongMsgDownReq {
|
||||||
|
int32 srcUin = 1;
|
||||||
|
bytes msgResid = 2;
|
||||||
|
int32 msgType = 3;
|
||||||
|
int32 needCache = 4;
|
||||||
|
}
|
||||||
|
message LongMsgDownRsp {
|
||||||
|
int32 result = 1;
|
||||||
|
bytes msgResid = 2;
|
||||||
|
bytes msgContent = 3;
|
||||||
|
}
|
||||||
|
message LongMsgUpReq {
|
||||||
|
int32 msgType = 1;
|
||||||
|
int64 dstUin = 2;
|
||||||
|
int32 msgId = 3;
|
||||||
|
bytes msgContent = 4;
|
||||||
|
int32 storeType = 5;
|
||||||
|
bytes msgUkey = 6;
|
||||||
|
int32 needCache = 7;
|
||||||
|
}
|
||||||
|
message LongMsgUpRsp {
|
||||||
|
int32 result = 1;
|
||||||
|
int32 msgId = 2;
|
||||||
|
bytes msgResid = 3;
|
||||||
|
}
|
||||||
|
message LongReqBody {
|
||||||
|
int32 subcmd = 1;
|
||||||
|
int32 termType = 2;
|
||||||
|
int32 platformType = 3;
|
||||||
|
repeated LongMsgUpReq msgUpReq = 4;
|
||||||
|
repeated LongMsgDownReq msgDownReq = 5;
|
||||||
|
repeated LongMsgDeleteReq msgDelReq = 6;
|
||||||
|
int32 agentType = 10;
|
||||||
|
}
|
||||||
|
message LongRspBody {
|
||||||
|
int32 subcmd = 1;
|
||||||
|
repeated LongMsgUpRsp msgUpRsp = 2;
|
||||||
|
repeated LongMsgDownRsp msgDownRsp = 3;
|
||||||
|
repeated LongMsgDeleteRsp msgDelRsp = 4;
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -203,7 +203,7 @@ message Elem {
|
|||||||
//SmallEmoji? smallEmoji = 34;
|
//SmallEmoji? smallEmoji = 34;
|
||||||
//FSJMessageElem? fsjMsgElem = 35;
|
//FSJMessageElem? fsjMsgElem = 35;
|
||||||
//ArkAppElem? arkApp = 36;
|
//ArkAppElem? arkApp = 36;
|
||||||
//GeneralFlags? generalFlags = 37;
|
GeneralFlags generalFlags = 37;
|
||||||
//CustomFace? hcFlashPic = 38;
|
//CustomFace? hcFlashPic = 38;
|
||||||
//DeliverGiftMsg? deliverGiftMsg = 39;
|
//DeliverGiftMsg? deliverGiftMsg = 39;
|
||||||
//BitAppMsg? bitappMsg = 40;
|
//BitAppMsg? bitappMsg = 40;
|
||||||
@ -591,6 +591,41 @@ message TransMsgInfo {
|
|||||||
int32 generalFlag = 17;
|
int32 generalFlag = 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GeneralFlags {
|
||||||
|
int32 bubbleDiyTextId = 1;
|
||||||
|
int32 groupFlagNew = 2;
|
||||||
|
int64 uin = 3;
|
||||||
|
bytes rpId = 4;
|
||||||
|
int32 prpFold = 5;
|
||||||
|
int32 longTextFlag = 6;
|
||||||
|
string longTextResid = 7;
|
||||||
|
int32 groupType = 8;
|
||||||
|
int32 toUinFlag = 9;
|
||||||
|
int32 glamourLevel = 10;
|
||||||
|
int32 memberLevel = 11;
|
||||||
|
int64 groupRankSeq = 12;
|
||||||
|
int32 olympicTorch = 13;
|
||||||
|
bytes babyqGuideMsgCookie = 14;
|
||||||
|
int32 uin32ExpertFlag = 15;
|
||||||
|
int32 bubbleSubId = 16;
|
||||||
|
int64 pendantId = 17;
|
||||||
|
bytes rpIndex = 18;
|
||||||
|
bytes pbReserve = 19;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message PbMultiMsgItem {
|
||||||
|
string fileName = 1;
|
||||||
|
bytes buffer = 2;
|
||||||
|
}
|
||||||
|
message PbMultiMsgNew {
|
||||||
|
repeated Message msg = 1;
|
||||||
|
}
|
||||||
|
message PbMultiMsgTransmit {
|
||||||
|
repeated Message msg = 1;
|
||||||
|
repeated PbMultiMsgItem pbItemList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
enum SyncFlag {
|
enum SyncFlag {
|
||||||
START = 0;
|
START = 0;
|
||||||
CONTINUME = 1;
|
CONTINUME = 1;
|
||||||
|
@ -468,7 +468,7 @@ func (x *MultiMsgApplyUpRsp) GetUint32UpV6Port() []int32 {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReqBody struct {
|
type MultiReqBody struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
@ -484,8 +484,8 @@ type ReqBody struct {
|
|||||||
ReqChannelType int32 `protobuf:"varint,9,opt,name=reqChannelType,proto3" json:"reqChannelType,omitempty"`
|
ReqChannelType int32 `protobuf:"varint,9,opt,name=reqChannelType,proto3" json:"reqChannelType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) Reset() {
|
func (x *MultiReqBody) Reset() {
|
||||||
*x = ReqBody{}
|
*x = MultiReqBody{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_multimsg_proto_msgTypes[5]
|
mi := &file_multimsg_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -493,13 +493,13 @@ func (x *ReqBody) Reset() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) String() string {
|
func (x *MultiReqBody) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*ReqBody) ProtoMessage() {}
|
func (*MultiReqBody) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ReqBody) ProtoReflect() protoreflect.Message {
|
func (x *MultiReqBody) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_multimsg_proto_msgTypes[5]
|
mi := &file_multimsg_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -511,75 +511,75 @@ func (x *ReqBody) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use ReqBody.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MultiReqBody.ProtoReflect.Descriptor instead.
|
||||||
func (*ReqBody) Descriptor() ([]byte, []int) {
|
func (*MultiReqBody) Descriptor() ([]byte, []int) {
|
||||||
return file_multimsg_proto_rawDescGZIP(), []int{5}
|
return file_multimsg_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetSubcmd() int32 {
|
func (x *MultiReqBody) GetSubcmd() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Subcmd
|
return x.Subcmd
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetTermType() int32 {
|
func (x *MultiReqBody) GetTermType() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.TermType
|
return x.TermType
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetPlatformType() int32 {
|
func (x *MultiReqBody) GetPlatformType() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.PlatformType
|
return x.PlatformType
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetNetType() int32 {
|
func (x *MultiReqBody) GetNetType() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.NetType
|
return x.NetType
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetBuildVer() string {
|
func (x *MultiReqBody) GetBuildVer() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.BuildVer
|
return x.BuildVer
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetMultimsgApplyupReq() []*MultiMsgApplyUpReq {
|
func (x *MultiReqBody) GetMultimsgApplyupReq() []*MultiMsgApplyUpReq {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MultimsgApplyupReq
|
return x.MultimsgApplyupReq
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetMultimsgApplydownReq() []*MultiMsgApplyDownReq {
|
func (x *MultiReqBody) GetMultimsgApplydownReq() []*MultiMsgApplyDownReq {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MultimsgApplydownReq
|
return x.MultimsgApplydownReq
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetBuType() int32 {
|
func (x *MultiReqBody) GetBuType() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.BuType
|
return x.BuType
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReqBody) GetReqChannelType() int32 {
|
func (x *MultiReqBody) GetReqChannelType() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.ReqChannelType
|
return x.ReqChannelType
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type RspBody struct {
|
type MultiRspBody struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
@ -589,8 +589,8 @@ type RspBody struct {
|
|||||||
MultimsgApplydownRsp []*MultiMsgApplyDownRsp `protobuf:"bytes,3,rep,name=multimsgApplydownRsp,proto3" json:"multimsgApplydownRsp,omitempty"`
|
MultimsgApplydownRsp []*MultiMsgApplyDownRsp `protobuf:"bytes,3,rep,name=multimsgApplydownRsp,proto3" json:"multimsgApplydownRsp,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RspBody) Reset() {
|
func (x *MultiRspBody) Reset() {
|
||||||
*x = RspBody{}
|
*x = MultiRspBody{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_multimsg_proto_msgTypes[6]
|
mi := &file_multimsg_proto_msgTypes[6]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -598,13 +598,13 @@ func (x *RspBody) Reset() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RspBody) String() string {
|
func (x *MultiRspBody) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*RspBody) ProtoMessage() {}
|
func (*MultiRspBody) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RspBody) ProtoReflect() protoreflect.Message {
|
func (x *MultiRspBody) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_multimsg_proto_msgTypes[6]
|
mi := &file_multimsg_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -616,26 +616,26 @@ func (x *RspBody) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use RspBody.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MultiRspBody.ProtoReflect.Descriptor instead.
|
||||||
func (*RspBody) Descriptor() ([]byte, []int) {
|
func (*MultiRspBody) Descriptor() ([]byte, []int) {
|
||||||
return file_multimsg_proto_rawDescGZIP(), []int{6}
|
return file_multimsg_proto_rawDescGZIP(), []int{6}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RspBody) GetSubcmd() int32 {
|
func (x *MultiRspBody) GetSubcmd() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Subcmd
|
return x.Subcmd
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RspBody) GetMultimsgApplyupRsp() []*MultiMsgApplyUpRsp {
|
func (x *MultiRspBody) GetMultimsgApplyupRsp() []*MultiMsgApplyUpRsp {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MultimsgApplyupRsp
|
return x.MultimsgApplyupRsp
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RspBody) GetMultimsgApplydownRsp() []*MultiMsgApplyDownRsp {
|
func (x *MultiRspBody) GetMultimsgApplydownRsp() []*MultiMsgApplyDownRsp {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MultimsgApplydownRsp
|
return x.MultimsgApplydownRsp
|
||||||
}
|
}
|
||||||
@ -712,43 +712,43 @@ var file_multimsg_proto_rawDesc = []byte{
|
|||||||
0x70, 0x56, 0x36, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73,
|
0x70, 0x56, 0x36, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73,
|
||||||
0x55, 0x70, 0x49, 0x70, 0x56, 0x36, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32,
|
0x55, 0x70, 0x49, 0x70, 0x56, 0x36, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32,
|
||||||
0x55, 0x70, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e,
|
0x55, 0x70, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e,
|
||||||
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xe7,
|
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xec,
|
||||||
0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75,
|
0x02, 0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12,
|
||||||
0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x75, 0x62, 0x63,
|
0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x6d, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02,
|
0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22,
|
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54,
|
||||||
0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03,
|
0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79,
|
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66,
|
||||||
0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
|
0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79, 0x70,
|
||||||
0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x18, 0x05, 0x20,
|
||||||
0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74,
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x12, 0x43, 0x0a,
|
||||||
0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x65, 0x71, 0x18, 0x06,
|
0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70,
|
||||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41,
|
0x52, 0x65, 0x71, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4d, 0x75, 0x6c, 0x74,
|
||||||
0x70, 0x70, 0x6c, 0x79, 0x55, 0x70, 0x52, 0x65, 0x71, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69,
|
0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x55, 0x70, 0x52, 0x65, 0x71, 0x52, 0x12,
|
||||||
0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x49, 0x0a,
|
|
||||||
0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64, 0x6f,
|
|
||||||
0x77, 0x6e, 0x52, 0x65, 0x71, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4d, 0x75,
|
|
||||||
0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x52,
|
|
||||||
0x65, 0x71, 0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c,
|
|
||||||
0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x54, 0x79,
|
|
||||||
0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x54, 0x79, 0x70, 0x65,
|
|
||||||
0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79,
|
|
||||||
0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x43, 0x68, 0x61,
|
|
||||||
0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x07, 0x52, 0x73, 0x70,
|
|
||||||
0x42, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01,
|
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x43, 0x0a, 0x12,
|
|
||||||
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52,
|
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52,
|
||||||
0x73, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69,
|
0x65, 0x71, 0x12, 0x49, 0x0a, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70,
|
||||||
0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x55, 0x70, 0x52, 0x73, 0x70, 0x52, 0x12, 0x6d,
|
0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
|
||||||
0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x73,
|
0x32, 0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79,
|
||||||
0x70, 0x12, 0x49, 0x0a, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70,
|
0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73,
|
||||||
0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
|
||||||
0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44,
|
0x06, 0x62, 0x75, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62,
|
||||||
0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67,
|
0x75, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e,
|
||||||
0x41, 0x70, 0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x42, 0x0c, 0x5a, 0x0a,
|
0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72,
|
||||||
0x2e, 0x3b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb6, 0x01,
|
||||||
0x6f, 0x33,
|
0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16,
|
||||||
|
0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
|
0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x43, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d,
|
||||||
|
0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x73, 0x70, 0x18, 0x02, 0x20, 0x03,
|
||||||
|
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70,
|
||||||
|
0x6c, 0x79, 0x55, 0x70, 0x52, 0x73, 0x70, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73,
|
||||||
|
0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x14, 0x6d,
|
||||||
|
0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e,
|
||||||
|
0x52, 0x73, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74,
|
||||||
|
0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70,
|
||||||
|
0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64,
|
||||||
|
0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x3b, 0x6d, 0x75, 0x6c, 0x74,
|
||||||
|
0x69, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -770,16 +770,16 @@ var file_multimsg_proto_goTypes = []interface{}{
|
|||||||
(*MultiMsgApplyDownRsp)(nil), // 2: MultiMsgApplyDownRsp
|
(*MultiMsgApplyDownRsp)(nil), // 2: MultiMsgApplyDownRsp
|
||||||
(*MultiMsgApplyUpReq)(nil), // 3: MultiMsgApplyUpReq
|
(*MultiMsgApplyUpReq)(nil), // 3: MultiMsgApplyUpReq
|
||||||
(*MultiMsgApplyUpRsp)(nil), // 4: MultiMsgApplyUpRsp
|
(*MultiMsgApplyUpRsp)(nil), // 4: MultiMsgApplyUpRsp
|
||||||
(*ReqBody)(nil), // 5: ReqBody
|
(*MultiReqBody)(nil), // 5: MultiReqBody
|
||||||
(*RspBody)(nil), // 6: RspBody
|
(*MultiRspBody)(nil), // 6: MultiRspBody
|
||||||
}
|
}
|
||||||
var file_multimsg_proto_depIdxs = []int32{
|
var file_multimsg_proto_depIdxs = []int32{
|
||||||
0, // 0: MultiMsgApplyDownRsp.msgExternInfo:type_name -> ExternMsg
|
0, // 0: MultiMsgApplyDownRsp.msgExternInfo:type_name -> ExternMsg
|
||||||
0, // 1: MultiMsgApplyUpRsp.msgExternInfo:type_name -> ExternMsg
|
0, // 1: MultiMsgApplyUpRsp.msgExternInfo:type_name -> ExternMsg
|
||||||
3, // 2: ReqBody.multimsgApplyupReq:type_name -> MultiMsgApplyUpReq
|
3, // 2: MultiReqBody.multimsgApplyupReq:type_name -> MultiMsgApplyUpReq
|
||||||
1, // 3: ReqBody.multimsgApplydownReq:type_name -> MultiMsgApplyDownReq
|
1, // 3: MultiReqBody.multimsgApplydownReq:type_name -> MultiMsgApplyDownReq
|
||||||
4, // 4: RspBody.multimsgApplyupRsp:type_name -> MultiMsgApplyUpRsp
|
4, // 4: MultiRspBody.multimsgApplyupRsp:type_name -> MultiMsgApplyUpRsp
|
||||||
2, // 5: RspBody.multimsgApplydownRsp:type_name -> MultiMsgApplyDownRsp
|
2, // 5: MultiRspBody.multimsgApplydownRsp:type_name -> MultiMsgApplyDownRsp
|
||||||
6, // [6:6] is the sub-list for method output_type
|
6, // [6:6] is the sub-list for method output_type
|
||||||
6, // [6:6] is the sub-list for method input_type
|
6, // [6:6] is the sub-list for method input_type
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
6, // [6:6] is the sub-list for extension type_name
|
||||||
@ -854,7 +854,7 @@ func file_multimsg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_multimsg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_multimsg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*ReqBody); i {
|
switch v := v.(*MultiReqBody); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -866,7 +866,7 @@ func file_multimsg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_multimsg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_multimsg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*RspBody); i {
|
switch v := v.(*MultiRspBody); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -43,7 +43,7 @@ message MultiMsgApplyUpRsp {
|
|||||||
repeated bytes bytesUpIpV6 = 12;
|
repeated bytes bytesUpIpV6 = 12;
|
||||||
repeated int32 uint32UpV6Port = 13;
|
repeated int32 uint32UpV6Port = 13;
|
||||||
}
|
}
|
||||||
message ReqBody {
|
message MultiReqBody {
|
||||||
int32 subcmd = 1;
|
int32 subcmd = 1;
|
||||||
int32 termType = 2;
|
int32 termType = 2;
|
||||||
int32 platformType = 3;
|
int32 platformType = 3;
|
||||||
@ -54,9 +54,8 @@ message ReqBody {
|
|||||||
int32 buType = 8;
|
int32 buType = 8;
|
||||||
int32 reqChannelType = 9;
|
int32 reqChannelType = 9;
|
||||||
}
|
}
|
||||||
message RspBody {
|
message MultiRspBody {
|
||||||
int32 subcmd = 1;
|
int32 subcmd = 1;
|
||||||
repeated MultiMsgApplyUpRsp multimsgApplyupRsp = 2;
|
repeated MultiMsgApplyUpRsp multimsgApplyupRsp = 2;
|
||||||
repeated MultiMsgApplyDownRsp multimsgApplydownRsp = 3;
|
repeated MultiMsgApplyDownRsp multimsgApplydownRsp = 3;
|
||||||
}
|
}
|
||||||
|
|
@ -48,6 +48,11 @@ type ReplyElement struct {
|
|||||||
//original []*msg.Elem
|
//original []*msg.Elem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ServiceElement struct {
|
||||||
|
Id int32
|
||||||
|
Content string
|
||||||
|
}
|
||||||
|
|
||||||
func NewText(s string) *TextElement {
|
func NewText(s string) *TextElement {
|
||||||
return &TextElement{Content: s}
|
return &TextElement{Content: s}
|
||||||
}
|
}
|
||||||
@ -129,6 +134,10 @@ func (e *AtElement) Type() ElementType {
|
|||||||
return At
|
return At
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *ServiceElement) Type() ElementType {
|
||||||
|
return Service
|
||||||
|
}
|
||||||
|
|
||||||
func (e *ReplyElement) Type() ElementType {
|
func (e *ReplyElement) Type() ElementType {
|
||||||
return Reply
|
return Reply
|
||||||
}
|
}
|
||||||
|
@ -1,57 +1,73 @@
|
|||||||
package message
|
package message
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/md5"
|
||||||
|
"encoding/hex"
|
||||||
"github.com/Mrs4s/MiraiGo/binary"
|
"github.com/Mrs4s/MiraiGo/binary"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PrivateMessage struct {
|
type (
|
||||||
Id int32
|
PrivateMessage struct {
|
||||||
InternalId int32
|
Id int32
|
||||||
Target int64
|
InternalId int32
|
||||||
Time int32
|
Target int64
|
||||||
Sender *Sender
|
Time int32
|
||||||
Elements []IMessageElement
|
Sender *Sender
|
||||||
}
|
Elements []IMessageElement
|
||||||
|
}
|
||||||
|
|
||||||
type TempMessage struct {
|
TempMessage struct {
|
||||||
Id int32
|
Id int32
|
||||||
GroupCode int64
|
GroupCode int64
|
||||||
GroupName string
|
GroupName string
|
||||||
Sender *Sender
|
Sender *Sender
|
||||||
Elements []IMessageElement
|
Elements []IMessageElement
|
||||||
}
|
}
|
||||||
|
|
||||||
type GroupMessage struct {
|
GroupMessage struct {
|
||||||
Id int32
|
Id int32
|
||||||
InternalId int32
|
InternalId int32
|
||||||
GroupCode int64
|
GroupCode int64
|
||||||
GroupName string
|
GroupName string
|
||||||
Sender *Sender
|
Sender *Sender
|
||||||
Time int32
|
Time int32
|
||||||
Elements []IMessageElement
|
Elements []IMessageElement
|
||||||
//OriginalElements []*msg.Elem
|
//OriginalElements []*msg.Elem
|
||||||
}
|
}
|
||||||
|
|
||||||
type SendingMessage struct {
|
SendingMessage struct {
|
||||||
Elements []IMessageElement
|
Elements []IMessageElement
|
||||||
}
|
}
|
||||||
|
|
||||||
type Sender struct {
|
ForwardMessage struct {
|
||||||
Uin int64
|
Nodes []*ForwardNode
|
||||||
Nickname string
|
}
|
||||||
CardName string
|
|
||||||
IsFriend bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type IMessageElement interface {
|
ForwardNode struct {
|
||||||
Type() ElementType
|
SenderId int64
|
||||||
}
|
SenderName string
|
||||||
|
Time int32
|
||||||
|
Message []IMessageElement
|
||||||
|
}
|
||||||
|
|
||||||
type ElementType int
|
Sender struct {
|
||||||
|
Uin int64
|
||||||
|
Nickname string
|
||||||
|
CardName string
|
||||||
|
IsFriend bool
|
||||||
|
}
|
||||||
|
|
||||||
|
IMessageElement interface {
|
||||||
|
Type() ElementType
|
||||||
|
}
|
||||||
|
|
||||||
|
ElementType int
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Text ElementType = iota
|
Text ElementType = iota
|
||||||
@ -59,6 +75,7 @@ const (
|
|||||||
Face
|
Face
|
||||||
At
|
At
|
||||||
Reply
|
Reply
|
||||||
|
Service
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Sender) IsAnonymous() bool {
|
func (s *Sender) IsAnonymous() bool {
|
||||||
@ -136,7 +153,7 @@ func (s *Sender) DisplayName() string {
|
|||||||
return s.CardName
|
return s.CardName
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToProtoElems(elems []IMessageElement) (r []*msg.Elem) {
|
func ToProtoElems(elems []IMessageElement, generalFlags bool) (r []*msg.Elem) {
|
||||||
for _, elem := range elems {
|
for _, elem := range elems {
|
||||||
if reply, ok := elem.(*ReplyElement); ok {
|
if reply, ok := elem.(*ReplyElement); ok {
|
||||||
r = append(r, &msg.Elem{
|
r = append(r, &msg.Elem{
|
||||||
@ -145,7 +162,7 @@ func ToProtoElems(elems []IMessageElement) (r []*msg.Elem) {
|
|||||||
SenderUin: reply.Sender,
|
SenderUin: reply.Sender,
|
||||||
Time: reply.Time,
|
Time: reply.Time,
|
||||||
Flag: 1,
|
Flag: 1,
|
||||||
Elems: ToProtoElems(reply.Elements),
|
Elems: ToProtoElems(reply.Elements, false),
|
||||||
RichMsg: []byte{},
|
RichMsg: []byte{},
|
||||||
PbReserve: []byte{},
|
PbReserve: []byte{},
|
||||||
SrcMsg: []byte{},
|
SrcMsg: []byte{},
|
||||||
@ -154,6 +171,9 @@ func ToProtoElems(elems []IMessageElement) (r []*msg.Elem) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
imgOld := []byte{0x15, 0x36, 0x20, 0x39, 0x32, 0x6B, 0x41, 0x31, 0x00, 0x38, 0x37, 0x32, 0x66, 0x30, 0x36, 0x36, 0x30, 0x33, 0x61, 0x65, 0x31, 0x30, 0x33, 0x62, 0x37, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||||
|
0x20, 0x35, 0x30, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x30, 0x31, 0x45, 0x39, 0x34, 0x35, 0x31, 0x42, 0x2D, 0x37, 0x30, 0x45, 0x44,
|
||||||
|
0x2D, 0x45, 0x41, 0x45, 0x33, 0x2D, 0x42, 0x33, 0x37, 0x43, 0x2D, 0x31, 0x30, 0x31, 0x46, 0x31, 0x45, 0x45, 0x42, 0x46, 0x35, 0x42, 0x35, 0x7D, 0x2E, 0x70, 0x6E, 0x67, 0x41}
|
||||||
for _, elem := range elems {
|
for _, elem := range elems {
|
||||||
switch e := elem.(type) {
|
switch e := elem.(type) {
|
||||||
case *TextElement:
|
case *TextElement:
|
||||||
@ -190,15 +210,22 @@ func ToProtoElems(elems []IMessageElement) (r []*msg.Elem) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
r = append(r, &msg.Elem{Text: &msg.Text{Str: " "}})
|
r = append(r, &msg.Elem{Text: &msg.Text{Str: " "}})
|
||||||
|
case *ImageElement:
|
||||||
|
r = append(r, &msg.Elem{
|
||||||
|
CustomFace: &msg.CustomFace{
|
||||||
|
FilePath: e.Filename,
|
||||||
|
Md5: e.Md5,
|
||||||
|
Flag: make([]byte, 4),
|
||||||
|
OldData: imgOld,
|
||||||
|
},
|
||||||
|
})
|
||||||
case *GroupImageElement:
|
case *GroupImageElement:
|
||||||
r = append(r, &msg.Elem{
|
r = append(r, &msg.Elem{
|
||||||
CustomFace: &msg.CustomFace{
|
CustomFace: &msg.CustomFace{
|
||||||
FilePath: e.ImageId,
|
FilePath: e.ImageId,
|
||||||
Md5: e.Md5[:],
|
Md5: e.Md5[:],
|
||||||
Flag: make([]byte, 4),
|
Flag: make([]byte, 4),
|
||||||
OldData: []byte{0x15, 0x36, 0x20, 0x39, 0x32, 0x6B, 0x41, 0x31, 0x00, 0x38, 0x37, 0x32, 0x66, 0x30, 0x36, 0x36, 0x30, 0x33, 0x61, 0x65, 0x31, 0x30, 0x33, 0x62, 0x37, 0x20, 0x20, 0x20, 0x20, 0x20,
|
OldData: imgOld,
|
||||||
0x20, 0x35, 0x30, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x30, 0x31, 0x45, 0x39, 0x34, 0x35, 0x31, 0x42, 0x2D, 0x37, 0x30, 0x45, 0x44,
|
|
||||||
0x2D, 0x45, 0x41, 0x45, 0x33, 0x2D, 0x42, 0x33, 0x37, 0x43, 0x2D, 0x31, 0x30, 0x31, 0x46, 0x31, 0x45, 0x45, 0x42, 0x46, 0x35, 0x42, 0x35, 0x7D, 0x2E, 0x70, 0x6E, 0x67, 0x41},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
case *FriendImageElement:
|
case *FriendImageElement:
|
||||||
@ -213,6 +240,34 @@ func ToProtoElems(elems []IMessageElement) (r []*msg.Elem) {
|
|||||||
PbReserve: []byte{0x78, 0x02},
|
PbReserve: []byte{0x78, 0x02},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
case *ServiceElement:
|
||||||
|
if e.Id == 35 {
|
||||||
|
r = append(r, &msg.Elem{
|
||||||
|
RichMsg: &msg.RichMsg{
|
||||||
|
Template1: append([]byte{1}, binary.ZlibCompress([]byte(e.Content))...),
|
||||||
|
ServiceId: e.Id,
|
||||||
|
MsgResId: []byte{},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
r = append(r, &msg.Elem{
|
||||||
|
Text: &msg.Text{
|
||||||
|
Str: "你的QQ暂不支持查看[转发多条消息],请期待后续版本。",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if generalFlags {
|
||||||
|
for _, elem := range elems {
|
||||||
|
switch elem.(type) {
|
||||||
|
case *ServiceElement:
|
||||||
|
d, _ := hex.DecodeString("08 09 78 00 C8 01 00 F0 01 00 F8 01 00 90 02 00 C8 02 00 98 03 00 A0 03 20 B0 03 00 C0 03 00 D0 03 00 E8 03 00 8A 04 02 08 03 90 04 80 80 80 10 B8 04 00 C0 04 00")
|
||||||
|
r = append(r, &msg.Elem{
|
||||||
|
GeneralFlags: &msg.GeneralFlags{
|
||||||
|
PbReserve: d,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -288,3 +343,53 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement {
|
|||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (forMsg *ForwardMessage) CalculateValidationData(seq, random int32, groupCode int64) ([]byte, []byte) {
|
||||||
|
var msgs []*msg.Message
|
||||||
|
for _, node := range forMsg.Nodes {
|
||||||
|
msgs = append(msgs, &msg.Message{
|
||||||
|
Head: &msg.MessageHead{
|
||||||
|
FromUin: node.SenderId,
|
||||||
|
MsgSeq: seq,
|
||||||
|
MsgTime: node.Time,
|
||||||
|
MsgUid: 0x01000000000000000 | int64(random),
|
||||||
|
MutiltransHead: &msg.MutilTransHead{
|
||||||
|
MsgId: 1,
|
||||||
|
},
|
||||||
|
MsgType: 82,
|
||||||
|
GroupInfo: &msg.GroupInfo{
|
||||||
|
GroupCode: groupCode,
|
||||||
|
GroupCard: node.SenderName,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Body: &msg.MessageBody{
|
||||||
|
RichText: &msg.RichText{
|
||||||
|
Elems: ToProtoElems(node.Message, false),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
trans := &msg.PbMultiMsgTransmit{Msg: msgs}
|
||||||
|
b, _ := proto.Marshal(trans)
|
||||||
|
data := binary.GZipCompress(b)
|
||||||
|
hash := md5.Sum(data)
|
||||||
|
return data, hash[:]
|
||||||
|
}
|
||||||
|
|
||||||
|
func ToReadableString(m []IMessageElement) (r string) {
|
||||||
|
for _, elem := range m {
|
||||||
|
switch e := elem.(type) {
|
||||||
|
case *TextElement:
|
||||||
|
r += e.Content
|
||||||
|
case *ImageElement:
|
||||||
|
r += "[图片]"
|
||||||
|
case *FaceElement:
|
||||||
|
r += "/" + e.Name
|
||||||
|
case *GroupImageElement:
|
||||||
|
r += "[图片]"
|
||||||
|
case *AtElement:
|
||||||
|
r += e.Display
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user