1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

Merge branch 'master' into reflection-based-protobuf

# Conflicts:
#	client/builders.go
#	client/global.go
This commit is contained in:
wdvxdr 2021-11-11 19:17:09 +08:00
commit 44393e904d
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6
30 changed files with 14629 additions and 1646 deletions

92
binary/protobuf.go Normal file
View File

@ -0,0 +1,92 @@
package binary
import (
"bytes"
"encoding/binary"
"math"
)
type DynamicProtoMessage map[uint64]interface{}
type encoder struct {
bytes.Buffer
}
func (msg DynamicProtoMessage) Encode() []byte {
en := &encoder{}
for id, value := range msg {
key := id << 3
switch v := value.(type) {
case bool:
en.uvarint(key | 0)
vi := uint64(0)
if v {
vi = 1
}
en.uvarint(vi)
case int:
en.uvarint(key | 0)
en.svarint(int64(v))
case int32:
en.uvarint(key | 0)
en.svarint(int64(v))
case int64:
en.uvarint(key | 0)
en.svarint(v)
case uint32:
en.uvarint(key | 0)
en.uvarint(uint64(v))
case uint64:
en.uvarint(key | 0)
en.uvarint(v)
case float32:
en.uvarint(key | 5)
en.u32(math.Float32bits(v))
case float64:
en.uvarint(key | 1)
en.u64(math.Float64bits(v))
case string:
en.uvarint(key | 2)
b := []byte(v)
en.uvarint(uint64(len(b)))
_, _ = en.Write(b)
case []uint64:
for i := 0; i < len(v); i++ {
en.uvarint(key | 0)
en.uvarint(v[i])
}
case []byte:
en.uvarint(key | 2)
en.uvarint(uint64(len(v)))
_, _ = en.Write(v)
case DynamicProtoMessage:
en.uvarint(key | 2)
b := v.Encode()
en.uvarint(uint64(len(b)))
_, _ = en.Write(b)
}
}
return en.Bytes()
}
func (en *encoder) uvarint(v uint64) {
var b [binary.MaxVarintLen64]byte
n := binary.PutUvarint(b[:], v)
_, _ = en.Write(b[:n])
}
func (en *encoder) svarint(v int64) {
en.uvarint(uint64(v)<<1 ^ uint64(v>>63))
}
func (en *encoder) u32(v uint32) {
var b [4]byte
binary.LittleEndian.PutUint32(b[:], v)
_, _ = en.Write(b[:])
}
func (en *encoder) u64(v uint64) {
var b [8]byte
binary.LittleEndian.PutUint64(b[:], v)
_, _ = en.Write(b[:])
}

46
binary/protobuf_test.go Normal file
View File

@ -0,0 +1,46 @@
package binary
import (
"math"
"testing"
)
func benchEncoderUvarint(b *testing.B, v uint64) {
e := encoder{}
for i := 0; i < b.N; i++ {
e.Reset()
e.uvarint(v)
}
}
func benchEncoderSvarint(b *testing.B, v int64) {
e := encoder{}
for i := 0; i < b.N; i++ {
e.Reset()
e.svarint(v)
}
}
func Benchmark_encoder_uvarint(b *testing.B) {
b.Run("short", func(b *testing.B) {
benchEncoderUvarint(b, uint64(1))
})
b.Run("medium", func(b *testing.B) {
benchEncoderUvarint(b, uint64(114514))
})
b.Run("large", func(b *testing.B) {
benchEncoderUvarint(b, math.MaxUint64)
})
}
func Benchmark_encoder_svarint(b *testing.B) {
b.Run("short", func(b *testing.B) {
benchEncoderSvarint(b, int64(1))
})
b.Run("medium", func(b *testing.B) {
benchEncoderSvarint(b, int64(114514))
})
b.Run("large", func(b *testing.B) {
benchEncoderSvarint(b, math.MaxInt64)
})
}

View File

@ -75,52 +75,57 @@ func TestTEA(t *testing.T) {
} }
} }
func BenchmarkTEAen16(b *testing.B) { func benchEncrypt(b *testing.B, data []byte) {
data := make([]byte, 16)
_, err := rand.Read(data) _, err := rand.Read(data)
if err != nil { if err != nil {
panic(err) panic(err)
} }
b.SetBytes(int64(len(data)))
b.ResetTimer() b.ResetTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
testTEA.Encrypt(data) testTEA.Encrypt(data)
} }
} }
func BenchmarkTEAde16(b *testing.B) { func benchDecrypt(b *testing.B, data []byte) {
_, err := rand.Read(data)
if err != nil {
panic(err)
}
data = testTEA.Encrypt(data)
b.SetBytes(int64(len(data)))
b.ResetTimer()
for i := 0; i < b.N; i++ {
testTEA.Decrypt(data)
}
}
func BenchmarkTEAen(b *testing.B) {
b.Run("16", func(b *testing.B) {
data := make([]byte, 16) data := make([]byte, 16)
_, err := rand.Read(data) benchEncrypt(b, data)
if err != nil { })
panic(err) b.Run("256", func(b *testing.B) {
} data := make([]byte, 256)
data = testTEA.Encrypt(data) benchEncrypt(b, data)
b.ResetTimer() })
for i := 0; i < b.N; i++ { b.Run("4K", func(b *testing.B) {
testTEA.Decrypt(data) data := make([]byte, 4096)
} benchEncrypt(b, data)
})
} }
func BenchmarkTEAen256(b *testing.B) { func BenchmarkTEAde(b *testing.B) {
b.Run("16", func(b *testing.B) {
data := make([]byte, 16)
benchDecrypt(b, data)
})
b.Run("256", func(b *testing.B) {
data := make([]byte, 256) data := make([]byte, 256)
_, err := rand.Read(data) benchDecrypt(b, data)
if err != nil { })
panic(err) b.Run("4K", func(b *testing.B) {
} data := make([]byte, 4096)
b.ResetTimer() benchDecrypt(b, data)
for i := 0; i < b.N; i++ { })
testTEA.Encrypt(data)
}
}
func BenchmarkTEAde256(b *testing.B) {
data := make([]byte, 256)
_, err := rand.Read(data)
if err != nil {
panic(err)
}
data = testTEA.Encrypt(data)
b.ResetTimer()
for i := 0; i < b.N; i++ {
testTEA.Decrypt(data)
}
} }

View File

@ -7,6 +7,10 @@ import (
"math/rand" "math/rand"
"time" "time"
"github.com/Mrs4s/MiraiGo/internal/crypto"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/tlv"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/binary"

View File

@ -44,6 +44,7 @@ type QQClient struct {
OnlineClients []*OtherClientInfo OnlineClients []*OtherClientInfo
Online bool Online bool
QiDian *QiDianAccountInfo QiDian *QiDianAccountInfo
GuildService *GuildService
// protocol public field // protocol public field
SequenceId int32 SequenceId int32
@ -212,6 +213,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
alive: true, alive: true,
ecdh: crypto.NewEcdh(), ecdh: crypto.NewEcdh(),
} }
cli.GuildService = &GuildService{c: cli}
cli.ecdh.FetchPubKey(uin) cli.ecdh.FetchPubKey(uin)
cli.UseDevice(SystemDeviceInfo) cli.UseDevice(SystemDeviceInfo)
sso, err := getSSOAddress() sso, err := getSSOAddress()
@ -451,6 +453,7 @@ func (c *QQClient) init(tokenLogin bool) error {
} }
seq, pkt := c.buildGetMessageRequestPacket(msg.SyncFlag_START, time.Now().Unix()) seq, pkt := c.buildGetMessageRequestPacket(msg.SyncFlag_START, time.Now().Unix())
_, _ = c.sendAndWait(seq, pkt, requestParams{"used_reg_proxy": true, "init": true}) _, _ = c.sendAndWait(seq, pkt, requestParams{"used_reg_proxy": true, "init": true})
c.syncChannelFirstView()
return nil return nil
} }

View File

@ -220,6 +220,16 @@ type (
OperatorNick string OperatorNick string
} }
GuildMessageReactionsUpdatedEvent struct {
OperatorId uint64 // OperatorId 操作者TinyId, 删除贴表情的事件下不会有值
EmojiId int32 // EmojiId 被贴的表情, 只有自身消息被贴表情才会有值
GuildId uint64
ChannelId uint64
MessageId uint64
MessageSenderUin int64 // MessageSenderUin 被贴表情的消息发送者QQ号
CurrentReactions []*message.GuildMessageEmojiReaction
}
OcrResponse struct { OcrResponse struct {
Texts []*TextDetection `json:"texts"` Texts []*TextDetection `json:"texts"`
Language string `json:"language"` Language string `json:"language"`

View File

@ -14,6 +14,8 @@ type eventHandlers struct {
groupMessageHandlers []func(*QQClient, *message.GroupMessage) groupMessageHandlers []func(*QQClient, *message.GroupMessage)
selfPrivateMessageHandlers []func(*QQClient, *message.PrivateMessage) selfPrivateMessageHandlers []func(*QQClient, *message.PrivateMessage)
selfGroupMessageHandlers []func(*QQClient, *message.GroupMessage) selfGroupMessageHandlers []func(*QQClient, *message.GroupMessage)
guildChannelMessageHandlers []func(*QQClient, *message.GuildChannelMessage)
guildMessageReactionsUpdatedHandlers []func(*QQClient, *GuildMessageReactionsUpdatedEvent)
groupMuteEventHandlers []func(*QQClient, *GroupMuteEvent) groupMuteEventHandlers []func(*QQClient, *GroupMuteEvent)
groupRecalledHandlers []func(*QQClient, *GroupMessageRecalledEvent) groupRecalledHandlers []func(*QQClient, *GroupMessageRecalledEvent)
friendRecalledHandlers []func(*QQClient, *FriendMessageRecalledEvent) friendRecalledHandlers []func(*QQClient, *FriendMessageRecalledEvent)
@ -68,6 +70,14 @@ func (c *QQClient) OnSelfGroupMessage(f func(*QQClient, *message.GroupMessage))
c.eventHandlers.selfGroupMessageHandlers = append(c.eventHandlers.selfGroupMessageHandlers, f) c.eventHandlers.selfGroupMessageHandlers = append(c.eventHandlers.selfGroupMessageHandlers, f)
} }
func (s *GuildService) OnGuildChannelMessage(f func(*QQClient, *message.GuildChannelMessage)) {
s.c.eventHandlers.guildChannelMessageHandlers = append(s.c.eventHandlers.guildChannelMessageHandlers, f)
}
func (s *GuildService) OnGuildMessageReactionsUpdated(f func(*QQClient, *GuildMessageReactionsUpdatedEvent)) {
s.c.eventHandlers.guildMessageReactionsUpdatedHandlers = append(s.c.eventHandlers.guildMessageReactionsUpdatedHandlers, f)
}
func (c *QQClient) OnGroupMuted(f func(*QQClient, *GroupMuteEvent)) { func (c *QQClient) OnGroupMuted(f func(*QQClient, *GroupMuteEvent)) {
c.eventHandlers.groupMuteEventHandlers = append(c.eventHandlers.groupMuteEventHandlers, f) c.eventHandlers.groupMuteEventHandlers = append(c.eventHandlers.groupMuteEventHandlers, f)
} }
@ -230,6 +240,28 @@ func (c *QQClient) dispatchGroupMessageSelf(msg *message.GroupMessage) {
} }
} }
func (c *QQClient) dispatchGuildChannelMessage(msg *message.GuildChannelMessage) {
if msg == nil {
return
}
for _, f := range c.eventHandlers.guildChannelMessageHandlers {
cover(func() {
f(c, msg)
})
}
}
func (c *QQClient) dispatchGuildMessageReactionsUpdatedEvent(e *GuildMessageReactionsUpdatedEvent) {
if e == nil {
return
}
for _, f := range c.eventHandlers.guildMessageReactionsUpdatedHandlers {
cover(func() {
f(c, e)
})
}
}
func (c *QQClient) dispatchGroupMuteEvent(e *GroupMuteEvent) { func (c *QQClient) dispatchGroupMuteEvent(e *GroupMuteEvent) {
if e == nil { if e == nil {
return return

View File

@ -192,16 +192,16 @@ func GenRandomDevice() {
func genVersionInfo(p ClientProtocol) *versionInfo { func genVersionInfo(p ClientProtocol) *versionInfo {
switch p { switch p {
case AndroidPhone: // Dumped by mirai from qq android v8.2.7 case AndroidPhone: // Dumped by mirai from qq android v8.8.38
return &versionInfo{ return &versionInfo{
ApkId: "com.tencent.mobileqq", ApkId: "com.tencent.mobileqq",
AppId: 537066738, AppId: 537100432,
SubAppId: 537066738, SubAppId: 537100432,
SortVersionName: "8.5.0", SortVersionName: "8.8.38",
BuildTime: 1607689988, BuildTime: 1634310940,
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D}, ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
SdkVersion: "6.0.0.2454", SdkVersion: "6.0.0.2487",
SSOVersion: 15, SSOVersion: 16,
MiscBitmap: 184024956, MiscBitmap: 184024956,
SubSigmap: 0x10400, SubSigmap: 0x10400,
MainSigMap: 34869472, MainSigMap: 34869472,
@ -225,9 +225,9 @@ func genVersionInfo(p ClientProtocol) *versionInfo {
case IPad: case IPad:
return &versionInfo{ return &versionInfo{
ApkId: "com.tencent.minihd.qq", ApkId: "com.tencent.minihd.qq",
AppId: 537065739, AppId: 537097188,
SubAppId: 537065739, SubAppId: 537097188,
SortVersionName: "5.8.9", SortVersionName: "8.8.35",
BuildTime: 1595836208, BuildTime: 1595836208,
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199}, ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
SdkVersion: "6.0.0.2433", SdkVersion: "6.0.0.2433",
@ -655,6 +655,10 @@ func (c *QQClient) packOIDBPackage(cmd, serviceType uint32, body []byte) []byte
return r return r
} }
func (c *QQClient) packOIDBPackageDynamically(cmd, serviceType int32, msg binary.DynamicProtoMessage) []byte {
return c.packOIDBPackage(cmd, serviceType, msg.Encode())
}
func (c *QQClient) packOIDBPackageProto(cmd, serviceType uint32, msg proto.Message) []byte { func (c *QQClient) packOIDBPackageProto(cmd, serviceType uint32, msg proto.Message) []byte {
b, _ := proto.Marshal(msg) b, _ := proto.Marshal(msg)
return c.packOIDBPackage(cmd, serviceType, b) return c.packOIDBPackage(cmd, serviceType, b)
@ -665,6 +669,20 @@ func (c *QQClient) packOIDBPackageProto2(cmd, serviceType uint32, msg proto2.Mes
return c.packOIDBPackage(cmd, serviceType, b) return c.packOIDBPackage(cmd, serviceType, b)
} }
func (c *QQClient) unpackOIDBPackage(buff []byte, payload proto.Message) error {
pkg := new(oidb.OIDBSSOPkg)
if err := proto.Unmarshal(buff, pkg); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
if pkg.GetResult() != 0 {
return errors.Errorf("oidb result unsuccessful: %v msg: %v", pkg.GetResult(), pkg.GetErrorMsg())
}
if err := proto.Unmarshal(pkg.Bodybuffer, payload); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
return nil
}
func (c *QQClient) Error(msg string, args ...interface{}) { func (c *QQClient) Error(msg string, args ...interface{}) {
c.dispatchLogEvent(&LogEvent{ c.dispatchLogEvent(&LogEvent{
Type: "ERROR", Type: "ERROR",

461
client/guild.go Normal file
View File

@ -0,0 +1,461 @@
package client
import (
"fmt"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb/channel"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
type (
// GuildService 频道模块内自身的信息
GuildService struct {
TinyId uint64
Nickname string
AvatarUrl string
GuildCount uint32
// Guilds 由服务器推送的频道列表
Guilds []*GuildInfo
c *QQClient
}
// GuildInfo 频道信息
GuildInfo struct {
GuildId uint64
GuildCode uint64
GuildName string
CoverUrl string
AvatarUrl string
Channels []*ChannelInfo
Bots []*GuildMemberInfo
Members []*GuildMemberInfo
Admins []*GuildMemberInfo
}
// GuildMeta 频道数据
GuildMeta struct {
GuildId uint64
GuildName string
GuildProfile string
MaxMemberCount int64
MemberCount int64
CreateTime int64
MaxRobotCount int32
MaxAdminCount int32
OwnerId uint64
}
GuildMemberInfo struct {
TinyId uint64
Title string
Nickname string
LastSpeakTime int64
Role int32 // 0 = member 1 = admin 2 = owner ?
}
// GuildUserProfile 频道系统用户资料
GuildUserProfile struct {
TinyId uint64
Nickname string
AvatarUrl string
JoinTime int64 // 只有 GetGuildMemberProfileInfo 函数才会有
}
// ChannelInfo 子频道信息
ChannelInfo struct {
ChannelId uint64
ChannelName string
Time uint64
EventTime uint32
NotifyType uint32
ChannelType ChannelType
AtAllSeq uint64
Meta *ChannelMeta
}
ChannelMeta struct {
CreatorUin int64
CreatorTinyId uint64
CreateTime int64
GuildId uint64
VisibleType int32
TopMessageSeq uint64
TopMessageTime int64
TopMessageOperatorId uint64
CurrentSlowMode int32
TalkPermission int32
SlowModes []*ChannelSlowModeInfo
}
ChannelSlowModeInfo struct {
SlowModeKey int32
SpeakFrequency int32
SlowModeCircle int32
SlowModeText string
}
ChannelType int32
)
const (
ChannelTypeText ChannelType = 1
ChannelTypeVoice ChannelType = 2
ChannelTypeLive ChannelType = 5
)
func init() {
decoders["trpc.group_pro.synclogic.SyncLogic.PushFirstView"] = decodeGuildPushFirstView
}
func (s *GuildService) FindGuild(guildId uint64) *GuildInfo {
for _, i := range s.Guilds {
if i.GuildId == guildId {
return i
}
}
return nil
}
func (g *GuildInfo) FindMember(tinyId uint64) *GuildMemberInfo {
for i := 0; i < len(g.Members); i++ {
if g.Members[i].TinyId == tinyId {
return g.Members[i]
}
}
for i := 0; i < len(g.Admins); i++ {
if g.Admins[i].TinyId == tinyId {
return g.Admins[i]
}
}
for i := 0; i < len(g.Bots); i++ {
if g.Bots[i].TinyId == tinyId {
return g.Bots[i]
}
}
return nil
}
func (g *GuildInfo) FindChannel(channelId uint64) *ChannelInfo {
for _, c := range g.Channels {
if c.ChannelId == channelId {
return c
}
}
return nil
}
func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error) {
seq := s.c.nextSeq()
flags := binary.DynamicProtoMessage{}
for i := 3; i <= 29; i++ {
flags[uint64(i)] = uint32(1)
}
flags[99] = uint32(1)
flags[100] = uint32(1)
payload := s.c.packOIDBPackageDynamically(3976, 1, binary.DynamicProtoMessage{
1: flags,
3: tinyId,
4: uint32(0),
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xfc9_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xfc9Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
// todo: 解析个性档案
return &GuildUserProfile{
TinyId: tinyId,
Nickname: body.Profile.GetNickname(),
AvatarUrl: body.Profile.GetAvatarUrl(),
JoinTime: body.Profile.GetJoinTime(),
}, nil
}
func (s *GuildService) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, members []*GuildMemberInfo, admins []*GuildMemberInfo, err error) {
seq := s.c.nextSeq()
u1 := uint32(1)
// todo: 这个包实际上是 fetchMemberListWithRole , 可以按channel, role等规则获取成员列表, 还需要修改
payload := s.c.packOIDBPackageDynamically(3931, 1, binary.DynamicProtoMessage{ // todo: 可能还需要处理翻页的情况?
1: guildId, // guild id
2: uint32(3),
3: uint32(0),
4: binary.DynamicProtoMessage{ // unknown param, looks like flags
1: u1, 2: u1, 3: u1, 4: u1, 5: u1, 6: u1, 7: u1, 8: u1, 20: u1,
},
6: uint32(0),
8: uint32(500), // count
14: uint32(2),
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf5b_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, nil, nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf5BRsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, nil, nil, errors.Wrap(err, "decode packet error")
}
protoToMemberInfo := func(mem *channel.GuildMemberInfo) *GuildMemberInfo {
return &GuildMemberInfo{
TinyId: mem.GetTinyId(),
Title: mem.GetTitle(),
Nickname: mem.GetNickname(),
LastSpeakTime: mem.GetLastSpeakTime(),
Role: mem.GetRole(),
}
}
for _, mem := range body.Bots {
bots = append(bots, protoToMemberInfo(mem))
}
for _, mem := range body.Members {
members = append(members, protoToMemberInfo(mem))
}
for _, mem := range body.AdminInfo.Admins {
admins = append(admins, protoToMemberInfo(mem))
}
return
}
func (s *GuildService) GetGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error) {
seq := s.c.nextSeq()
flags := binary.DynamicProtoMessage{}
for i := 3; i <= 29; i++ {
flags[uint64(i)] = uint32(1)
}
flags[99] = uint32(1)
flags[100] = uint32(1)
payload := s.c.packOIDBPackageDynamically(3976, 1, binary.DynamicProtoMessage{
1: flags,
3: tinyId,
4: guildId,
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf88_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf88Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
// todo: 解析个性档案
return &GuildUserProfile{
TinyId: tinyId,
Nickname: body.Profile.GetNickname(),
AvatarUrl: body.Profile.GetAvatarUrl(),
JoinTime: body.Profile.GetJoinTime(),
}, nil
}
func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error) {
seq := s.c.nextSeq()
u1 := uint32(1)
payload := s.c.packOIDBPackageDynamically(3927, 9, binary.DynamicProtoMessage{
1: binary.DynamicProtoMessage{
1: binary.DynamicProtoMessage{
2: u1, 4: u1, 5: u1, 6: u1, 7: u1, 8: u1, 11: u1, 12: u1, 13: u1, 14: u1, 45: u1,
18: u1, 19: u1, 20: u1, 22: u1, 23: u1, 5002: u1, 5003: u1, 5004: u1, 5005: u1, 10007: u1,
},
2: binary.DynamicProtoMessage{
3: u1, 4: u1, 6: u1, 11: u1, 14: u1, 15: u1, 16: u1, 17: u1,
},
},
2: binary.DynamicProtoMessage{
1: guildId,
},
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf57_9", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf57Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
return &GuildMeta{
GuildName: body.Rsp.Meta.GetName(),
GuildProfile: body.Rsp.Meta.GetProfile(),
MaxMemberCount: body.Rsp.Meta.GetMaxMemberCount(),
MemberCount: body.Rsp.Meta.GetMemberCount(),
CreateTime: body.Rsp.Meta.GetCreateTime(),
MaxRobotCount: body.Rsp.Meta.GetRobotMaxNum(),
MaxAdminCount: body.Rsp.Meta.GetAdminMaxNum(),
OwnerId: body.Rsp.Meta.GetOwnerId(),
}, nil
}
func (s *GuildService) FetchChannelList(guildId uint64) (r []*ChannelInfo, e error) {
seq := s.c.nextSeq()
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf5d_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key,
s.c.packOIDBPackageDynamically(3933, 1, binary.DynamicProtoMessage{1: guildId, 3: binary.DynamicProtoMessage{1: uint32(1)}}))
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf5DRsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
for _, info := range body.Rsp.Channels {
r = append(r, convertChannelInfo(info))
}
return
}
func (s *GuildService) FetchChannelInfo(guildId, channelId uint64) (*ChannelInfo, error) {
seq := s.c.nextSeq()
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf55_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key,
s.c.packOIDBPackageDynamically(3925, 1, binary.DynamicProtoMessage{1: guildId, 2: channelId}))
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf55Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
return convertChannelInfo(body.Info), nil
}
/* need analysis
func (s *GuildService) fetchChannelListState(guildId uint64, channels []*ChannelInfo) {
seq := s.c.nextSeq()
var ids []uint64
for _, info := range channels {
ids = append(ids, info.ChannelId)
}
payload := s.c.packOIDBPackageDynamically(4104, 1, binary.DynamicProtoMessage{
1: binary.DynamicProtoMessage{
1: guildId,
2: ids,
},
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0x1008_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return
}
pkg := new(oidb.OIDBSSOPkg)
if err = proto.Unmarshal(rsp, pkg); err != nil {
return //nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
}
*/
func convertChannelInfo(info *channel.GuildChannelInfo) *ChannelInfo {
meta := &ChannelMeta{
CreatorUin: info.GetCreatorUin(),
CreatorTinyId: info.GetCreatorTinyId(),
CreateTime: info.GetCreateTime(),
GuildId: info.GetGuildId(),
VisibleType: info.GetVisibleType(),
CurrentSlowMode: info.GetCurrentSlowModeKey(),
TalkPermission: info.GetTalkPermission(),
}
if info.TopMsg != nil {
meta.TopMessageSeq = info.TopMsg.GetTopMsgSeq()
meta.TopMessageTime = info.TopMsg.GetTopMsgTime()
meta.TopMessageOperatorId = info.TopMsg.GetTopMsgOperatorTinyId()
}
for _, slow := range info.SlowModeInfos {
meta.SlowModes = append(meta.SlowModes, &ChannelSlowModeInfo{
SlowModeKey: slow.GetSlowModeKey(),
SpeakFrequency: slow.GetSpeakFrequency(),
SlowModeCircle: slow.GetSlowModeCircle(),
SlowModeText: slow.GetSlowModeText(),
})
}
return &ChannelInfo{
ChannelId: info.GetChannelId(),
ChannelName: info.GetChannelName(),
NotifyType: uint32(info.GetFinalNotifyType()),
ChannelType: ChannelType(info.GetChannelType()),
Meta: meta,
}
}
func (c *QQClient) syncChannelFirstView() {
rsp, err := c.sendAndWaitDynamic(c.buildSyncChannelFirstViewPacket())
if err != nil {
c.Error("sync channel error: %v", err)
return
}
firstViewRsp := new(channel.FirstViewRsp)
if err = proto.Unmarshal(rsp, firstViewRsp); err != nil {
return
}
c.GuildService.TinyId = firstViewRsp.GetSelfTinyid()
c.GuildService.GuildCount = firstViewRsp.GetGuildCount()
if self, err := c.GuildService.GetUserProfile(c.GuildService.TinyId); err == nil {
c.GuildService.Nickname = self.Nickname
c.GuildService.AvatarUrl = self.AvatarUrl
} else {
c.Error("get self guild profile error: %v", err)
}
}
func (c *QQClient) buildSyncChannelFirstViewPacket() (uint16, []byte) {
seq := c.nextSeq()
req := &channel.FirstViewReq{
LastMsgTime: proto.Uint64(0),
Seq: proto.Uint32(0),
DirectMessageFlag: proto.Uint32(1),
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "trpc.group_pro.synclogic.SyncLogic.SyncFirstView", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload)
return seq, packet
}
func decodeGuildPushFirstView(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
firstViewMsg := new(channel.FirstViewMsg)
if err := proto.Unmarshal(payload, firstViewMsg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(firstViewMsg.GuildNodes) > 0 {
c.GuildService.Guilds = []*GuildInfo{}
for _, guild := range firstViewMsg.GuildNodes {
info := &GuildInfo{
GuildId: guild.GetGuildId(),
GuildCode: guild.GetGuildCode(),
GuildName: utils.B2S(guild.GuildName),
CoverUrl: fmt.Sprintf("https://groupprocover-76483.picgzc.qpic.cn/%v", guild.GetGuildId()),
AvatarUrl: fmt.Sprintf("https://groupprohead-76292.picgzc.qpic.cn/%v", guild.GetGuildId()),
}
channels, err := c.GuildService.FetchChannelList(info.GuildId)
if err != nil {
c.Warning("waring: fetch guild %v channel error %v. will use sync node to fill channel list field", guild.GuildId, err)
for _, node := range guild.ChannelNodes {
meta := new(channel.ChannelMsgMeta)
_ = proto.Unmarshal(node.Meta, meta)
info.Channels = append(info.Channels, &ChannelInfo{
ChannelId: node.GetChannelId(),
ChannelName: utils.B2S(node.ChannelName),
Time: node.GetTime(),
EventTime: node.GetEventTime(),
NotifyType: node.GetNotifyType(),
ChannelType: ChannelType(node.GetChannelType()),
AtAllSeq: meta.GetAtAllSeq(),
})
}
} else {
info.Channels = channels
}
info.Bots, info.Members, info.Admins, _ = c.GuildService.GetGuildMembers(info.GuildId)
c.GuildService.Guilds = append(c.GuildService.Guilds, info)
}
}
if len(firstViewMsg.ChannelMsgs) > 0 { // sync msg
}
return nil, nil
}

128
client/guild_eventflow.go Normal file
View File

@ -0,0 +1,128 @@
package client
import (
"time"
"github.com/Mrs4s/MiraiGo/client/pb/channel"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
func init() {
decoders["MsgPush.PushGroupProMsg"] = decodeGuildEventFlowPacket
}
func decodeGuildEventFlowPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
push := new(channel.MsgOnlinePush)
if err := proto.Unmarshal(payload, push); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
for _, m := range push.Msgs {
if m.Head.ContentHead.GetType() == 3841 {
type tipsPushInfo struct {
TinyId uint64
TargetMessageSenderUin int64
GuildId uint64
ChannelId uint64
}
// todo: 回头 event flow 的处理移出去重构下逻辑, 先暂时这样方便改
var common *msg.CommonElem
if m.Body != nil {
for _, e := range m.Body.RichText.Elems {
if e.CommonElem != nil {
common = e.CommonElem
break
}
}
}
if m.Head.ContentHead.GetSubType() == 2 { // todo: tips?
if common == nil { // empty tips
}
tipsInfo := &tipsPushInfo{
TinyId: m.Head.RoutingHead.GetFromTinyid(),
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: m.Head.RoutingHead.GetChannelId(),
}
if len(m.CtrlHead.IncludeUin) > 0 {
tipsInfo.TargetMessageSenderUin = int64(m.CtrlHead.IncludeUin[0])
}
return tipsInfo, nil
}
if common == nil || common.GetServiceType() != 500 {
continue
}
eventBody := new(channel.EventBody)
if err := proto.Unmarshal(common.PbElem, eventBody); err != nil {
c.Error("failed to unmarshal guild channel event body: %v", err)
continue
}
if eventBody.UpdateMsg != nil {
if eventBody.UpdateMsg.GetEventType() == 1 || eventBody.UpdateMsg.GetEventType() == 2 { // todo: 撤回消息
continue
}
if eventBody.UpdateMsg.GetEventType() == 4 { // 消息贴表情更新 (包含添加或删除)
t, err := c.GuildService.pullRoamMsgByEventFlow(m.Head.RoutingHead.GetGuildId(), m.Head.RoutingHead.GetChannelId(), eventBody.UpdateMsg.GetMsgSeq(), eventBody.UpdateMsg.GetMsgSeq(), eventBody.UpdateMsg.GetEventVersion()-1)
if err != nil || len(t) == 0 {
c.Error("process guild event flow error: pull eventMsg message error: %v", err)
continue
}
// 自己的消息被贴表情会单独推送一个tips, 这里不需要解析
if t[0].Head.RoutingHead.GetFromTinyid() == c.GuildService.TinyId {
continue
}
updatedEvent := &GuildMessageReactionsUpdatedEvent{
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: m.Head.RoutingHead.GetChannelId(),
MessageId: t[0].Head.ContentHead.GetSeq(),
CurrentReactions: decodeGuildMessageEmojiReactions(t[0]),
}
tipsInfo, err := c.waitPacketTimeoutSyncF("MsgPush.PushGroupProMsg", time.Second, func(i interface{}) bool {
if i == nil {
return false
}
_, ok := i.(*tipsPushInfo)
return ok
})
if err == nil {
updatedEvent.OperatorId = tipsInfo.(*tipsPushInfo).TinyId
updatedEvent.MessageSenderUin = tipsInfo.(*tipsPushInfo).TargetMessageSenderUin
}
c.dispatchGuildMessageReactionsUpdatedEvent(updatedEvent)
}
}
continue
}
if cm := c.parseGuildChannelMessage(m); cm != nil {
c.dispatchGuildChannelMessage(cm)
}
}
return nil, nil
}
func (s *GuildService) pullRoamMsgByEventFlow(guildId, channelId, beginSeq, endSeq, eventVersion uint64) ([]*channel.ChannelMsgContent, error) {
payload, _ := proto.Marshal(&channel.ChannelMsgReq{
ChannelParam: &channel.ChannelParam{
GuildId: &guildId,
ChannelId: &channelId,
BeginSeq: &beginSeq,
EndSeq: &endSeq,
Version: []uint64{eventVersion},
},
WithVersionFlag: proto.Uint32(1),
DirectMessageFlag: proto.Uint32(0),
})
seq := s.c.nextSeq()
packet := packets.BuildUniPacket(s.c.Uin, seq, "trpc.group_pro.synclogic.SyncLogic.GetChannelMsg", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
msgRsp := new(channel.ChannelMsgRsp)
if err = proto.Unmarshal(rsp, msgRsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return msgRsp.ChannelMsg.Msgs, nil
}

161
client/guild_msg.go Normal file
View File

@ -0,0 +1,161 @@
package client
import (
"encoding/hex"
"math/rand"
"strconv"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x388"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/client/pb/channel"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/message"
"google.golang.org/protobuf/proto"
)
func (s *GuildService) SendGuildChannelMessage(guildId, channelId uint64, m *message.SendingMessage) error {
mr := rand.Uint32() // 客户端似乎是生成的 u32 虽然类型是u64
req := &channel.DF62ReqBody{Msg: &channel.ChannelMsgContent{
Head: &channel.ChannelMsgHead{
RoutingHead: &channel.ChannelRoutingHead{
GuildId: &guildId,
ChannelId: &channelId,
FromUin: proto.Uint64(uint64(s.c.Uin)),
},
ContentHead: &channel.ChannelContentHead{
Type: proto.Uint64(3840), // const
Random: proto.Uint64(uint64(mr)),
},
},
Body: &msg.MessageBody{
RichText: &msg.RichText{
Elems: message.ToProtoElems(m.Elements, true),
},
},
}}
seq := s.c.nextSeq()
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(s.c.Uin, seq, "MsgProxy.SendMsg", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return errors.Wrap(err, "send packet error")
}
body := new(channel.DF62RspBody)
if err = proto.Unmarshal(rsp, body); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
if body.GetResult() != 0 {
return errors.Errorf("send channel message error: server response %v", body.GetResult())
}
// todo: 返回 *message.GuildMessage
return nil
}
func (s *GuildService) QueryImage(guildId, channelId uint64, hash []byte, size uint64) (*message.GuildImageElement, error) {
seq := s.c.nextSeq()
payload, _ := proto.Marshal(&cmd0x388.D388ReqBody{
NetType: proto.Uint32(3),
Subcmd: proto.Uint32(1),
TryupImgReq: []*cmd0x388.TryUpImgReq{
{
GroupCode: &channelId,
SrcUin: proto.Uint64(uint64(s.c.Uin)),
FileId: proto.Uint64(0),
FileMd5: hash,
FileSize: &size,
FileName: []byte(hex.EncodeToString(hash) + ".jpg"),
SrcTerm: proto.Uint32(5),
PlatformType: proto.Uint32(9),
BuType: proto.Uint32(211),
PicType: proto.Uint32(1000),
BuildVer: []byte("8.8.38.2266"),
AppPicType: proto.Uint32(1052),
SrvUpload: proto.Uint32(0),
QqmeetGuildId: &guildId,
QqmeetChannelId: &channelId,
},
},
CommandId: proto.Uint32(83),
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "ImgStore.QQMeetPicUp", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(cmd0x388.D388RspBody)
if err = proto.Unmarshal(rsp, body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(body.TryupImgRsp) == 0 {
return nil, errors.New("response is empty")
}
if body.TryupImgRsp[0].GetFileExit() {
return &message.GuildImageElement{
FileId: body.TryupImgRsp[0].GetFileid(),
FilePath: hex.EncodeToString(hash) + ".jpg",
Size: int32(size),
DownloadIndex: string(body.TryupImgRsp[0].GetDownloadIndex()),
Md5: hash,
}, nil
}
return nil, errors.New("image is not exists")
}
func decodeGuildMessageEmojiReactions(content *channel.ChannelMsgContent) (r []*message.GuildMessageEmojiReaction) {
r = []*message.GuildMessageEmojiReaction{}
var common *msg.CommonElem
for _, elem := range content.Body.RichText.Elems {
if elem.CommonElem != nil && elem.CommonElem.GetServiceType() == 38 {
common = elem.CommonElem
break
}
}
if common == nil {
return
}
serv38 := new(msg.MsgElemInfoServtype38)
_ = proto.Unmarshal(common.PbElem, serv38)
if len(serv38.ReactData) > 0 {
cnt := new(channel.MsgCnt)
_ = proto.Unmarshal(serv38.ReactData, cnt)
if len(cnt.EmojiReaction) == 0 {
return
}
for _, e := range cnt.EmojiReaction {
reaction := &message.GuildMessageEmojiReaction{
EmojiId: e.GetEmojiId(),
EmojiType: e.GetEmojiType(),
Count: int32(e.GetCnt()),
Clicked: e.GetIsClicked(),
}
if index, err := strconv.ParseInt(e.GetEmojiId(), 10, 32); err == nil {
reaction.Face = message.NewFace(int32(index))
}
r = append(r, reaction)
}
}
return
}
func (c *QQClient) parseGuildChannelMessage(msg *channel.ChannelMsgContent) *message.GuildChannelMessage {
guild := c.GuildService.FindGuild(msg.Head.RoutingHead.GetGuildId())
if guild == nil {
return nil // todo: sync guild info
}
// mem := guild.FindMember(msg.Head.RoutingHead.GetFromTinyid())
return &message.GuildChannelMessage{
Id: msg.Head.ContentHead.GetSeq(),
InternalId: msg.Body.RichText.Attr.GetRandom(),
GuildId: msg.Head.RoutingHead.GetGuildId(),
ChannelId: msg.Head.RoutingHead.GetChannelId(),
Time: int64(msg.Head.ContentHead.GetTime()),
Sender: &message.GuildSender{
TinyId: msg.Head.RoutingHead.GetFromTinyid(),
Nickname: string(msg.ExtInfo.GetFromNick()),
},
Elements: message.ParseMessageElems(msg.Body.RichText.Elems),
}
}

View File

@ -213,6 +213,25 @@ func (c *QQClient) waitPacket(cmd string, f func(interface{}, error)) func() {
} }
} }
// waitPacketTimeoutSyncF
// 等待一个数据包解析, 优先级低于 sendAndWait
func (c *QQClient) waitPacketTimeoutSyncF(cmd string, timeout time.Duration, filter func(interface{}) bool) (r interface{}, e error) {
notifyChan := make(chan bool)
defer c.waitPacket(cmd, func(i interface{}, err error) {
if filter(i) {
r = i
e = err
notifyChan <- true
}
})()
select {
case <-notifyChan:
return
case <-time.After(timeout):
return nil, errors.New("timeout")
}
}
// sendAndWaitDynamic // sendAndWaitDynamic
// 发送数据包并返回需要解析的 response // 发送数据包并返回需要解析的 response
func (c *QQClient) sendAndWaitDynamic(seq uint16, pkt []byte) ([]byte, error) { func (c *QQClient) sendAndWaitDynamic(seq uint16, pkt []byte) ([]byte, error) {

View File

@ -0,0 +1,822 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.14.0
// source: pb/channel/MsgResponsesSvr.proto
package channel
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
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)
)
type BatchGetMsgRspCountReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GuildMsgList []*GuildMsg `protobuf:"bytes,1,rep,name=guildMsgList" json:"guildMsgList,omitempty"`
}
func (x *BatchGetMsgRspCountReq) Reset() {
*x = BatchGetMsgRspCountReq{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchGetMsgRspCountReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchGetMsgRspCountReq) ProtoMessage() {}
func (x *BatchGetMsgRspCountReq) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 BatchGetMsgRspCountReq.ProtoReflect.Descriptor instead.
func (*BatchGetMsgRspCountReq) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{0}
}
func (x *BatchGetMsgRspCountReq) GetGuildMsgList() []*GuildMsg {
if x != nil {
return x.GuildMsgList
}
return nil
}
type BatchGetMsgRspCountRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GuildMsgInfoList []*GuildMsgInfo `protobuf:"bytes,1,rep,name=guildMsgInfoList" json:"guildMsgInfoList,omitempty"`
}
func (x *BatchGetMsgRspCountRsp) Reset() {
*x = BatchGetMsgRspCountRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchGetMsgRspCountRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchGetMsgRspCountRsp) ProtoMessage() {}
func (x *BatchGetMsgRspCountRsp) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 BatchGetMsgRspCountRsp.ProtoReflect.Descriptor instead.
func (*BatchGetMsgRspCountRsp) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{1}
}
func (x *BatchGetMsgRspCountRsp) GetGuildMsgInfoList() []*GuildMsgInfo {
if x != nil {
return x.GuildMsgInfoList
}
return nil
}
type SvrChannelMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChannelId *uint64 `protobuf:"varint,1,opt,name=channelId" json:"channelId,omitempty"`
Id []*MsgId `protobuf:"bytes,2,rep,name=id" json:"id,omitempty"`
}
func (x *SvrChannelMsg) Reset() {
*x = SvrChannelMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SvrChannelMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SvrChannelMsg) ProtoMessage() {}
func (x *SvrChannelMsg) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 SvrChannelMsg.ProtoReflect.Descriptor instead.
func (*SvrChannelMsg) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{2}
}
func (x *SvrChannelMsg) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
}
return 0
}
func (x *SvrChannelMsg) GetId() []*MsgId {
if x != nil {
return x.Id
}
return nil
}
type ChannelMsgInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChannelId *uint64 `protobuf:"varint,1,opt,name=channelId" json:"channelId,omitempty"`
RespData []*MsgRespData `protobuf:"bytes,2,rep,name=respData" json:"respData,omitempty"`
}
func (x *ChannelMsgInfo) Reset() {
*x = ChannelMsgInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChannelMsgInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelMsgInfo) ProtoMessage() {}
func (x *ChannelMsgInfo) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 ChannelMsgInfo.ProtoReflect.Descriptor instead.
func (*ChannelMsgInfo) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{3}
}
func (x *ChannelMsgInfo) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
}
return 0
}
func (x *ChannelMsgInfo) GetRespData() []*MsgRespData {
if x != nil {
return x.RespData
}
return nil
}
type EmojiReaction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EmojiId *string `protobuf:"bytes,1,opt,name=emojiId" json:"emojiId,omitempty"`
EmojiType *uint64 `protobuf:"varint,2,opt,name=emojiType" json:"emojiType,omitempty"`
Cnt *uint64 `protobuf:"varint,3,opt,name=cnt" json:"cnt,omitempty"`
IsClicked *bool `protobuf:"varint,4,opt,name=isClicked" json:"isClicked,omitempty"`
}
func (x *EmojiReaction) Reset() {
*x = EmojiReaction{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmojiReaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmojiReaction) ProtoMessage() {}
func (x *EmojiReaction) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 EmojiReaction.ProtoReflect.Descriptor instead.
func (*EmojiReaction) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{4}
}
func (x *EmojiReaction) GetEmojiId() string {
if x != nil && x.EmojiId != nil {
return *x.EmojiId
}
return ""
}
func (x *EmojiReaction) GetEmojiType() uint64 {
if x != nil && x.EmojiType != nil {
return *x.EmojiType
}
return 0
}
func (x *EmojiReaction) GetCnt() uint64 {
if x != nil && x.Cnt != nil {
return *x.Cnt
}
return 0
}
func (x *EmojiReaction) GetIsClicked() bool {
if x != nil && x.IsClicked != nil {
return *x.IsClicked
}
return false
}
type GuildMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GuildId *uint64 `protobuf:"varint,1,opt,name=guildId" json:"guildId,omitempty"`
ChannelMsgList []*SvrChannelMsg `protobuf:"bytes,2,rep,name=channelMsgList" json:"channelMsgList,omitempty"`
}
func (x *GuildMsg) Reset() {
*x = GuildMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GuildMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GuildMsg) ProtoMessage() {}
func (x *GuildMsg) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 GuildMsg.ProtoReflect.Descriptor instead.
func (*GuildMsg) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{5}
}
func (x *GuildMsg) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *GuildMsg) GetChannelMsgList() []*SvrChannelMsg {
if x != nil {
return x.ChannelMsgList
}
return nil
}
type GuildMsgInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GuildId *uint64 `protobuf:"varint,1,opt,name=guildId" json:"guildId,omitempty"`
ChannelMsgInfoList []*ChannelMsgInfo `protobuf:"bytes,2,rep,name=channelMsgInfoList" json:"channelMsgInfoList,omitempty"`
}
func (x *GuildMsgInfo) Reset() {
*x = GuildMsgInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GuildMsgInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GuildMsgInfo) ProtoMessage() {}
func (x *GuildMsgInfo) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 GuildMsgInfo.ProtoReflect.Descriptor instead.
func (*GuildMsgInfo) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{6}
}
func (x *GuildMsgInfo) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *GuildMsgInfo) GetChannelMsgInfoList() []*ChannelMsgInfo {
if x != nil {
return x.ChannelMsgInfoList
}
return nil
}
type MsgCnt struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id *MsgId `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
EmojiReaction []*EmojiReaction `protobuf:"bytes,2,rep,name=emojiReaction" json:"emojiReaction,omitempty"`
}
func (x *MsgCnt) Reset() {
*x = MsgCnt{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MsgCnt) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MsgCnt) ProtoMessage() {}
func (x *MsgCnt) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_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 MsgCnt.ProtoReflect.Descriptor instead.
func (*MsgCnt) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{7}
}
func (x *MsgCnt) GetId() *MsgId {
if x != nil {
return x.Id
}
return nil
}
func (x *MsgCnt) GetEmojiReaction() []*EmojiReaction {
if x != nil {
return x.EmojiReaction
}
return nil
}
type MsgId struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Version *uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
Seq *uint64 `protobuf:"varint,2,opt,name=seq" json:"seq,omitempty"`
}
func (x *MsgId) Reset() {
*x = MsgId{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MsgId) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MsgId) ProtoMessage() {}
func (x *MsgId) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[8]
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 MsgId.ProtoReflect.Descriptor instead.
func (*MsgId) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{8}
}
func (x *MsgId) GetVersion() uint64 {
if x != nil && x.Version != nil {
return *x.Version
}
return 0
}
func (x *MsgId) GetSeq() uint64 {
if x != nil && x.Seq != nil {
return *x.Seq
}
return 0
}
type MsgRespData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id *MsgId `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Cnt []byte `protobuf:"bytes,2,opt,name=cnt" json:"cnt,omitempty"`
}
func (x *MsgRespData) Reset() {
*x = MsgRespData{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MsgRespData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MsgRespData) ProtoMessage() {}
func (x *MsgRespData) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_MsgResponsesSvr_proto_msgTypes[9]
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 MsgRespData.ProtoReflect.Descriptor instead.
func (*MsgRespData) Descriptor() ([]byte, []int) {
return file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP(), []int{9}
}
func (x *MsgRespData) GetId() *MsgId {
if x != nil {
return x.Id
}
return nil
}
func (x *MsgRespData) GetCnt() []byte {
if x != nil {
return x.Cnt
}
return nil
}
var File_pb_channel_MsgResponsesSvr_proto protoreflect.FileDescriptor
var file_pb_channel_MsgResponsesSvr_proto_rawDesc = []byte{
0x0a, 0x20, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x53, 0x76, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x47, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x4d, 0x73,
0x67, 0x52, 0x73, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x2d, 0x0a, 0x0c,
0x67, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x0c, 0x67,
0x75, 0x69, 0x6c, 0x64, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x16, 0x42,
0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x73, 0x70, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x10, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x73,
0x67, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10,
0x67, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74,
0x22, 0x45, 0x0a, 0x0d, 0x53, 0x76, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73,
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12,
0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4d, 0x73,
0x67, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x22, 0x58, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x44,
0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4d, 0x73, 0x67, 0x52,
0x65, 0x73, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x44, 0x61, 0x74,
0x61, 0x22, 0x77, 0x0a, 0x0d, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
0x09, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x63, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09,
0x69, 0x73, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x5c, 0x0a, 0x08, 0x47, 0x75,
0x69, 0x6c, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64,
0x12, 0x36, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x4c, 0x69,
0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x53, 0x76, 0x72, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x69, 0x0a, 0x0c, 0x47, 0x75, 0x69, 0x6c,
0x64, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x75, 0x69, 0x6c,
0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64,
0x49, 0x64, 0x12, 0x3f, 0x0a, 0x12, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67,
0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x12, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x4c,
0x69, 0x73, 0x74, 0x22, 0x56, 0x0a, 0x06, 0x4d, 0x73, 0x67, 0x43, 0x6e, 0x74, 0x12, 0x16, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4d, 0x73, 0x67, 0x49,
0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0d, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65,
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x45,
0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x65, 0x6d,
0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x33, 0x0a, 0x05, 0x4d,
0x73, 0x67, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10,
0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71,
0x22, 0x37, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12,
0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4d, 0x73,
0x67, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6e, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x6e, 0x74, 0x42, 0x14, 0x5a, 0x12, 0x70, 0x62, 0x2f,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x3b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
}
var (
file_pb_channel_MsgResponsesSvr_proto_rawDescOnce sync.Once
file_pb_channel_MsgResponsesSvr_proto_rawDescData = file_pb_channel_MsgResponsesSvr_proto_rawDesc
)
func file_pb_channel_MsgResponsesSvr_proto_rawDescGZIP() []byte {
file_pb_channel_MsgResponsesSvr_proto_rawDescOnce.Do(func() {
file_pb_channel_MsgResponsesSvr_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_channel_MsgResponsesSvr_proto_rawDescData)
})
return file_pb_channel_MsgResponsesSvr_proto_rawDescData
}
var file_pb_channel_MsgResponsesSvr_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_pb_channel_MsgResponsesSvr_proto_goTypes = []interface{}{
(*BatchGetMsgRspCountReq)(nil), // 0: BatchGetMsgRspCountReq
(*BatchGetMsgRspCountRsp)(nil), // 1: BatchGetMsgRspCountRsp
(*SvrChannelMsg)(nil), // 2: SvrChannelMsg
(*ChannelMsgInfo)(nil), // 3: ChannelMsgInfo
(*EmojiReaction)(nil), // 4: EmojiReaction
(*GuildMsg)(nil), // 5: GuildMsg
(*GuildMsgInfo)(nil), // 6: GuildMsgInfo
(*MsgCnt)(nil), // 7: MsgCnt
(*MsgId)(nil), // 8: MsgId
(*MsgRespData)(nil), // 9: MsgRespData
}
var file_pb_channel_MsgResponsesSvr_proto_depIdxs = []int32{
5, // 0: BatchGetMsgRspCountReq.guildMsgList:type_name -> GuildMsg
6, // 1: BatchGetMsgRspCountRsp.guildMsgInfoList:type_name -> GuildMsgInfo
8, // 2: SvrChannelMsg.id:type_name -> MsgId
9, // 3: ChannelMsgInfo.respData:type_name -> MsgRespData
2, // 4: GuildMsg.channelMsgList:type_name -> SvrChannelMsg
3, // 5: GuildMsgInfo.channelMsgInfoList:type_name -> ChannelMsgInfo
8, // 6: MsgCnt.id:type_name -> MsgId
4, // 7: MsgCnt.emojiReaction:type_name -> EmojiReaction
8, // 8: MsgRespData.id:type_name -> MsgId
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_pb_channel_MsgResponsesSvr_proto_init() }
func file_pb_channel_MsgResponsesSvr_proto_init() {
if File_pb_channel_MsgResponsesSvr_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_channel_MsgResponsesSvr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchGetMsgRspCountReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchGetMsgRspCountRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SvrChannelMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChannelMsgInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmojiReaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GuildMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GuildMsgInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MsgCnt); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MsgId); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_MsgResponsesSvr_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MsgRespData); 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_pb_channel_MsgResponsesSvr_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_channel_MsgResponsesSvr_proto_goTypes,
DependencyIndexes: file_pb_channel_MsgResponsesSvr_proto_depIdxs,
MessageInfos: file_pb_channel_MsgResponsesSvr_proto_msgTypes,
}.Build()
File_pb_channel_MsgResponsesSvr_proto = out.File
file_pb_channel_MsgResponsesSvr_proto_rawDesc = nil
file_pb_channel_MsgResponsesSvr_proto_goTypes = nil
file_pb_channel_MsgResponsesSvr_proto_depIdxs = nil
}

View File

@ -0,0 +1,56 @@
syntax = "proto2";
option go_package = "pb/channel;channel";
message BatchGetMsgRspCountReq {
repeated GuildMsg guildMsgList = 1;
}
message BatchGetMsgRspCountRsp {
repeated GuildMsgInfo guildMsgInfoList = 1;
}
message SvrChannelMsg {
optional uint64 channelId = 1;
repeated MsgId id = 2;
}
message ChannelMsgInfo {
optional uint64 channelId = 1;
repeated MsgRespData respData = 2;
}
message EmojiReaction {
optional string emojiId = 1;
optional uint64 emojiType = 2;
optional uint64 cnt = 3;
optional bool isClicked = 4;
}
message GuildMsg {
optional uint64 guildId = 1;
repeated SvrChannelMsg channelMsgList = 2;
}
message GuildMsgInfo {
optional uint64 guildId = 1;
repeated ChannelMsgInfo channelMsgInfoList = 2;
}
message MsgCnt {
optional MsgId id = 1;
repeated EmojiReaction emojiReaction = 2;
}
message MsgId {
optional uint64 version = 1;
optional uint64 seq = 2;
}
message MsgRespData {
optional MsgId id = 1;
optional bytes cnt = 2;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,135 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/msg/msg.proto";
message ChannelContentHead {
optional uint64 type = 1;
optional uint64 subType = 2;
optional uint64 random = 3;
optional uint64 seq = 4;
optional uint64 cntSeq = 5;
optional uint64 time = 6;
optional bytes meta = 7;
}
message DirectMessageMember {
optional uint64 uin = 1;
optional uint64 tinyid = 2;
optional uint64 sourceGuildId = 3;
optional bytes sourceGuildName = 4;
optional bytes nickName = 5;
optional bytes memberName = 6;
optional uint32 notifyType = 7;
}
message ChannelEvent {
optional uint64 type = 1;
optional uint64 version = 2;
optional ChannelMsgOpInfo opInfo = 3;
}
message ChannelExtInfo {
optional bytes fromNick = 1;
optional bytes guildName = 2;
optional bytes channelName = 3;
optional uint32 visibility = 4;
optional uint32 notifyType = 5;
optional uint32 offlineFlag = 6;
optional uint32 nameType = 7;
optional bytes memberName = 8;
optional uint32 timestamp = 9;
optional uint64 eventVersion = 10;
repeated ChannelEvent events = 11;
optional ChannelRole fromRoleInfo = 12;
optional ChannelFreqLimitInfo freqLimitInfo = 13;
repeated DirectMessageMember directMessageMember = 14;
}
message ChannelFreqLimitInfo {
optional uint32 isLimited = 1;
optional uint32 leftCount = 2;
optional uint64 limitTimestamp = 3;
}
message ChannelInfo {
optional uint64 id = 1;
optional bytes name = 2;
optional uint32 color = 3;
optional uint32 hoist = 4;
}
message ChannelLoginSig {
optional uint32 type = 1;
optional bytes sig = 2;
optional uint32 appid = 3;
}
message ChannelMeta {
optional uint64 fromUin = 1;
optional ChannelLoginSig loginSig = 2;
}
message ChannelMsgContent {
optional ChannelMsgHead head = 1;
optional ChannelMsgCtrlHead ctrlHead = 2;
optional msg.MessageBody body = 3;
optional ChannelExtInfo extInfo = 4;
}
message ChannelMsgCtrlHead {
repeated uint64 includeUin = 1;
repeated uint64 excludeUin = 2;
repeated uint64 featureid = 3;
optional uint32 offlineFlag = 4;
optional uint32 visibility = 5;
optional uint64 ctrlFlag = 6;
repeated ChannelEvent events = 7;
optional uint64 level = 8;
repeated PersonalLevel personalLevels = 9;
optional uint64 guildSyncSeq = 10;
optional uint32 memberNum = 11;
optional uint32 channelType = 12;
optional uint32 privateType = 13;
}
message ChannelMsgHead {
optional ChannelRoutingHead routingHead = 1;
optional ChannelContentHead contentHead = 2;
}
message ChannelMsgMeta {
optional uint64 atAllSeq = 1;
}
message ChannelMsgOpInfo {
optional uint64 operatorTinyid = 1;
optional uint64 operatorRole = 2;
optional uint64 reason = 3;
optional uint64 timestamp = 4;
optional uint64 atType = 5;
}
message PersonalLevel {
optional uint64 toUin = 1;
optional uint64 level = 2;
}
message ChannelRole {
optional uint64 id = 1;
optional bytes info = 2;
optional uint32 flag = 3;
}
message ChannelRoutingHead {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint64 fromUin = 3;
optional uint64 fromTinyid = 4;
optional uint64 guildCode = 5;
optional uint64 fromAppid = 6;
optional uint32 directMessageFlag = 7;
}

View File

@ -0,0 +1,494 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.14.0
// source: pb/channel/msgpush.proto
package channel
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
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)
)
type FocusInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChannelIdList []uint64 `protobuf:"varint,1,rep,name=channelIdList" json:"channelIdList,omitempty"`
}
func (x *FocusInfo) Reset() {
*x = FocusInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_msgpush_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FocusInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FocusInfo) ProtoMessage() {}
func (x *FocusInfo) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_msgpush_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 FocusInfo.ProtoReflect.Descriptor instead.
func (*FocusInfo) Descriptor() ([]byte, []int) {
return file_pb_channel_msgpush_proto_rawDescGZIP(), []int{0}
}
func (x *FocusInfo) GetChannelIdList() []uint64 {
if x != nil {
return x.ChannelIdList
}
return nil
}
type MsgOnlinePush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msgs []*ChannelMsgContent `protobuf:"bytes,1,rep,name=msgs" json:"msgs,omitempty"`
GeneralFlag *uint32 `protobuf:"varint,2,opt,name=generalFlag" json:"generalFlag,omitempty"`
NeedResp *uint32 `protobuf:"varint,3,opt,name=needResp" json:"needResp,omitempty"`
ServerBuf []byte `protobuf:"bytes,4,opt,name=serverBuf" json:"serverBuf,omitempty"`
CompressFlag *uint32 `protobuf:"varint,5,opt,name=compressFlag" json:"compressFlag,omitempty"`
CompressMsg []byte `protobuf:"bytes,6,opt,name=compressMsg" json:"compressMsg,omitempty"`
FocusInfo *FocusInfo `protobuf:"bytes,7,opt,name=focusInfo" json:"focusInfo,omitempty"`
HugeFlag *uint32 `protobuf:"varint,8,opt,name=hugeFlag" json:"hugeFlag,omitempty"`
}
func (x *MsgOnlinePush) Reset() {
*x = MsgOnlinePush{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_msgpush_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MsgOnlinePush) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MsgOnlinePush) ProtoMessage() {}
func (x *MsgOnlinePush) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_msgpush_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 MsgOnlinePush.ProtoReflect.Descriptor instead.
func (*MsgOnlinePush) Descriptor() ([]byte, []int) {
return file_pb_channel_msgpush_proto_rawDescGZIP(), []int{1}
}
func (x *MsgOnlinePush) GetMsgs() []*ChannelMsgContent {
if x != nil {
return x.Msgs
}
return nil
}
func (x *MsgOnlinePush) GetGeneralFlag() uint32 {
if x != nil && x.GeneralFlag != nil {
return *x.GeneralFlag
}
return 0
}
func (x *MsgOnlinePush) GetNeedResp() uint32 {
if x != nil && x.NeedResp != nil {
return *x.NeedResp
}
return 0
}
func (x *MsgOnlinePush) GetServerBuf() []byte {
if x != nil {
return x.ServerBuf
}
return nil
}
func (x *MsgOnlinePush) GetCompressFlag() uint32 {
if x != nil && x.CompressFlag != nil {
return *x.CompressFlag
}
return 0
}
func (x *MsgOnlinePush) GetCompressMsg() []byte {
if x != nil {
return x.CompressMsg
}
return nil
}
func (x *MsgOnlinePush) GetFocusInfo() *FocusInfo {
if x != nil {
return x.FocusInfo
}
return nil
}
func (x *MsgOnlinePush) GetHugeFlag() uint32 {
if x != nil && x.HugeFlag != nil {
return *x.HugeFlag
}
return 0
}
type MsgPushResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerBuf []byte `protobuf:"bytes,1,opt,name=serverBuf" json:"serverBuf,omitempty"`
}
func (x *MsgPushResp) Reset() {
*x = MsgPushResp{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_msgpush_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MsgPushResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MsgPushResp) ProtoMessage() {}
func (x *MsgPushResp) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_msgpush_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 MsgPushResp.ProtoReflect.Descriptor instead.
func (*MsgPushResp) Descriptor() ([]byte, []int) {
return file_pb_channel_msgpush_proto_rawDescGZIP(), []int{2}
}
func (x *MsgPushResp) GetServerBuf() []byte {
if x != nil {
return x.ServerBuf
}
return nil
}
type PressMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msgs []*ChannelMsgContent `protobuf:"bytes,1,rep,name=msgs" json:"msgs,omitempty"`
}
func (x *PressMsg) Reset() {
*x = PressMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_msgpush_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PressMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PressMsg) ProtoMessage() {}
func (x *PressMsg) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_msgpush_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 PressMsg.ProtoReflect.Descriptor instead.
func (*PressMsg) Descriptor() ([]byte, []int) {
return file_pb_channel_msgpush_proto_rawDescGZIP(), []int{3}
}
func (x *PressMsg) GetMsgs() []*ChannelMsgContent {
if x != nil {
return x.Msgs
}
return nil
}
type ServerBuf struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SvrIp *uint32 `protobuf:"varint,1,opt,name=svrIp" json:"svrIp,omitempty"`
SvrPort *uint32 `protobuf:"varint,2,opt,name=svrPort" json:"svrPort,omitempty"`
EchoKey []byte `protobuf:"bytes,3,opt,name=echoKey" json:"echoKey,omitempty"`
}
func (x *ServerBuf) Reset() {
*x = ServerBuf{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_msgpush_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServerBuf) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerBuf) ProtoMessage() {}
func (x *ServerBuf) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_msgpush_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 ServerBuf.ProtoReflect.Descriptor instead.
func (*ServerBuf) Descriptor() ([]byte, []int) {
return file_pb_channel_msgpush_proto_rawDescGZIP(), []int{4}
}
func (x *ServerBuf) GetSvrIp() uint32 {
if x != nil && x.SvrIp != nil {
return *x.SvrIp
}
return 0
}
func (x *ServerBuf) GetSvrPort() uint32 {
if x != nil && x.SvrPort != nil {
return *x.SvrPort
}
return 0
}
func (x *ServerBuf) GetEchoKey() []byte {
if x != nil {
return x.EchoKey
}
return nil
}
var File_pb_channel_msgpush_proto protoreflect.FileDescriptor
var file_pb_channel_msgpush_proto_rawDesc = []byte{
0x0a, 0x18, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x6d, 0x73, 0x67,
0x70, 0x75, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x1a, 0x17, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x09,
0x46, 0x6f, 0x63, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04,
0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22,
0xaf, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73,
0x68, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x73, 0x67,
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x46, 0x6c, 0x61, 0x67,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x46,
0x6c, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x75, 0x66, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x75, 0x66, 0x12, 0x22, 0x0a,
0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x46, 0x6c, 0x61,
0x67, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67,
0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73,
0x4d, 0x73, 0x67, 0x12, 0x30, 0x0a, 0x09, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x2e, 0x46, 0x6f, 0x63, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x66, 0x6f, 0x63, 0x75,
0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x75, 0x67, 0x65, 0x46, 0x6c, 0x61,
0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x68, 0x75, 0x67, 0x65, 0x46, 0x6c, 0x61,
0x67, 0x22, 0x2b, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70,
0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x75, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x75, 0x66, 0x22, 0x3a,
0x0a, 0x08, 0x50, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x73,
0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x22, 0x55, 0x0a, 0x09, 0x53, 0x65,
0x72, 0x76, 0x65, 0x72, 0x42, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x76, 0x72, 0x49, 0x70,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x76, 0x72, 0x49, 0x70, 0x12, 0x18, 0x0a,
0x07, 0x73, 0x76, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07,
0x73, 0x76, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x63, 0x68, 0x6f, 0x4b,
0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x63, 0x68, 0x6f, 0x4b, 0x65,
0x79, 0x42, 0x14, 0x5a, 0x12, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x3b,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
}
var (
file_pb_channel_msgpush_proto_rawDescOnce sync.Once
file_pb_channel_msgpush_proto_rawDescData = file_pb_channel_msgpush_proto_rawDesc
)
func file_pb_channel_msgpush_proto_rawDescGZIP() []byte {
file_pb_channel_msgpush_proto_rawDescOnce.Do(func() {
file_pb_channel_msgpush_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_channel_msgpush_proto_rawDescData)
})
return file_pb_channel_msgpush_proto_rawDescData
}
var file_pb_channel_msgpush_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_pb_channel_msgpush_proto_goTypes = []interface{}{
(*FocusInfo)(nil), // 0: channel.FocusInfo
(*MsgOnlinePush)(nil), // 1: channel.MsgOnlinePush
(*MsgPushResp)(nil), // 2: channel.MsgPushResp
(*PressMsg)(nil), // 3: channel.PressMsg
(*ServerBuf)(nil), // 4: channel.ServerBuf
(*ChannelMsgContent)(nil), // 5: channel.ChannelMsgContent
}
var file_pb_channel_msgpush_proto_depIdxs = []int32{
5, // 0: channel.MsgOnlinePush.msgs:type_name -> channel.ChannelMsgContent
0, // 1: channel.MsgOnlinePush.focusInfo:type_name -> channel.FocusInfo
5, // 2: channel.PressMsg.msgs:type_name -> channel.ChannelMsgContent
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_pb_channel_msgpush_proto_init() }
func file_pb_channel_msgpush_proto_init() {
if File_pb_channel_msgpush_proto != nil {
return
}
file_pb_channel_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_pb_channel_msgpush_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FocusInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_msgpush_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MsgOnlinePush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_msgpush_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MsgPushResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_msgpush_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PressMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_msgpush_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServerBuf); 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_pb_channel_msgpush_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_channel_msgpush_proto_goTypes,
DependencyIndexes: file_pb_channel_msgpush_proto_depIdxs,
MessageInfos: file_pb_channel_msgpush_proto_msgTypes,
}.Build()
File_pb_channel_msgpush_proto = out.File
file_pb_channel_msgpush_proto_rawDesc = nil
file_pb_channel_msgpush_proto_goTypes = nil
file_pb_channel_msgpush_proto_depIdxs = nil
}

View File

@ -0,0 +1,38 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/common.proto";
message FocusInfo {
repeated uint64 channelIdList = 1;
}
message MsgOnlinePush {
repeated ChannelMsgContent msgs = 1;
optional uint32 generalFlag = 2;
optional uint32 needResp = 3;
optional bytes serverBuf = 4;
optional uint32 compressFlag = 5;
optional bytes compressMsg = 6;
optional FocusInfo focusInfo = 7;
optional uint32 hugeFlag = 8;
}
message MsgPushResp {
optional bytes serverBuf = 1;
}
message PressMsg {
repeated ChannelMsgContent msgs = 1;
}
message ServerBuf {
optional uint32 svrIp = 1;
optional uint32 svrPort = 2;
optional bytes echoKey = 3;
}

View File

@ -0,0 +1,372 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.14.0
// source: pb/channel/oidb0xf62.proto
package channel
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
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)
)
type DF62ReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg *ChannelMsgContent `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
}
func (x *DF62ReqBody) Reset() {
*x = DF62ReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_oidb0xf62_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DF62ReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DF62ReqBody) ProtoMessage() {}
func (x *DF62ReqBody) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_oidb0xf62_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 DF62ReqBody.ProtoReflect.Descriptor instead.
func (*DF62ReqBody) Descriptor() ([]byte, []int) {
return file_pb_channel_oidb0xf62_proto_rawDescGZIP(), []int{0}
}
func (x *DF62ReqBody) GetMsg() *ChannelMsgContent {
if x != nil {
return x.Msg
}
return nil
}
type DF62RspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result *uint32 `protobuf:"varint,1,opt,name=result" json:"result,omitempty"`
Errmsg []byte `protobuf:"bytes,2,opt,name=errmsg" json:"errmsg,omitempty"`
SendTime *uint32 `protobuf:"varint,3,opt,name=sendTime" json:"sendTime,omitempty"`
Head *ChannelMsgHead `protobuf:"bytes,4,opt,name=head" json:"head,omitempty"`
ErrType *uint32 `protobuf:"varint,5,opt,name=errType" json:"errType,omitempty"`
TransSvrInfo *TransSvrInfo `protobuf:"bytes,6,opt,name=transSvrInfo" json:"transSvrInfo,omitempty"`
FreqLimitInfo *ChannelFreqLimitInfo `protobuf:"bytes,7,opt,name=freqLimitInfo" json:"freqLimitInfo,omitempty"`
}
func (x *DF62RspBody) Reset() {
*x = DF62RspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_oidb0xf62_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DF62RspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DF62RspBody) ProtoMessage() {}
func (x *DF62RspBody) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_oidb0xf62_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 DF62RspBody.ProtoReflect.Descriptor instead.
func (*DF62RspBody) Descriptor() ([]byte, []int) {
return file_pb_channel_oidb0xf62_proto_rawDescGZIP(), []int{1}
}
func (x *DF62RspBody) GetResult() uint32 {
if x != nil && x.Result != nil {
return *x.Result
}
return 0
}
func (x *DF62RspBody) GetErrmsg() []byte {
if x != nil {
return x.Errmsg
}
return nil
}
func (x *DF62RspBody) GetSendTime() uint32 {
if x != nil && x.SendTime != nil {
return *x.SendTime
}
return 0
}
func (x *DF62RspBody) GetHead() *ChannelMsgHead {
if x != nil {
return x.Head
}
return nil
}
func (x *DF62RspBody) GetErrType() uint32 {
if x != nil && x.ErrType != nil {
return *x.ErrType
}
return 0
}
func (x *DF62RspBody) GetTransSvrInfo() *TransSvrInfo {
if x != nil {
return x.TransSvrInfo
}
return nil
}
func (x *DF62RspBody) GetFreqLimitInfo() *ChannelFreqLimitInfo {
if x != nil {
return x.FreqLimitInfo
}
return nil
}
type TransSvrInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SubType *uint32 `protobuf:"varint,1,opt,name=subType" json:"subType,omitempty"`
RetCode *int32 `protobuf:"varint,2,opt,name=retCode" json:"retCode,omitempty"`
ErrMsg []byte `protobuf:"bytes,3,opt,name=errMsg" json:"errMsg,omitempty"`
TransInfo []byte `protobuf:"bytes,4,opt,name=transInfo" json:"transInfo,omitempty"`
}
func (x *TransSvrInfo) Reset() {
*x = TransSvrInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_channel_oidb0xf62_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransSvrInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransSvrInfo) ProtoMessage() {}
func (x *TransSvrInfo) ProtoReflect() protoreflect.Message {
mi := &file_pb_channel_oidb0xf62_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 TransSvrInfo.ProtoReflect.Descriptor instead.
func (*TransSvrInfo) Descriptor() ([]byte, []int) {
return file_pb_channel_oidb0xf62_proto_rawDescGZIP(), []int{2}
}
func (x *TransSvrInfo) GetSubType() uint32 {
if x != nil && x.SubType != nil {
return *x.SubType
}
return 0
}
func (x *TransSvrInfo) GetRetCode() int32 {
if x != nil && x.RetCode != nil {
return *x.RetCode
}
return 0
}
func (x *TransSvrInfo) GetErrMsg() []byte {
if x != nil {
return x.ErrMsg
}
return nil
}
func (x *TransSvrInfo) GetTransInfo() []byte {
if x != nil {
return x.TransInfo
}
return nil
}
var File_pb_channel_oidb0xf62_proto protoreflect.FileDescriptor
var file_pb_channel_oidb0xf62_proto_rawDesc = []byte{
0x0a, 0x1a, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x6f, 0x69, 0x64,
0x62, 0x30, 0x78, 0x66, 0x36, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x17, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b,
0x0a, 0x0b, 0x44, 0x46, 0x36, 0x32, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2c, 0x0a,
0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x43,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xa0, 0x02, 0x0a, 0x0b,
0x44, 0x46, 0x36, 0x32, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x73,
0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73,
0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, 0x64, 0x52, 0x04,
0x68, 0x65, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x72, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39,
0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x53, 0x76, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x53, 0x76, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x74, 0x72, 0x61,
0x6e, 0x73, 0x53, 0x76, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, 0x0d, 0x66, 0x72, 0x65,
0x71, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1d, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x46, 0x72, 0x65, 0x71, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x0d, 0x66, 0x72, 0x65, 0x71, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x78,
0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x53, 0x76, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18,
0x0a, 0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x43,
0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72,
0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74,
0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x14, 0x5a, 0x12, 0x70, 0x62, 0x2f, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x3b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
}
var (
file_pb_channel_oidb0xf62_proto_rawDescOnce sync.Once
file_pb_channel_oidb0xf62_proto_rawDescData = file_pb_channel_oidb0xf62_proto_rawDesc
)
func file_pb_channel_oidb0xf62_proto_rawDescGZIP() []byte {
file_pb_channel_oidb0xf62_proto_rawDescOnce.Do(func() {
file_pb_channel_oidb0xf62_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_channel_oidb0xf62_proto_rawDescData)
})
return file_pb_channel_oidb0xf62_proto_rawDescData
}
var file_pb_channel_oidb0xf62_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_pb_channel_oidb0xf62_proto_goTypes = []interface{}{
(*DF62ReqBody)(nil), // 0: channel.DF62ReqBody
(*DF62RspBody)(nil), // 1: channel.DF62RspBody
(*TransSvrInfo)(nil), // 2: channel.TransSvrInfo
(*ChannelMsgContent)(nil), // 3: channel.ChannelMsgContent
(*ChannelMsgHead)(nil), // 4: channel.ChannelMsgHead
(*ChannelFreqLimitInfo)(nil), // 5: channel.ChannelFreqLimitInfo
}
var file_pb_channel_oidb0xf62_proto_depIdxs = []int32{
3, // 0: channel.DF62ReqBody.msg:type_name -> channel.ChannelMsgContent
4, // 1: channel.DF62RspBody.head:type_name -> channel.ChannelMsgHead
2, // 2: channel.DF62RspBody.transSvrInfo:type_name -> channel.TransSvrInfo
5, // 3: channel.DF62RspBody.freqLimitInfo:type_name -> channel.ChannelFreqLimitInfo
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_pb_channel_oidb0xf62_proto_init() }
func file_pb_channel_oidb0xf62_proto_init() {
if File_pb_channel_oidb0xf62_proto != nil {
return
}
file_pb_channel_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_pb_channel_oidb0xf62_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DF62ReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_oidb0xf62_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DF62RspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_channel_oidb0xf62_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransSvrInfo); 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_pb_channel_oidb0xf62_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_channel_oidb0xf62_proto_goTypes,
DependencyIndexes: file_pb_channel_oidb0xf62_proto_depIdxs,
MessageInfos: file_pb_channel_oidb0xf62_proto_msgTypes,
}.Build()
File_pb_channel_oidb0xf62_proto = out.File
file_pb_channel_oidb0xf62_proto_rawDesc = nil
file_pb_channel_oidb0xf62_proto_goTypes = nil
file_pb_channel_oidb0xf62_proto_depIdxs = nil
}

View File

@ -0,0 +1,27 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/common.proto";
message DF62ReqBody {
optional ChannelMsgContent msg = 1;
}
message DF62RspBody {
optional uint32 result = 1;
optional bytes errmsg = 2;
optional uint32 sendTime = 3;
optional ChannelMsgHead head = 4;
optional uint32 errType = 5;
optional TransSvrInfo transSvrInfo = 6;
optional ChannelFreqLimitInfo freqLimitInfo = 7;
}
message TransSvrInfo {
optional uint32 subType = 1;
optional int32 retCode = 2;
optional bytes errMsg = 3;
optional bytes transInfo = 4;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,327 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
message AppChannelMsg {
optional string summary = 1;
optional string msg = 2;
optional uint64 expireTimeMs = 3;
optional uint32 schemaType = 4;
optional string schema = 5;
}
message CategoryChannelInfo {
optional uint32 channelIndex = 1;
optional uint64 channelId = 2;
}
message CategoryInfo {
optional uint32 categoryIndex = 1;
repeated CategoryChannelInfo channelInfo = 2;
optional bytes categoryName = 3;
optional uint64 categoryId = 4;
}
message ChanInfoFilter {
optional uint32 channelName = 2;
optional uint32 creatorId = 3;
optional uint32 createTime = 4;
optional uint32 guildId = 5;
optional uint32 msgNotifyType = 6;
optional uint32 channelType = 7;
optional uint32 speakPermission = 8;
optional uint32 lastMsgSeq = 11;
optional uint32 lastCntMsgSeq = 12;
optional VoiceChannelInfoFilter voiceChannelInfoFilter = 14;
optional LiveChannelInfoFilter liveChannelInfoFilter = 15;
optional uint32 bannedSpeak = 16;
}
message ChangeChanInfo {
optional uint64 guildId = 1;
optional uint64 chanId = 2;
optional uint64 operatorId = 3;
optional MsgSeq infoSeq = 4;
optional uint32 updateType = 5;
optional ChanInfoFilter chanInfoFilter = 6;
optional ServChannelInfo chanInfo = 7;
}
message ChangeGuildInfo {
optional uint64 guildId = 1;
optional uint64 operatorId = 2;
optional MsgSeq infoSeq = 3;
optional MsgSeq faceSeq = 4;
optional uint32 updateType = 5;
optional GuildInfoFilter guildInfoFilter = 6;
optional GuildInfo guildInfo = 7;
}
message ChannelID {
optional uint64 chanId = 1;
}
message ServChannelInfo {
optional uint64 channelId = 1;
optional bytes channelName = 2;
optional uint64 creatorId = 3;
optional uint64 createTime = 4;
optional uint64 guildId = 5;
optional uint32 msgNotifyType = 6;
optional uint32 channelType = 7;
optional uint32 speakPermission = 8;
optional MsgSeq lastMsgSeq = 11;
optional MsgSeq lastCntMsgSeq = 12;
optional VoiceChannelInfo voiceChannelInfo = 14;
optional LiveChannelInfo liveChannelInfo = 15;
optional uint32 bannedSpeak = 16;
}
message CommGrayTips {
optional uint64 busiType = 1;
optional uint64 busiId = 2;
optional uint32 ctrlFlag = 3;
optional uint64 templId = 4;
repeated TemplParam templParam = 5;
optional bytes content = 6;
optional uint64 tipsSeqId = 10;
optional bytes pbReserv = 100;
message TemplParam {
optional bytes name = 1;
optional bytes value = 2;
}
}
message CreateChan {
optional uint64 guildId = 1;
optional uint64 operatorId = 3;
repeated ChannelID createId = 4;
}
message CreateGuild {
optional uint64 operatorId = 1;
optional uint64 guildId = 2;
}
message DestroyChan {
optional uint64 guildId = 1;
optional uint64 operatorId = 3;
repeated ChannelID deleteId = 4;
}
message DestroyGuild {
optional uint64 operatorId = 1;
optional uint64 guildId = 2;
}
message EventBody {
optional ReadNotify readNotify = 1;
optional CommGrayTips commGrayTips = 2;
optional CreateGuild createGuild = 3;
optional DestroyGuild destroyGuild = 4;
optional JoinGuild joinGuild = 5;
optional KickOffGuild kickOffGuild = 6;
optional QuitGuild quitGuild = 7;
optional ChangeGuildInfo changeGuildInfo = 8;
optional CreateChan createChan = 9;
optional DestroyChan destroyChan = 10;
optional ChangeChanInfo changeChanInfo = 11;
optional SetAdmin setAdmin = 12;
optional SetMsgRecvType setMsgRecvType = 13;
optional UpdateMsg updateMsg = 14;
optional SetTop setTop = 17;
optional SwitchVoiceChannel switchChannel = 18;
optional UpdateCategory updateCategory = 21;
optional UpdateVoiceBlockList updateVoiceBlockList = 22;
optional SetMute setMute = 23;
optional LiveRoomStatusChangeMsg liveStatusChangeRoom = 24;
optional SwitchLiveRoom switchLiveRoom = 25;
repeated MsgEvent events = 39;
optional SchedulerMsg scheduler = 40;
optional AppChannelMsg appChannel = 41;
optional AppChannelMsg weakMsgAppChannel = 46;
}
message GroupProStatus {
optional uint32 isEnable = 1;
optional uint32 isBanned = 2;
optional uint32 isFrozen = 3;
}
message GuildInfo {
optional uint64 guildCode = 2;
optional uint64 ownerId = 3;
optional uint64 createTime = 4;
optional uint32 memberMaxNum = 5;
optional uint32 memberNum = 6;
optional uint32 guildType = 7;
optional bytes guildName = 8;
repeated uint64 robotList = 9;
repeated uint64 adminList = 10;
optional uint32 robotMaxNum = 11;
optional uint32 adminMaxNum = 12;
optional bytes profile = 13;
optional uint64 faceSeq = 14;
optional GroupProStatus guildStatus = 15;
optional uint32 channelNum = 16;
optional MsgSeq memberChangeSeq = 5002;
optional MsgSeq guildInfoChangeSeq = 5003;
optional MsgSeq channelChangeSeq = 5004;
}
message GuildInfoFilter {
optional uint32 guildCode = 2;
optional uint32 ownerId = 3;
optional uint32 createTime = 4;
optional uint32 memberMaxNum = 5;
optional uint32 memberNum = 6;
optional uint32 guildType = 7;
optional uint32 guildName = 8;
optional uint32 robotList = 9;
optional uint32 adminList = 10;
optional uint32 robotMaxNum = 11;
optional uint32 adminMaxNum = 12;
optional uint32 profile = 13;
optional uint32 faceSeq = 14;
optional uint32 guildStatus = 15;
optional uint32 channelNum = 16;
optional uint32 memberChangeSeq = 5002;
optional uint32 guildInfoChangeSeq = 5003;
optional uint32 channelChangeSeq = 5004;
}
message JoinGuild {
optional uint64 memberId = 3;
optional uint32 memberType = 4;
optional uint64 memberTinyid = 5;
}
message KickOffGuild {
optional uint64 memberId = 3;
optional uint32 setBlack = 4;
optional uint64 memberTinyid = 5;
}
message LiveChannelInfo {
optional uint64 roomId = 1;
optional uint64 anchorUin = 2;
optional bytes name = 3;
}
message LiveChannelInfoFilter {
optional uint32 isNeedRoomId = 1;
optional uint32 isNeedAnchorUin = 2;
optional uint32 isNeedName = 3;
}
message LiveRoomStatusChangeMsg {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint64 roomId = 3;
optional uint64 anchorTinyid = 4;
optional uint32 action = 5;
}
message MsgEvent {
optional uint64 seq = 1;
optional uint64 eventType = 2;
optional uint64 eventVersion = 3;
}
message MsgSeq {
optional uint64 seq = 1;
optional uint64 time = 2;
}
message QuitGuild {}
message ReadNotify {
optional uint64 channelId = 1;
optional uint64 guildId = 2;
optional MsgSeq readMsgSeq = 3;
optional MsgSeq readCntMsgSeq = 4;
optional bytes readMsgMeta = 5;
}
message SchedulerMsg {
optional bytes creatorHeadUrl = 1;
optional string wording = 2;
optional uint64 expireTimeMs = 3;
}
message SetAdmin {
optional uint64 guildId = 1;
optional uint64 chanId = 2;
optional uint64 operatorId = 3;
optional uint64 adminId = 4;
optional uint64 adminTinyid = 5;
optional uint32 operateType = 6;
}
message SetMsgRecvType {
optional uint64 guildId = 1;
optional uint64 chanId = 2;
optional uint64 operatorId = 3;
optional uint32 msgNotifyType = 4;
}
message SetMute {
optional uint32 action = 1;
optional uint64 tinyID = 2;
}
message SetTop {
optional uint32 action = 1;
}
message SwitchDetail {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint32 platform = 3;
}
message SwitchLiveRoom {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint64 roomId = 3;
optional uint64 tinyid = 4;
optional uint32 action = 5;
}
message SwitchVoiceChannel {
optional uint64 memberId = 1;
optional SwitchDetail enterDetail = 2;
optional SwitchDetail leaveDetail = 3;
}
message UpdateCategory {
repeated CategoryInfo categoryInfo = 1;
optional CategoryInfo noClassifyCategoryInfo = 2;
}
message UpdateMsg {
optional uint64 msgSeq = 1;
optional bool origMsgUncountable = 2;
optional uint64 eventType = 3;
optional uint64 eventVersion = 4;
optional uint64 operatorTinyid = 5;
optional uint64 operatorRole = 6;
optional uint64 reason = 7;
optional uint64 timestamp = 8;
}
message UpdateVoiceBlockList {
optional uint32 action = 1;
optional uint64 objectTinyid = 2;
}
message VoiceChannelInfo {
optional uint32 memberMaxNum = 1;
}
message VoiceChannelInfoFilter {
optional uint32 memberMaxNum = 1;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,134 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/common.proto";
message ChannelMsg {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint32 result = 3;
optional uint64 rspBeginSeq = 4;
optional uint64 rspEndSeq = 5;
repeated ChannelMsgContent msgs = 6;
}
message ChannelMsgReq {
optional ChannelParam channelParam = 1;
optional uint32 withVersionFlag = 2;
optional uint32 directMessageFlag = 3;
}
message ChannelMsgRsp {
optional uint32 result = 1;
optional bytes errMsg = 2;
optional ChannelMsg channelMsg = 3;
optional uint32 withVersionFlag = 4;
optional uint64 getMsgTime = 5;
}
message ChannelNode {
optional uint64 channelId = 1;
optional uint64 seq = 2;
optional uint64 cntSeq = 3;
optional uint64 time = 4;
optional uint64 memberReadMsgSeq = 5;
optional uint64 memberReadCntSeq = 6;
optional uint32 notifyType = 7;
optional bytes channelName = 8;
optional uint32 channelType = 9;
optional bytes meta = 10;
optional bytes readMsgMeta = 11;
optional uint32 eventTime = 12;
}
message ChannelParam {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint64 beginSeq = 3;
optional uint64 endSeq = 4;
optional uint64 time = 5;
repeated uint64 version = 6;
repeated MsgCond seqs = 7;
}
message DirectMessageSource {
optional uint64 tinyId = 1;
optional uint64 guildId = 2;
optional bytes guildName = 3;
optional bytes memberName = 4;
optional bytes nickName = 5;
}
message FirstViewMsg {
optional uint32 pushFlag = 1;
optional uint32 seq = 2;
repeated GuildNode guildNodes = 3;
repeated ChannelMsg channelMsgs = 4;
optional uint64 getMsgTime = 5;
repeated GuildNode directMessageGuildNodes = 6;
}
message FirstViewReq {
optional uint64 lastMsgTime = 1;
optional uint32 udcFlag = 2;
optional uint32 seq = 3;
optional uint32 directMessageFlag = 4;
}
message FirstViewRsp {
optional uint32 result = 1;
optional bytes errMsg = 2;
optional uint32 seq = 3;
optional uint32 udcFlag = 4;
optional uint32 guildCount = 5;
optional uint64 selfTinyid = 6;
optional uint32 directMessageSwitch = 7;
optional uint32 directMessageGuildCount = 8;
}
message GuildNode {
optional uint64 guildId = 1;
optional uint64 guildCode = 2;
repeated ChannelNode channelNodes = 3;
optional bytes guildName = 4;
optional DirectMessageSource peerSource = 5;
}
message MsgCond {
optional uint64 seq = 1;
optional uint64 eventVersion = 2;
}
message MultiChannelMsg {
optional uint32 pushFlag = 1;
optional uint32 seq = 2;
repeated ChannelMsg channelMsgs = 3;
optional uint64 getMsgTime = 4;
}
message MultiChannelMsgReq {
repeated ChannelParam channelParams = 1;
optional uint32 seq = 2;
optional uint32 directMessageFlag = 3;
}
message MultiChannelMsgRsp {
optional uint32 result = 1;
optional bytes errMsg = 2;
optional uint32 seq = 3;
}
message ReqBody {
optional ChannelParam channelParam = 1;
optional uint32 directMessageFlag = 2;
}
message RspBody {
optional uint32 result = 1;
optional bytes errMsg = 2;
optional ChannelMsg channelMsg = 3;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,123 @@
// ,
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
message ChannelOidb0xf5bRsp {
optional uint64 guildId = 1;
repeated GuildMemberInfo bots = 4;
repeated GuildMemberInfo members = 5;
optional GuildAdminInfo adminInfo = 25;
}
message ChannelOidb0xf88Rsp {
optional GuildUserProfile profile = 1;
}
message ChannelOidb0xfc9Rsp {
optional GuildUserProfile profile = 1;
}
message ChannelOidb0xf57Rsp {
optional GuildMetaRsp rsp = 1;
}
message ChannelOidb0xf55Rsp {
optional GuildChannelInfo info = 1;
}
message ChannelOidb0xf5dRsp {
optional ChannelListRsp rsp = 1;
}
message GuildMetaRsp {
optional uint64 guildId = 3;
optional GuildMeta meta = 4;
}
message ChannelListRsp {
optional uint64 guildId = 1;
repeated GuildChannelInfo channels = 2;
// 5: Category infos
}
message GuildAdminInfo {
repeated GuildMemberInfo admins = 2;
}
message GuildMemberInfo {
optional string title = 2;
optional string nickname = 3;
optional int64 lastSpeakTime = 4; // uncertainty
optional int32 role = 5; // uncertainty
optional uint64 tinyId = 8;
}
//
message GuildUserProfile {
optional uint64 tinyId = 2;
optional string nickname = 3;
optional string avatarUrl = 6;
// 15: avatar url info
optional int64 joinTime = 16; // uncertainty
// 22 cards
// 23 display cards
// 25 current cards *uncertainty
}
message GuildMeta {
optional uint64 guildCode = 2;
optional int64 createTime = 4;
optional int64 maxMemberCount = 5;
optional int64 memberCount = 6;
optional string name = 8;
optional int32 robotMaxNum = 11;
optional int32 adminMaxNum = 12;
optional string profile = 13;
optional int64 avatarSeq = 14;
optional uint64 ownerId = 18;
optional int64 coverSeq = 19;
optional int32 clientId = 20;
}
message GuildChannelInfo {
optional uint64 channelId = 1;
optional string channelName = 2;
optional int64 creatorUin = 3;
optional int64 createTime = 4;
optional uint64 guildId = 5;
optional int32 finalNotifyType = 6;
optional int32 channelType = 7;
optional int32 talkPermission = 8;
// 11 - 14 : MsgInfo
optional uint64 creatorTinyId = 15;
// 16: Member info ?
optional int32 visibleType = 22;
optional GuildChannelTopMsgInfo topMsg = 28;
optional int32 currentSlowModeKey = 31;
repeated GuildChannelSlowModeInfo slowModeInfos = 32;
}
message GuildChannelSlowModeInfo {
optional int32 slowModeKey = 1;
optional int32 speakFrequency = 2;
optional int32 slowModeCircle = 3;
optional string slowModeText = 4;
}
message GuildChannelTopMsgInfo {
optional uint64 topMsgSeq = 1;
optional int64 topMsgTime = 2;
optional uint64 topMsgOperatorTinyId = 3;
}
/*
//
message GuildMemberProfileCard {
optional int32 appid = 1;
optional string name = 2;
}
*/

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
syntax = "proto2"; syntax = "proto2";
option go_package = "./;msg"; package msg;
option go_package = "pb/msg;msg";
message GetMessageRequest { message GetMessageRequest {
optional SyncFlag syncFlag = 1; optional SyncFlag syncFlag = 1;
@ -774,6 +776,11 @@ message MsgElemInfo_servtype33 {
optional bytes buf = 4; optional bytes buf = 4;
} }
message MsgElemInfo_servtype38 {
optional bytes reactData = 1;
optional bytes replyData = 2;
}
message SubMsgType0x4Body { message SubMsgType0x4Body {
optional NotOnlineFile notOnlineFile = 1; optional NotOnlineFile notOnlineFile = 1;
optional uint32 msgTime = 2; optional uint32 msgTime = 2;

View File

@ -36,6 +36,18 @@ type FriendImageElement struct {
Flash bool Flash bool
} }
type GuildImageElement struct {
FileId uint64
FilePath string
ImageType int32
Size int32
Width int32
Height int32
DownloadIndex string
Md5 []byte
Url string
}
type ImageBizType uint32 type ImageBizType uint32
const ( const (
@ -74,6 +86,10 @@ func (e *FriendImageElement) Type() ElementType {
return Image return Image
} }
func (e *GuildImageElement) Type() ElementType {
return Image
}
func (e *GroupImageElement) Pack() (r []*msg.Elem) { func (e *GroupImageElement) Pack() (r []*msg.Elem) {
cface := &msg.CustomFace{ cface := &msg.CustomFace{
FileType: proto.Int32(66), FileType: proto.Int32(66),
@ -155,3 +171,24 @@ func (e *FriendImageElement) Pack() (r []*msg.Elem) {
elem := &msg.Elem{NotOnlineImage: image} elem := &msg.Elem{NotOnlineImage: image}
return []*msg.Elem{elem} return []*msg.Elem{elem}
} }
func (e *GuildImageElement) Pack() (r []*msg.Elem) {
cface := &msg.CustomFace{
FileType: proto.Int32(66),
Useful: proto.Int32(1),
BizType: proto.Int32(0),
Width: &e.Width,
Height: &e.Height,
FileId: proto.Int32(int32(e.FileId)),
FilePath: &e.FilePath,
ImageType: &e.ImageType,
Size: &e.Size,
Md5: e.Md5,
PbReserve: binary.DynamicProtoMessage{
1: uint32(0), 2: uint32(0), 6: "", 10: uint32(0), 15: uint32(8),
20: e.DownloadIndex,
}.Encode(),
}
elem := &msg.Elem{CustomFace: cface}
return []*msg.Elem{elem}
}

26
message/message_guild.go Normal file
View File

@ -0,0 +1,26 @@
package message
type (
GuildChannelMessage struct {
Id uint64
InternalId int32
GuildId uint64
ChannelId uint64
Time int64
Sender *GuildSender
Elements []IMessageElement
}
GuildMessageEmojiReaction struct {
EmojiId string
EmojiType uint64
Face *FaceElement
Count int32
Clicked bool
}
GuildSender struct {
TinyId uint64
Nickname string
}
)