This commit is contained in:
tzagim 2024-05-21 20:22:44 +03:00 committed by GitHub
parent af075e15fb
commit d5cd4b75ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 16093 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,421 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: waMediaEntryData/WAMediaEntryData.proto
package waMediaEntryData
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "embed"
)
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 MediaEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FileSHA256 []byte `protobuf:"bytes,1,opt,name=fileSHA256,proto3" json:"fileSHA256,omitempty"`
MediaKey []byte `protobuf:"bytes,2,opt,name=mediaKey,proto3" json:"mediaKey,omitempty"`
FileEncSHA256 []byte `protobuf:"bytes,3,opt,name=fileEncSHA256,proto3" json:"fileEncSHA256,omitempty"`
DirectPath string `protobuf:"bytes,4,opt,name=directPath,proto3" json:"directPath,omitempty"`
MediaKeyTimestamp int64 `protobuf:"varint,5,opt,name=mediaKeyTimestamp,proto3" json:"mediaKeyTimestamp,omitempty"`
ServerMediaType string `protobuf:"bytes,6,opt,name=serverMediaType,proto3" json:"serverMediaType,omitempty"`
UploadToken []byte `protobuf:"bytes,7,opt,name=uploadToken,proto3" json:"uploadToken,omitempty"`
ValidatedTimestamp []byte `protobuf:"bytes,8,opt,name=validatedTimestamp,proto3" json:"validatedTimestamp,omitempty"`
Sidecar []byte `protobuf:"bytes,9,opt,name=sidecar,proto3" json:"sidecar,omitempty"`
ObjectID string `protobuf:"bytes,10,opt,name=objectID,proto3" json:"objectID,omitempty"`
FBID string `protobuf:"bytes,11,opt,name=FBID,proto3" json:"FBID,omitempty"`
DownloadableThumbnail *MediaEntry_DownloadableThumbnail `protobuf:"bytes,12,opt,name=downloadableThumbnail,proto3" json:"downloadableThumbnail,omitempty"`
Handle string `protobuf:"bytes,13,opt,name=handle,proto3" json:"handle,omitempty"`
Filename string `protobuf:"bytes,14,opt,name=filename,proto3" json:"filename,omitempty"`
ProgressiveJPEGDetails *MediaEntry_ProgressiveJpegDetails `protobuf:"bytes,15,opt,name=progressiveJPEGDetails,proto3" json:"progressiveJPEGDetails,omitempty"`
}
func (x *MediaEntry) Reset() {
*x = MediaEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_waMediaEntryData_WAMediaEntryData_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaEntry) ProtoMessage() {}
func (x *MediaEntry) ProtoReflect() protoreflect.Message {
mi := &file_waMediaEntryData_WAMediaEntryData_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 MediaEntry.ProtoReflect.Descriptor instead.
func (*MediaEntry) Descriptor() ([]byte, []int) {
return file_waMediaEntryData_WAMediaEntryData_proto_rawDescGZIP(), []int{0}
}
func (x *MediaEntry) GetFileSHA256() []byte {
if x != nil {
return x.FileSHA256
}
return nil
}
func (x *MediaEntry) GetMediaKey() []byte {
if x != nil {
return x.MediaKey
}
return nil
}
func (x *MediaEntry) GetFileEncSHA256() []byte {
if x != nil {
return x.FileEncSHA256
}
return nil
}
func (x *MediaEntry) GetDirectPath() string {
if x != nil {
return x.DirectPath
}
return ""
}
func (x *MediaEntry) GetMediaKeyTimestamp() int64 {
if x != nil {
return x.MediaKeyTimestamp
}
return 0
}
func (x *MediaEntry) GetServerMediaType() string {
if x != nil {
return x.ServerMediaType
}
return ""
}
func (x *MediaEntry) GetUploadToken() []byte {
if x != nil {
return x.UploadToken
}
return nil
}
func (x *MediaEntry) GetValidatedTimestamp() []byte {
if x != nil {
return x.ValidatedTimestamp
}
return nil
}
func (x *MediaEntry) GetSidecar() []byte {
if x != nil {
return x.Sidecar
}
return nil
}
func (x *MediaEntry) GetObjectID() string {
if x != nil {
return x.ObjectID
}
return ""
}
func (x *MediaEntry) GetFBID() string {
if x != nil {
return x.FBID
}
return ""
}
func (x *MediaEntry) GetDownloadableThumbnail() *MediaEntry_DownloadableThumbnail {
if x != nil {
return x.DownloadableThumbnail
}
return nil
}
func (x *MediaEntry) GetHandle() string {
if x != nil {
return x.Handle
}
return ""
}
func (x *MediaEntry) GetFilename() string {
if x != nil {
return x.Filename
}
return ""
}
func (x *MediaEntry) GetProgressiveJPEGDetails() *MediaEntry_ProgressiveJpegDetails {
if x != nil {
return x.ProgressiveJPEGDetails
}
return nil
}
type MediaEntry_ProgressiveJpegDetails struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ScanLengths []int64 `protobuf:"varint,1,rep,packed,name=scanLengths,proto3" json:"scanLengths,omitempty"`
Sidecar []byte `protobuf:"bytes,2,opt,name=sidecar,proto3" json:"sidecar,omitempty"`
}
func (x *MediaEntry_ProgressiveJpegDetails) Reset() {
*x = MediaEntry_ProgressiveJpegDetails{}
if protoimpl.UnsafeEnabled {
mi := &file_waMediaEntryData_WAMediaEntryData_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaEntry_ProgressiveJpegDetails) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaEntry_ProgressiveJpegDetails) ProtoMessage() {}
func (x *MediaEntry_ProgressiveJpegDetails) ProtoReflect() protoreflect.Message {
mi := &file_waMediaEntryData_WAMediaEntryData_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 MediaEntry_ProgressiveJpegDetails.ProtoReflect.Descriptor instead.
func (*MediaEntry_ProgressiveJpegDetails) Descriptor() ([]byte, []int) {
return file_waMediaEntryData_WAMediaEntryData_proto_rawDescGZIP(), []int{0, 0}
}
func (x *MediaEntry_ProgressiveJpegDetails) GetScanLengths() []int64 {
if x != nil {
return x.ScanLengths
}
return nil
}
func (x *MediaEntry_ProgressiveJpegDetails) GetSidecar() []byte {
if x != nil {
return x.Sidecar
}
return nil
}
type MediaEntry_DownloadableThumbnail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FileSHA256 []byte `protobuf:"bytes,1,opt,name=fileSHA256,proto3" json:"fileSHA256,omitempty"`
FileEncSHA256 []byte `protobuf:"bytes,2,opt,name=fileEncSHA256,proto3" json:"fileEncSHA256,omitempty"`
DirectPath string `protobuf:"bytes,3,opt,name=directPath,proto3" json:"directPath,omitempty"`
MediaKey []byte `protobuf:"bytes,4,opt,name=mediaKey,proto3" json:"mediaKey,omitempty"`
MediaKeyTimestamp int64 `protobuf:"varint,5,opt,name=mediaKeyTimestamp,proto3" json:"mediaKeyTimestamp,omitempty"`
ObjectID string `protobuf:"bytes,6,opt,name=objectID,proto3" json:"objectID,omitempty"`
}
func (x *MediaEntry_DownloadableThumbnail) Reset() {
*x = MediaEntry_DownloadableThumbnail{}
if protoimpl.UnsafeEnabled {
mi := &file_waMediaEntryData_WAMediaEntryData_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaEntry_DownloadableThumbnail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaEntry_DownloadableThumbnail) ProtoMessage() {}
func (x *MediaEntry_DownloadableThumbnail) ProtoReflect() protoreflect.Message {
mi := &file_waMediaEntryData_WAMediaEntryData_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 MediaEntry_DownloadableThumbnail.ProtoReflect.Descriptor instead.
func (*MediaEntry_DownloadableThumbnail) Descriptor() ([]byte, []int) {
return file_waMediaEntryData_WAMediaEntryData_proto_rawDescGZIP(), []int{0, 1}
}
func (x *MediaEntry_DownloadableThumbnail) GetFileSHA256() []byte {
if x != nil {
return x.FileSHA256
}
return nil
}
func (x *MediaEntry_DownloadableThumbnail) GetFileEncSHA256() []byte {
if x != nil {
return x.FileEncSHA256
}
return nil
}
func (x *MediaEntry_DownloadableThumbnail) GetDirectPath() string {
if x != nil {
return x.DirectPath
}
return ""
}
func (x *MediaEntry_DownloadableThumbnail) GetMediaKey() []byte {
if x != nil {
return x.MediaKey
}
return nil
}
func (x *MediaEntry_DownloadableThumbnail) GetMediaKeyTimestamp() int64 {
if x != nil {
return x.MediaKeyTimestamp
}
return 0
}
func (x *MediaEntry_DownloadableThumbnail) GetObjectID() string {
if x != nil {
return x.ObjectID
}
return ""
}
var File_waMediaEntryData_WAMediaEntryData_proto protoreflect.FileDescriptor
//go:embed WAMediaEntryData.pb.raw
var file_waMediaEntryData_WAMediaEntryData_proto_rawDesc []byte
var (
file_waMediaEntryData_WAMediaEntryData_proto_rawDescOnce sync.Once
file_waMediaEntryData_WAMediaEntryData_proto_rawDescData = file_waMediaEntryData_WAMediaEntryData_proto_rawDesc
)
func file_waMediaEntryData_WAMediaEntryData_proto_rawDescGZIP() []byte {
file_waMediaEntryData_WAMediaEntryData_proto_rawDescOnce.Do(func() {
file_waMediaEntryData_WAMediaEntryData_proto_rawDescData = protoimpl.X.CompressGZIP(file_waMediaEntryData_WAMediaEntryData_proto_rawDescData)
})
return file_waMediaEntryData_WAMediaEntryData_proto_rawDescData
}
var file_waMediaEntryData_WAMediaEntryData_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_waMediaEntryData_WAMediaEntryData_proto_goTypes = []interface{}{
(*MediaEntry)(nil), // 0: WAMediaEntryData.MediaEntry
(*MediaEntry_ProgressiveJpegDetails)(nil), // 1: WAMediaEntryData.MediaEntry.ProgressiveJpegDetails
(*MediaEntry_DownloadableThumbnail)(nil), // 2: WAMediaEntryData.MediaEntry.DownloadableThumbnail
}
var file_waMediaEntryData_WAMediaEntryData_proto_depIdxs = []int32{
2, // 0: WAMediaEntryData.MediaEntry.downloadableThumbnail:type_name -> WAMediaEntryData.MediaEntry.DownloadableThumbnail
1, // 1: WAMediaEntryData.MediaEntry.progressiveJPEGDetails:type_name -> WAMediaEntryData.MediaEntry.ProgressiveJpegDetails
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_waMediaEntryData_WAMediaEntryData_proto_init() }
func file_waMediaEntryData_WAMediaEntryData_proto_init() {
if File_waMediaEntryData_WAMediaEntryData_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waMediaEntryData_WAMediaEntryData_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMediaEntryData_WAMediaEntryData_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaEntry_ProgressiveJpegDetails); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMediaEntryData_WAMediaEntryData_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaEntry_DownloadableThumbnail); 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_waMediaEntryData_WAMediaEntryData_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waMediaEntryData_WAMediaEntryData_proto_goTypes,
DependencyIndexes: file_waMediaEntryData_WAMediaEntryData_proto_depIdxs,
MessageInfos: file_waMediaEntryData_WAMediaEntryData_proto_msgTypes,
}.Build()
File_waMediaEntryData_WAMediaEntryData_proto = out.File
file_waMediaEntryData_WAMediaEntryData_proto_rawDesc = nil
file_waMediaEntryData_WAMediaEntryData_proto_goTypes = nil
file_waMediaEntryData_WAMediaEntryData_proto_depIdxs = nil
}

View File

@ -0,0 +1,38 @@
'waMediaEntryData/WAMediaEntryData.protoWAMediaEntryData"É
MediaEntry
fileSHA256 ( R
fileSHA256
mediaKey ( RmediaKey$
fileEncSHA256 ( R fileEncSHA256
directPath ( R
directPath,
mediaKeyTimestamp (RmediaKeyTimestamp(
serverMediaType ( RserverMediaType
uploadToken ( R uploadToken.
validatedTimestamp ( RvalidatedTimestamp
sidecar ( Rsidecar
objectID
( RobjectID
FBID ( RFBIDh
downloadableThumbnail ( 22.WAMediaEntryData.MediaEntry.DownloadableThumbnailRdownloadableThumbnail
handle ( Rhandle
filename ( Rfilenamek
progressiveJPEGDetails ( 23.WAMediaEntryData.MediaEntry.ProgressiveJpegDetailsRprogressiveJPEGDetailsT
ProgressiveJpegDetails
scanLengths (R scanLengths
sidecar ( Rsidecarã
DownloadableThumbnail
fileSHA256 ( R
fileSHA256$
fileEncSHA256 ( R fileEncSHA256
directPath ( R
directPath
mediaKey ( RmediaKey,
mediaKeyTimestamp (RmediaKeyTimestamp
objectID ( RobjectIDB7Z5go.mau.fi/whatsmeow/binary/armadillo/waMediaEntryDatabproto3

View File

@ -0,0 +1,35 @@
syntax = "proto3";
package WAMediaEntryData;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waMediaEntryData";
message MediaEntry {
message ProgressiveJpegDetails {
repeated int64 scanLengths = 1;
bytes sidecar = 2;
}
message DownloadableThumbnail {
bytes fileSHA256 = 1;
bytes fileEncSHA256 = 2;
string directPath = 3;
bytes mediaKey = 4;
int64 mediaKeyTimestamp = 5;
string objectID = 6;
}
bytes fileSHA256 = 1;
bytes mediaKey = 2;
bytes fileEncSHA256 = 3;
string directPath = 4;
int64 mediaKeyTimestamp = 5;
string serverMediaType = 6;
bytes uploadToken = 7;
bytes validatedTimestamp = 8;
bytes sidecar = 9;
string objectID = 10;
string FBID = 11;
DownloadableThumbnail downloadableThumbnail = 12;
string handle = 13;
string filename = 14;
ProgressiveJpegDetails progressiveJPEGDetails = 15;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,154 @@
syntax = "proto3";
package WAMediaTransport;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waMediaTransport";
import "waCommon/WACommon.proto";
message WAMediaTransport {
message Ancillary {
message Thumbnail {
message DownloadableThumbnail {
bytes fileSHA256 = 1;
bytes fileEncSHA256 = 2;
string directPath = 3;
bytes mediaKey = 4;
int64 mediaKeyTimestamp = 5;
string objectID = 6;
}
bytes JPEGThumbnail = 1;
DownloadableThumbnail downloadableThumbnail = 2;
uint32 thumbnailWidth = 3;
uint32 thumbnailHeight = 4;
}
uint64 fileLength = 1;
string mimetype = 2;
Thumbnail thumbnail = 3;
string objectID = 4;
}
message Integral {
bytes fileSHA256 = 1;
bytes mediaKey = 2;
bytes fileEncSHA256 = 3;
string directPath = 4;
int64 mediaKeyTimestamp = 5;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
message ImageTransport {
message Ancillary {
enum HdType {
NONE = 0;
LQ_4K = 1;
HQ_4K = 2;
}
uint32 height = 1;
uint32 width = 2;
bytes scansSidecar = 3;
repeated uint32 scanLengths = 4;
bytes midQualityFileSHA256 = 5;
HdType hdType = 6;
}
message Integral {
WAMediaTransport transport = 1;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
message VideoTransport {
message Ancillary {
enum Attribution {
NONE = 0;
GIPHY = 1;
TENOR = 2;
}
uint32 seconds = 1;
WACommon.MessageText caption = 2;
bool gifPlayback = 3;
uint32 height = 4;
uint32 width = 5;
bytes sidecar = 6;
Attribution gifAttribution = 7;
}
message Integral {
WAMediaTransport transport = 1;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
message AudioTransport {
message Ancillary {
uint32 seconds = 1;
}
message Integral {
WAMediaTransport transport = 1;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
message DocumentTransport {
message Ancillary {
uint32 pageCount = 1;
}
message Integral {
WAMediaTransport transport = 1;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
message StickerTransport {
message Ancillary {
uint32 pageCount = 1;
uint32 height = 2;
uint32 width = 3;
uint32 firstFrameLength = 4;
bytes firstFrameSidecar = 5;
string mustacheText = 6;
bool isThirdParty = 7;
string receiverFetchID = 8;
}
message Integral {
WAMediaTransport transport = 1;
bool isAnimated = 2;
string receiverFetchID = 3;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
message ContactTransport {
message Ancillary {
string displayName = 1;
}
message Integral {
oneof contact {
string vcard = 1;
WAMediaTransport downloadableVcard = 2;
}
}
Integral integral = 1;
Ancillary ancillary = 2;
}

View File

@ -0,0 +1,271 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: waMmsRetry/WAMmsRetry.proto
package waMmsRetry
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "embed"
)
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 MediaRetryNotification_ResultType int32
const (
MediaRetryNotification_GENERAL_ERROR MediaRetryNotification_ResultType = 0
MediaRetryNotification_SUCCESS MediaRetryNotification_ResultType = 1
MediaRetryNotification_NOT_FOUND MediaRetryNotification_ResultType = 2
MediaRetryNotification_DECRYPTION_ERROR MediaRetryNotification_ResultType = 3
)
// Enum value maps for MediaRetryNotification_ResultType.
var (
MediaRetryNotification_ResultType_name = map[int32]string{
0: "GENERAL_ERROR",
1: "SUCCESS",
2: "NOT_FOUND",
3: "DECRYPTION_ERROR",
}
MediaRetryNotification_ResultType_value = map[string]int32{
"GENERAL_ERROR": 0,
"SUCCESS": 1,
"NOT_FOUND": 2,
"DECRYPTION_ERROR": 3,
}
)
func (x MediaRetryNotification_ResultType) Enum() *MediaRetryNotification_ResultType {
p := new(MediaRetryNotification_ResultType)
*p = x
return p
}
func (x MediaRetryNotification_ResultType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MediaRetryNotification_ResultType) Descriptor() protoreflect.EnumDescriptor {
return file_waMmsRetry_WAMmsRetry_proto_enumTypes[0].Descriptor()
}
func (MediaRetryNotification_ResultType) Type() protoreflect.EnumType {
return &file_waMmsRetry_WAMmsRetry_proto_enumTypes[0]
}
func (x MediaRetryNotification_ResultType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MediaRetryNotification_ResultType.Descriptor instead.
func (MediaRetryNotification_ResultType) EnumDescriptor() ([]byte, []int) {
return file_waMmsRetry_WAMmsRetry_proto_rawDescGZIP(), []int{0, 0}
}
type MediaRetryNotification struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
StanzaID string `protobuf:"bytes,1,opt,name=stanzaID,proto3" json:"stanzaID,omitempty"`
DirectPath string `protobuf:"bytes,2,opt,name=directPath,proto3" json:"directPath,omitempty"`
Result MediaRetryNotification_ResultType `protobuf:"varint,3,opt,name=result,proto3,enum=WAMmsRetry.MediaRetryNotification_ResultType" json:"result,omitempty"`
}
func (x *MediaRetryNotification) Reset() {
*x = MediaRetryNotification{}
if protoimpl.UnsafeEnabled {
mi := &file_waMmsRetry_WAMmsRetry_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaRetryNotification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaRetryNotification) ProtoMessage() {}
func (x *MediaRetryNotification) ProtoReflect() protoreflect.Message {
mi := &file_waMmsRetry_WAMmsRetry_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 MediaRetryNotification.ProtoReflect.Descriptor instead.
func (*MediaRetryNotification) Descriptor() ([]byte, []int) {
return file_waMmsRetry_WAMmsRetry_proto_rawDescGZIP(), []int{0}
}
func (x *MediaRetryNotification) GetStanzaID() string {
if x != nil {
return x.StanzaID
}
return ""
}
func (x *MediaRetryNotification) GetDirectPath() string {
if x != nil {
return x.DirectPath
}
return ""
}
func (x *MediaRetryNotification) GetResult() MediaRetryNotification_ResultType {
if x != nil {
return x.Result
}
return MediaRetryNotification_GENERAL_ERROR
}
type ServerErrorReceipt struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
StanzaID string `protobuf:"bytes,1,opt,name=stanzaID,proto3" json:"stanzaID,omitempty"`
}
func (x *ServerErrorReceipt) Reset() {
*x = ServerErrorReceipt{}
if protoimpl.UnsafeEnabled {
mi := &file_waMmsRetry_WAMmsRetry_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServerErrorReceipt) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerErrorReceipt) ProtoMessage() {}
func (x *ServerErrorReceipt) ProtoReflect() protoreflect.Message {
mi := &file_waMmsRetry_WAMmsRetry_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 ServerErrorReceipt.ProtoReflect.Descriptor instead.
func (*ServerErrorReceipt) Descriptor() ([]byte, []int) {
return file_waMmsRetry_WAMmsRetry_proto_rawDescGZIP(), []int{1}
}
func (x *ServerErrorReceipt) GetStanzaID() string {
if x != nil {
return x.StanzaID
}
return ""
}
var File_waMmsRetry_WAMmsRetry_proto protoreflect.FileDescriptor
//go:embed WAMmsRetry.pb.raw
var file_waMmsRetry_WAMmsRetry_proto_rawDesc []byte
var (
file_waMmsRetry_WAMmsRetry_proto_rawDescOnce sync.Once
file_waMmsRetry_WAMmsRetry_proto_rawDescData = file_waMmsRetry_WAMmsRetry_proto_rawDesc
)
func file_waMmsRetry_WAMmsRetry_proto_rawDescGZIP() []byte {
file_waMmsRetry_WAMmsRetry_proto_rawDescOnce.Do(func() {
file_waMmsRetry_WAMmsRetry_proto_rawDescData = protoimpl.X.CompressGZIP(file_waMmsRetry_WAMmsRetry_proto_rawDescData)
})
return file_waMmsRetry_WAMmsRetry_proto_rawDescData
}
var file_waMmsRetry_WAMmsRetry_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_waMmsRetry_WAMmsRetry_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_waMmsRetry_WAMmsRetry_proto_goTypes = []interface{}{
(MediaRetryNotification_ResultType)(0), // 0: WAMmsRetry.MediaRetryNotification.ResultType
(*MediaRetryNotification)(nil), // 1: WAMmsRetry.MediaRetryNotification
(*ServerErrorReceipt)(nil), // 2: WAMmsRetry.ServerErrorReceipt
}
var file_waMmsRetry_WAMmsRetry_proto_depIdxs = []int32{
0, // 0: WAMmsRetry.MediaRetryNotification.result:type_name -> WAMmsRetry.MediaRetryNotification.ResultType
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_waMmsRetry_WAMmsRetry_proto_init() }
func file_waMmsRetry_WAMmsRetry_proto_init() {
if File_waMmsRetry_WAMmsRetry_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waMmsRetry_WAMmsRetry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaRetryNotification); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMmsRetry_WAMmsRetry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServerErrorReceipt); 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_waMmsRetry_WAMmsRetry_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waMmsRetry_WAMmsRetry_proto_goTypes,
DependencyIndexes: file_waMmsRetry_WAMmsRetry_proto_depIdxs,
EnumInfos: file_waMmsRetry_WAMmsRetry_proto_enumTypes,
MessageInfos: file_waMmsRetry_WAMmsRetry_proto_msgTypes,
}.Build()
File_waMmsRetry_WAMmsRetry_proto = out.File
file_waMmsRetry_WAMmsRetry_proto_rawDesc = nil
file_waMmsRetry_WAMmsRetry_proto_goTypes = nil
file_waMmsRetry_WAMmsRetry_proto_depIdxs = nil
}

View File

@ -0,0 +1,20 @@
syntax = "proto3";
package WAMmsRetry;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waMmsRetry";
message MediaRetryNotification {
enum ResultType {
GENERAL_ERROR = 0;
SUCCESS = 1;
NOT_FOUND = 2;
DECRYPTION_ERROR = 3;
}
string stanzaID = 1;
string directPath = 2;
ResultType result = 3;
}
message ServerErrorReceipt {
string stanzaID = 1;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,87 @@
syntax = "proto3";
package WAMsgApplication;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waMsgApplication";
import "waCommon/WACommon.proto";
message MessageApplication {
message Metadata {
enum ThreadType {
DEFAULT = 0;
VANISH_MODE = 1;
DISAPPEARING_MESSAGES = 2;
}
message QuotedMessage {
string stanzaID = 1;
string remoteJID = 2;
string participant = 3;
Payload payload = 4;
}
message EphemeralSettingMap {
string chatJID = 1;
EphemeralSetting ephemeralSetting = 2;
}
oneof ephemeral {
EphemeralSetting chatEphemeralSetting = 1;
EphemeralSettingMap ephemeralSettingList = 2;
bytes ephemeralSharedSecret = 3;
}
uint32 forwardingScore = 5;
bool isForwarded = 6;
WACommon.SubProtocol businessMetadata = 7;
bytes frankingKey = 8;
int32 frankingVersion = 9;
QuotedMessage quotedMessage = 10;
ThreadType threadType = 11;
string readonlyMetadataDataclass = 12;
string groupID = 13;
uint32 groupSize = 14;
uint32 groupIndex = 15;
string botResponseID = 16;
string collapsibleID = 17;
}
message Payload {
oneof content {
Content coreContent = 1;
Signal signal = 2;
ApplicationData applicationData = 3;
SubProtocolPayload subProtocol = 4;
}
}
message SubProtocolPayload {
oneof subProtocol {
WACommon.SubProtocol consumerMessage = 2;
WACommon.SubProtocol businessMessage = 3;
WACommon.SubProtocol paymentMessage = 4;
WACommon.SubProtocol multiDevice = 5;
WACommon.SubProtocol voip = 6;
WACommon.SubProtocol armadillo = 7;
}
WACommon.FutureProofBehavior futureProof = 1;
}
message ApplicationData {
}
message Signal {
}
message Content {
}
message EphemeralSetting {
uint32 ephemeralExpiration = 2;
int64 ephemeralSettingTimestamp = 3;
bool isEphemeralSettingReset = 4;
}
Payload payload = 1;
Metadata metadata = 2;
}

View File

@ -0,0 +1,41 @@
package waMsgApplication
import (
"go.mau.fi/whatsmeow/binary/armadillo/armadilloutil"
"go.mau.fi/whatsmeow/binary/armadillo/waArmadilloApplication"
"go.mau.fi/whatsmeow/binary/armadillo/waConsumerApplication"
"go.mau.fi/whatsmeow/binary/armadillo/waMultiDevice"
)
const (
ConsumerApplicationVersion = 1
ArmadilloApplicationVersion = 1
MultiDeviceApplicationVersion = 1 // TODO: check
)
func (msg *MessageApplication_SubProtocolPayload_ConsumerMessage) Decode() (*waConsumerApplication.ConsumerApplication, error) {
return armadilloutil.Unmarshal(&waConsumerApplication.ConsumerApplication{}, msg.ConsumerMessage, ConsumerApplicationVersion)
}
func (msg *MessageApplication_SubProtocolPayload_ConsumerMessage) Set(payload *waConsumerApplication.ConsumerApplication) (err error) {
msg.ConsumerMessage, err = armadilloutil.Marshal(payload, ConsumerApplicationVersion)
return
}
func (msg *MessageApplication_SubProtocolPayload_Armadillo) Decode() (*waArmadilloApplication.Armadillo, error) {
return armadilloutil.Unmarshal(&waArmadilloApplication.Armadillo{}, msg.Armadillo, ArmadilloApplicationVersion)
}
func (msg *MessageApplication_SubProtocolPayload_Armadillo) Set(payload *waArmadilloApplication.Armadillo) (err error) {
msg.Armadillo, err = armadilloutil.Marshal(payload, ArmadilloApplicationVersion)
return
}
func (msg *MessageApplication_SubProtocolPayload_MultiDevice) Decode() (*waMultiDevice.MultiDevice, error) {
return armadilloutil.Unmarshal(&waMultiDevice.MultiDevice{}, msg.MultiDevice, MultiDeviceApplicationVersion)
}
func (msg *MessageApplication_SubProtocolPayload_MultiDevice) Set(payload *waMultiDevice.MultiDevice) (err error) {
msg.MultiDevice, err = armadilloutil.Marshal(payload, MultiDeviceApplicationVersion)
return
}

View File

@ -0,0 +1,964 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: waMsgTransport/WAMsgTransport.proto
package waMsgTransport
import (
reflect "reflect"
sync "sync"
waCommon "go.mau.fi/whatsmeow/binary/armadillo/waCommon"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "embed"
)
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 MessageTransport_Protocol_Ancillary_BackupDirective_ActionType int32
const (
MessageTransport_Protocol_Ancillary_BackupDirective_NOOP MessageTransport_Protocol_Ancillary_BackupDirective_ActionType = 0
MessageTransport_Protocol_Ancillary_BackupDirective_UPSERT MessageTransport_Protocol_Ancillary_BackupDirective_ActionType = 1
MessageTransport_Protocol_Ancillary_BackupDirective_DELETE MessageTransport_Protocol_Ancillary_BackupDirective_ActionType = 2
MessageTransport_Protocol_Ancillary_BackupDirective_UPSERT_AND_DELETE MessageTransport_Protocol_Ancillary_BackupDirective_ActionType = 3
)
// Enum value maps for MessageTransport_Protocol_Ancillary_BackupDirective_ActionType.
var (
MessageTransport_Protocol_Ancillary_BackupDirective_ActionType_name = map[int32]string{
0: "NOOP",
1: "UPSERT",
2: "DELETE",
3: "UPSERT_AND_DELETE",
}
MessageTransport_Protocol_Ancillary_BackupDirective_ActionType_value = map[string]int32{
"NOOP": 0,
"UPSERT": 1,
"DELETE": 2,
"UPSERT_AND_DELETE": 3,
}
)
func (x MessageTransport_Protocol_Ancillary_BackupDirective_ActionType) Enum() *MessageTransport_Protocol_Ancillary_BackupDirective_ActionType {
p := new(MessageTransport_Protocol_Ancillary_BackupDirective_ActionType)
*p = x
return p
}
func (x MessageTransport_Protocol_Ancillary_BackupDirective_ActionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MessageTransport_Protocol_Ancillary_BackupDirective_ActionType) Descriptor() protoreflect.EnumDescriptor {
return file_waMsgTransport_WAMsgTransport_proto_enumTypes[0].Descriptor()
}
func (MessageTransport_Protocol_Ancillary_BackupDirective_ActionType) Type() protoreflect.EnumType {
return &file_waMsgTransport_WAMsgTransport_proto_enumTypes[0]
}
func (x MessageTransport_Protocol_Ancillary_BackupDirective_ActionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MessageTransport_Protocol_Ancillary_BackupDirective_ActionType.Descriptor instead.
func (MessageTransport_Protocol_Ancillary_BackupDirective_ActionType) EnumDescriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 0, 0, 0}
}
type MessageTransport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Payload *MessageTransport_Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
Protocol *MessageTransport_Protocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
}
func (x *MessageTransport) Reset() {
*x = MessageTransport{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport) ProtoMessage() {}
func (x *MessageTransport) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport.ProtoReflect.Descriptor instead.
func (*MessageTransport) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0}
}
func (x *MessageTransport) GetPayload() *MessageTransport_Payload {
if x != nil {
return x.Payload
}
return nil
}
func (x *MessageTransport) GetProtocol() *MessageTransport_Protocol {
if x != nil {
return x.Protocol
}
return nil
}
type DeviceListMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SenderKeyHash []byte `protobuf:"bytes,1,opt,name=senderKeyHash,proto3" json:"senderKeyHash,omitempty"`
SenderTimestamp uint64 `protobuf:"varint,2,opt,name=senderTimestamp,proto3" json:"senderTimestamp,omitempty"`
RecipientKeyHash []byte `protobuf:"bytes,8,opt,name=recipientKeyHash,proto3" json:"recipientKeyHash,omitempty"`
RecipientTimestamp uint64 `protobuf:"varint,9,opt,name=recipientTimestamp,proto3" json:"recipientTimestamp,omitempty"`
}
func (x *DeviceListMetadata) Reset() {
*x = DeviceListMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeviceListMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceListMetadata) ProtoMessage() {}
func (x *DeviceListMetadata) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 DeviceListMetadata.ProtoReflect.Descriptor instead.
func (*DeviceListMetadata) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{1}
}
func (x *DeviceListMetadata) GetSenderKeyHash() []byte {
if x != nil {
return x.SenderKeyHash
}
return nil
}
func (x *DeviceListMetadata) GetSenderTimestamp() uint64 {
if x != nil {
return x.SenderTimestamp
}
return 0
}
func (x *DeviceListMetadata) GetRecipientKeyHash() []byte {
if x != nil {
return x.RecipientKeyHash
}
return nil
}
func (x *DeviceListMetadata) GetRecipientTimestamp() uint64 {
if x != nil {
return x.RecipientTimestamp
}
return 0
}
type MessageTransport_Payload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ApplicationPayload *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=applicationPayload,proto3" json:"applicationPayload,omitempty"`
FutureProof waCommon.FutureProofBehavior `protobuf:"varint,3,opt,name=futureProof,proto3,enum=WACommon.FutureProofBehavior" json:"futureProof,omitempty"`
}
func (x *MessageTransport_Payload) Reset() {
*x = MessageTransport_Payload{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Payload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Payload) ProtoMessage() {}
func (x *MessageTransport_Payload) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Payload.ProtoReflect.Descriptor instead.
func (*MessageTransport_Payload) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 0}
}
func (x *MessageTransport_Payload) GetApplicationPayload() *waCommon.SubProtocol {
if x != nil {
return x.ApplicationPayload
}
return nil
}
func (x *MessageTransport_Payload) GetFutureProof() waCommon.FutureProofBehavior {
if x != nil {
return x.FutureProof
}
return waCommon.FutureProofBehavior(0)
}
type MessageTransport_Protocol struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Integral *MessageTransport_Protocol_Integral `protobuf:"bytes,1,opt,name=integral,proto3" json:"integral,omitempty"`
Ancillary *MessageTransport_Protocol_Ancillary `protobuf:"bytes,2,opt,name=ancillary,proto3" json:"ancillary,omitempty"`
}
func (x *MessageTransport_Protocol) Reset() {
*x = MessageTransport_Protocol{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol) ProtoMessage() {}
func (x *MessageTransport_Protocol) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1}
}
func (x *MessageTransport_Protocol) GetIntegral() *MessageTransport_Protocol_Integral {
if x != nil {
return x.Integral
}
return nil
}
func (x *MessageTransport_Protocol) GetAncillary() *MessageTransport_Protocol_Ancillary {
if x != nil {
return x.Ancillary
}
return nil
}
type MessageTransport_Protocol_Ancillary struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Skdm *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage `protobuf:"bytes,2,opt,name=skdm,proto3" json:"skdm,omitempty"`
DeviceListMetadata *DeviceListMetadata `protobuf:"bytes,3,opt,name=deviceListMetadata,proto3" json:"deviceListMetadata,omitempty"`
Icdc *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices `protobuf:"bytes,4,opt,name=icdc,proto3" json:"icdc,omitempty"`
BackupDirective *MessageTransport_Protocol_Ancillary_BackupDirective `protobuf:"bytes,5,opt,name=backupDirective,proto3" json:"backupDirective,omitempty"`
}
func (x *MessageTransport_Protocol_Ancillary) Reset() {
*x = MessageTransport_Protocol_Ancillary{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Ancillary) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Ancillary) ProtoMessage() {}
func (x *MessageTransport_Protocol_Ancillary) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol_Ancillary.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Ancillary) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 0}
}
func (x *MessageTransport_Protocol_Ancillary) GetSkdm() *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage {
if x != nil {
return x.Skdm
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary) GetDeviceListMetadata() *DeviceListMetadata {
if x != nil {
return x.DeviceListMetadata
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary) GetIcdc() *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices {
if x != nil {
return x.Icdc
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary) GetBackupDirective() *MessageTransport_Protocol_Ancillary_BackupDirective {
if x != nil {
return x.BackupDirective
}
return nil
}
type MessageTransport_Protocol_Integral struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Padding []byte `protobuf:"bytes,1,opt,name=padding,proto3" json:"padding,omitempty"`
DSM *MessageTransport_Protocol_Integral_DeviceSentMessage `protobuf:"bytes,2,opt,name=DSM,proto3" json:"DSM,omitempty"`
}
func (x *MessageTransport_Protocol_Integral) Reset() {
*x = MessageTransport_Protocol_Integral{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Integral) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Integral) ProtoMessage() {}
func (x *MessageTransport_Protocol_Integral) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol_Integral.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Integral) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 1}
}
func (x *MessageTransport_Protocol_Integral) GetPadding() []byte {
if x != nil {
return x.Padding
}
return nil
}
func (x *MessageTransport_Protocol_Integral) GetDSM() *MessageTransport_Protocol_Integral_DeviceSentMessage {
if x != nil {
return x.DSM
}
return nil
}
type MessageTransport_Protocol_Ancillary_BackupDirective struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MessageID string `protobuf:"bytes,1,opt,name=messageID,proto3" json:"messageID,omitempty"`
ActionType MessageTransport_Protocol_Ancillary_BackupDirective_ActionType `protobuf:"varint,2,opt,name=actionType,proto3,enum=WAMsgTransport.MessageTransport_Protocol_Ancillary_BackupDirective_ActionType" json:"actionType,omitempty"`
SupplementalKey string `protobuf:"bytes,3,opt,name=supplementalKey,proto3" json:"supplementalKey,omitempty"`
}
func (x *MessageTransport_Protocol_Ancillary_BackupDirective) Reset() {
*x = MessageTransport_Protocol_Ancillary_BackupDirective{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Ancillary_BackupDirective) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Ancillary_BackupDirective) ProtoMessage() {}
func (x *MessageTransport_Protocol_Ancillary_BackupDirective) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol_Ancillary_BackupDirective.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Ancillary_BackupDirective) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 0, 0}
}
func (x *MessageTransport_Protocol_Ancillary_BackupDirective) GetMessageID() string {
if x != nil {
return x.MessageID
}
return ""
}
func (x *MessageTransport_Protocol_Ancillary_BackupDirective) GetActionType() MessageTransport_Protocol_Ancillary_BackupDirective_ActionType {
if x != nil {
return x.ActionType
}
return MessageTransport_Protocol_Ancillary_BackupDirective_NOOP
}
func (x *MessageTransport_Protocol_Ancillary_BackupDirective) GetSupplementalKey() string {
if x != nil {
return x.SupplementalKey
}
return ""
}
type MessageTransport_Protocol_Ancillary_ICDCParticipantDevices struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SenderIdentity *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription `protobuf:"bytes,1,opt,name=senderIdentity,proto3" json:"senderIdentity,omitempty"`
RecipientIdentities []*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription `protobuf:"bytes,2,rep,name=recipientIdentities,proto3" json:"recipientIdentities,omitempty"`
RecipientUserJIDs []string `protobuf:"bytes,3,rep,name=recipientUserJIDs,proto3" json:"recipientUserJIDs,omitempty"`
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) Reset() {
*x = MessageTransport_Protocol_Ancillary_ICDCParticipantDevices{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) ProtoMessage() {}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol_Ancillary_ICDCParticipantDevices.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 0, 1}
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) GetSenderIdentity() *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription {
if x != nil {
return x.SenderIdentity
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) GetRecipientIdentities() []*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription {
if x != nil {
return x.RecipientIdentities
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices) GetRecipientUserJIDs() []string {
if x != nil {
return x.RecipientUserJIDs
}
return nil
}
type MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID,omitempty"`
AxolotlSenderKeyDistributionMessage []byte `protobuf:"bytes,2,opt,name=axolotlSenderKeyDistributionMessage,proto3" json:"axolotlSenderKeyDistributionMessage,omitempty"`
}
func (x *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) Reset() {
*x = MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) ProtoMessage() {}
func (x *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 0, 2}
}
func (x *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) GetGroupID() string {
if x != nil {
return x.GroupID
}
return ""
}
func (x *MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage) GetAxolotlSenderKeyDistributionMessage() []byte {
if x != nil {
return x.AxolotlSenderKeyDistributionMessage
}
return nil
}
type MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Seq int32 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
SigningDevice []byte `protobuf:"bytes,2,opt,name=signingDevice,proto3" json:"signingDevice,omitempty"`
UnknownDevices [][]byte `protobuf:"bytes,3,rep,name=unknownDevices,proto3" json:"unknownDevices,omitempty"`
UnknownDeviceIDs []int32 `protobuf:"varint,4,rep,packed,name=unknownDeviceIDs,proto3" json:"unknownDeviceIDs,omitempty"`
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) Reset() {
*x = MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) ProtoMessage() {
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_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 MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 0, 1, 0}
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) GetSeq() int32 {
if x != nil {
return x.Seq
}
return 0
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) GetSigningDevice() []byte {
if x != nil {
return x.SigningDevice
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) GetUnknownDevices() [][]byte {
if x != nil {
return x.UnknownDevices
}
return nil
}
func (x *MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription) GetUnknownDeviceIDs() []int32 {
if x != nil {
return x.UnknownDeviceIDs
}
return nil
}
type MessageTransport_Protocol_Integral_DeviceSentMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DestinationJID string `protobuf:"bytes,1,opt,name=destinationJID,proto3" json:"destinationJID,omitempty"`
Phash string `protobuf:"bytes,2,opt,name=phash,proto3" json:"phash,omitempty"`
}
func (x *MessageTransport_Protocol_Integral_DeviceSentMessage) Reset() {
*x = MessageTransport_Protocol_Integral_DeviceSentMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageTransport_Protocol_Integral_DeviceSentMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageTransport_Protocol_Integral_DeviceSentMessage) ProtoMessage() {}
func (x *MessageTransport_Protocol_Integral_DeviceSentMessage) ProtoReflect() protoreflect.Message {
mi := &file_waMsgTransport_WAMsgTransport_proto_msgTypes[10]
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 MessageTransport_Protocol_Integral_DeviceSentMessage.ProtoReflect.Descriptor instead.
func (*MessageTransport_Protocol_Integral_DeviceSentMessage) Descriptor() ([]byte, []int) {
return file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP(), []int{0, 1, 1, 0}
}
func (x *MessageTransport_Protocol_Integral_DeviceSentMessage) GetDestinationJID() string {
if x != nil {
return x.DestinationJID
}
return ""
}
func (x *MessageTransport_Protocol_Integral_DeviceSentMessage) GetPhash() string {
if x != nil {
return x.Phash
}
return ""
}
var File_waMsgTransport_WAMsgTransport_proto protoreflect.FileDescriptor
//go:embed WAMsgTransport.pb.raw
var file_waMsgTransport_WAMsgTransport_proto_rawDesc []byte
var (
file_waMsgTransport_WAMsgTransport_proto_rawDescOnce sync.Once
file_waMsgTransport_WAMsgTransport_proto_rawDescData = file_waMsgTransport_WAMsgTransport_proto_rawDesc
)
func file_waMsgTransport_WAMsgTransport_proto_rawDescGZIP() []byte {
file_waMsgTransport_WAMsgTransport_proto_rawDescOnce.Do(func() {
file_waMsgTransport_WAMsgTransport_proto_rawDescData = protoimpl.X.CompressGZIP(file_waMsgTransport_WAMsgTransport_proto_rawDescData)
})
return file_waMsgTransport_WAMsgTransport_proto_rawDescData
}
var file_waMsgTransport_WAMsgTransport_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_waMsgTransport_WAMsgTransport_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_waMsgTransport_WAMsgTransport_proto_goTypes = []interface{}{
(MessageTransport_Protocol_Ancillary_BackupDirective_ActionType)(0), // 0: WAMsgTransport.MessageTransport.Protocol.Ancillary.BackupDirective.ActionType
(*MessageTransport)(nil), // 1: WAMsgTransport.MessageTransport
(*DeviceListMetadata)(nil), // 2: WAMsgTransport.DeviceListMetadata
(*MessageTransport_Payload)(nil), // 3: WAMsgTransport.MessageTransport.Payload
(*MessageTransport_Protocol)(nil), // 4: WAMsgTransport.MessageTransport.Protocol
(*MessageTransport_Protocol_Ancillary)(nil), // 5: WAMsgTransport.MessageTransport.Protocol.Ancillary
(*MessageTransport_Protocol_Integral)(nil), // 6: WAMsgTransport.MessageTransport.Protocol.Integral
(*MessageTransport_Protocol_Ancillary_BackupDirective)(nil), // 7: WAMsgTransport.MessageTransport.Protocol.Ancillary.BackupDirective
(*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices)(nil), // 8: WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices
(*MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage)(nil), // 9: WAMsgTransport.MessageTransport.Protocol.Ancillary.SenderKeyDistributionMessage
(*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription)(nil), // 10: WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices.ICDCIdentityListDescription
(*MessageTransport_Protocol_Integral_DeviceSentMessage)(nil), // 11: WAMsgTransport.MessageTransport.Protocol.Integral.DeviceSentMessage
(*waCommon.SubProtocol)(nil), // 12: WACommon.SubProtocol
(waCommon.FutureProofBehavior)(0), // 13: WACommon.FutureProofBehavior
}
var file_waMsgTransport_WAMsgTransport_proto_depIdxs = []int32{
3, // 0: WAMsgTransport.MessageTransport.payload:type_name -> WAMsgTransport.MessageTransport.Payload
4, // 1: WAMsgTransport.MessageTransport.protocol:type_name -> WAMsgTransport.MessageTransport.Protocol
12, // 2: WAMsgTransport.MessageTransport.Payload.applicationPayload:type_name -> WACommon.SubProtocol
13, // 3: WAMsgTransport.MessageTransport.Payload.futureProof:type_name -> WACommon.FutureProofBehavior
6, // 4: WAMsgTransport.MessageTransport.Protocol.integral:type_name -> WAMsgTransport.MessageTransport.Protocol.Integral
5, // 5: WAMsgTransport.MessageTransport.Protocol.ancillary:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary
9, // 6: WAMsgTransport.MessageTransport.Protocol.Ancillary.skdm:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary.SenderKeyDistributionMessage
2, // 7: WAMsgTransport.MessageTransport.Protocol.Ancillary.deviceListMetadata:type_name -> WAMsgTransport.DeviceListMetadata
8, // 8: WAMsgTransport.MessageTransport.Protocol.Ancillary.icdc:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices
7, // 9: WAMsgTransport.MessageTransport.Protocol.Ancillary.backupDirective:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary.BackupDirective
11, // 10: WAMsgTransport.MessageTransport.Protocol.Integral.DSM:type_name -> WAMsgTransport.MessageTransport.Protocol.Integral.DeviceSentMessage
0, // 11: WAMsgTransport.MessageTransport.Protocol.Ancillary.BackupDirective.actionType:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary.BackupDirective.ActionType
10, // 12: WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices.senderIdentity:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices.ICDCIdentityListDescription
10, // 13: WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices.recipientIdentities:type_name -> WAMsgTransport.MessageTransport.Protocol.Ancillary.ICDCParticipantDevices.ICDCIdentityListDescription
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_waMsgTransport_WAMsgTransport_proto_init() }
func file_waMsgTransport_WAMsgTransport_proto_init() {
if File_waMsgTransport_WAMsgTransport_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waMsgTransport_WAMsgTransport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeviceListMetadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Payload); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Ancillary); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Integral); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Ancillary_BackupDirective); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Ancillary_SenderKeyDistributionMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Ancillary_ICDCParticipantDevices_ICDCIdentityListDescription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMsgTransport_WAMsgTransport_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageTransport_Protocol_Integral_DeviceSentMessage); 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_waMsgTransport_WAMsgTransport_proto_rawDesc,
NumEnums: 1,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waMsgTransport_WAMsgTransport_proto_goTypes,
DependencyIndexes: file_waMsgTransport_WAMsgTransport_proto_depIdxs,
EnumInfos: file_waMsgTransport_WAMsgTransport_proto_enumTypes,
MessageInfos: file_waMsgTransport_WAMsgTransport_proto_msgTypes,
}.Build()
File_waMsgTransport_WAMsgTransport_proto = out.File
file_waMsgTransport_WAMsgTransport_proto_rawDesc = nil
file_waMsgTransport_WAMsgTransport_proto_goTypes = nil
file_waMsgTransport_WAMsgTransport_proto_depIdxs = nil
}

View File

@ -0,0 +1,75 @@
syntax = "proto3";
package WAMsgTransport;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waMsgTransport";
import "waCommon/WACommon.proto";
message MessageTransport {
message Payload {
WACommon.SubProtocol applicationPayload = 1;
WACommon.FutureProofBehavior futureProof = 3;
}
message Protocol {
message Ancillary {
message BackupDirective {
enum ActionType {
NOOP = 0;
UPSERT = 1;
DELETE = 2;
UPSERT_AND_DELETE = 3;
}
string messageID = 1;
ActionType actionType = 2;
string supplementalKey = 3;
}
message ICDCParticipantDevices {
message ICDCIdentityListDescription {
int32 seq = 1;
bytes signingDevice = 2;
repeated bytes unknownDevices = 3;
repeated int32 unknownDeviceIDs = 4;
}
ICDCIdentityListDescription senderIdentity = 1;
repeated ICDCIdentityListDescription recipientIdentities = 2;
repeated string recipientUserJIDs = 3;
}
message SenderKeyDistributionMessage {
string groupID = 1;
bytes axolotlSenderKeyDistributionMessage = 2;
}
SenderKeyDistributionMessage skdm = 2;
DeviceListMetadata deviceListMetadata = 3;
ICDCParticipantDevices icdc = 4;
BackupDirective backupDirective = 5;
}
message Integral {
message DeviceSentMessage {
string destinationJID = 1;
string phash = 2;
}
bytes padding = 1;
DeviceSentMessage DSM = 2;
}
Integral integral = 1;
Ancillary ancillary = 2;
}
Payload payload = 1;
Protocol protocol = 2;
}
message DeviceListMetadata {
bytes senderKeyHash = 1;
uint64 senderTimestamp = 2;
bytes recipientKeyHash = 8;
uint64 recipientTimestamp = 9;
}

View File

@ -0,0 +1,19 @@
package waMsgTransport
import (
"go.mau.fi/whatsmeow/binary/armadillo/armadilloutil"
"go.mau.fi/whatsmeow/binary/armadillo/waMsgApplication"
)
const (
MessageApplicationVersion = 2
)
func (msg *MessageTransport_Payload) Decode() (*waMsgApplication.MessageApplication, error) {
return armadilloutil.Unmarshal(&waMsgApplication.MessageApplication{}, msg.GetApplicationPayload(), MessageApplicationVersion)
}
func (msg *MessageTransport_Payload) Set(payload *waMsgApplication.MessageApplication) (err error) {
msg.ApplicationPayload, err = armadilloutil.Marshal(payload, MessageApplicationVersion)
return
}

View File

@ -0,0 +1,859 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: waMultiDevice/WAMultiDevice.proto
package waMultiDevice
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "embed"
)
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 MultiDevice struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Payload *MultiDevice_Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
Metadata *MultiDevice_Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *MultiDevice) Reset() {
*x = MultiDevice{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice) ProtoMessage() {}
func (x *MultiDevice) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice.ProtoReflect.Descriptor instead.
func (*MultiDevice) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0}
}
func (x *MultiDevice) GetPayload() *MultiDevice_Payload {
if x != nil {
return x.Payload
}
return nil
}
func (x *MultiDevice) GetMetadata() *MultiDevice_Metadata {
if x != nil {
return x.Metadata
}
return nil
}
type MultiDevice_Metadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *MultiDevice_Metadata) Reset() {
*x = MultiDevice_Metadata{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_Metadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_Metadata) ProtoMessage() {}
func (x *MultiDevice_Metadata) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_Metadata.ProtoReflect.Descriptor instead.
func (*MultiDevice_Metadata) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 0}
}
type MultiDevice_Payload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Payload:
//
// *MultiDevice_Payload_ApplicationData
// *MultiDevice_Payload_Signal
Payload isMultiDevice_Payload_Payload `protobuf_oneof:"payload"`
}
func (x *MultiDevice_Payload) Reset() {
*x = MultiDevice_Payload{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_Payload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_Payload) ProtoMessage() {}
func (x *MultiDevice_Payload) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_Payload.ProtoReflect.Descriptor instead.
func (*MultiDevice_Payload) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 1}
}
func (m *MultiDevice_Payload) GetPayload() isMultiDevice_Payload_Payload {
if m != nil {
return m.Payload
}
return nil
}
func (x *MultiDevice_Payload) GetApplicationData() *MultiDevice_ApplicationData {
if x, ok := x.GetPayload().(*MultiDevice_Payload_ApplicationData); ok {
return x.ApplicationData
}
return nil
}
func (x *MultiDevice_Payload) GetSignal() *MultiDevice_Signal {
if x, ok := x.GetPayload().(*MultiDevice_Payload_Signal); ok {
return x.Signal
}
return nil
}
type isMultiDevice_Payload_Payload interface {
isMultiDevice_Payload_Payload()
}
type MultiDevice_Payload_ApplicationData struct {
ApplicationData *MultiDevice_ApplicationData `protobuf:"bytes,1,opt,name=applicationData,proto3,oneof"`
}
type MultiDevice_Payload_Signal struct {
Signal *MultiDevice_Signal `protobuf:"bytes,2,opt,name=signal,proto3,oneof"`
}
func (*MultiDevice_Payload_ApplicationData) isMultiDevice_Payload_Payload() {}
func (*MultiDevice_Payload_Signal) isMultiDevice_Payload_Payload() {}
type MultiDevice_ApplicationData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to ApplicationData:
//
// *MultiDevice_ApplicationData_AppStateSyncKeyShare
// *MultiDevice_ApplicationData_AppStateSyncKeyRequest
ApplicationData isMultiDevice_ApplicationData_ApplicationData `protobuf_oneof:"applicationData"`
}
func (x *MultiDevice_ApplicationData) Reset() {
*x = MultiDevice_ApplicationData{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData) ProtoMessage() {}
func (x *MultiDevice_ApplicationData) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_ApplicationData.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2}
}
func (m *MultiDevice_ApplicationData) GetApplicationData() isMultiDevice_ApplicationData_ApplicationData {
if m != nil {
return m.ApplicationData
}
return nil
}
func (x *MultiDevice_ApplicationData) GetAppStateSyncKeyShare() *MultiDevice_ApplicationData_AppStateSyncKeyShareMessage {
if x, ok := x.GetApplicationData().(*MultiDevice_ApplicationData_AppStateSyncKeyShare); ok {
return x.AppStateSyncKeyShare
}
return nil
}
func (x *MultiDevice_ApplicationData) GetAppStateSyncKeyRequest() *MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage {
if x, ok := x.GetApplicationData().(*MultiDevice_ApplicationData_AppStateSyncKeyRequest); ok {
return x.AppStateSyncKeyRequest
}
return nil
}
type isMultiDevice_ApplicationData_ApplicationData interface {
isMultiDevice_ApplicationData_ApplicationData()
}
type MultiDevice_ApplicationData_AppStateSyncKeyShare struct {
AppStateSyncKeyShare *MultiDevice_ApplicationData_AppStateSyncKeyShareMessage `protobuf:"bytes,1,opt,name=appStateSyncKeyShare,proto3,oneof"`
}
type MultiDevice_ApplicationData_AppStateSyncKeyRequest struct {
AppStateSyncKeyRequest *MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage `protobuf:"bytes,2,opt,name=appStateSyncKeyRequest,proto3,oneof"`
}
func (*MultiDevice_ApplicationData_AppStateSyncKeyShare) isMultiDevice_ApplicationData_ApplicationData() {
}
func (*MultiDevice_ApplicationData_AppStateSyncKeyRequest) isMultiDevice_ApplicationData_ApplicationData() {
}
type MultiDevice_Signal struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *MultiDevice_Signal) Reset() {
*x = MultiDevice_Signal{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_Signal) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_Signal) ProtoMessage() {}
func (x *MultiDevice_Signal) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_Signal.ProtoReflect.Descriptor instead.
func (*MultiDevice_Signal) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 3}
}
type MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
KeyIDs []*MultiDevice_ApplicationData_AppStateSyncKeyId `protobuf:"bytes,1,rep,name=keyIDs,proto3" json:"keyIDs,omitempty"`
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage) Reset() {
*x = MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage) ProtoMessage() {}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2, 0}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage) GetKeyIDs() []*MultiDevice_ApplicationData_AppStateSyncKeyId {
if x != nil {
return x.KeyIDs
}
return nil
}
type MultiDevice_ApplicationData_AppStateSyncKeyShareMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Keys []*MultiDevice_ApplicationData_AppStateSyncKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyShareMessage) Reset() {
*x = MultiDevice_ApplicationData_AppStateSyncKeyShareMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyShareMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData_AppStateSyncKeyShareMessage) ProtoMessage() {}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyShareMessage) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_ApplicationData_AppStateSyncKeyShareMessage.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData_AppStateSyncKeyShareMessage) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2, 1}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyShareMessage) GetKeys() []*MultiDevice_ApplicationData_AppStateSyncKey {
if x != nil {
return x.Keys
}
return nil
}
type MultiDevice_ApplicationData_AppStateSyncKey struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
KeyID *MultiDevice_ApplicationData_AppStateSyncKeyId `protobuf:"bytes,1,opt,name=keyID,proto3" json:"keyID,omitempty"`
KeyData *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData `protobuf:"bytes,2,opt,name=keyData,proto3" json:"keyData,omitempty"`
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey) Reset() {
*x = MultiDevice_ApplicationData_AppStateSyncKey{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData_AppStateSyncKey) ProtoMessage() {}
func (x *MultiDevice_ApplicationData_AppStateSyncKey) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_ApplicationData_AppStateSyncKey.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData_AppStateSyncKey) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2, 2}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey) GetKeyID() *MultiDevice_ApplicationData_AppStateSyncKeyId {
if x != nil {
return x.KeyID
}
return nil
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey) GetKeyData() *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData {
if x != nil {
return x.KeyData
}
return nil
}
type MultiDevice_ApplicationData_AppStateSyncKeyId struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
KeyID []byte `protobuf:"bytes,1,opt,name=keyID,proto3" json:"keyID,omitempty"`
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyId) Reset() {
*x = MultiDevice_ApplicationData_AppStateSyncKeyId{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyId) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData_AppStateSyncKeyId) ProtoMessage() {}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyId) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_ApplicationData_AppStateSyncKeyId.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData_AppStateSyncKeyId) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2, 3}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKeyId) GetKeyID() []byte {
if x != nil {
return x.KeyID
}
return nil
}
type MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
KeyData []byte `protobuf:"bytes,1,opt,name=keyData,proto3" json:"keyData,omitempty"`
Fingerprint *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) Reset() {
*x = MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) ProtoMessage() {}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_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 MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2, 2, 0}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) GetKeyData() []byte {
if x != nil {
return x.KeyData
}
return nil
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) GetFingerprint() *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint {
if x != nil {
return x.Fingerprint
}
return nil
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
type MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RawID uint32 `protobuf:"varint,1,opt,name=rawID,proto3" json:"rawID,omitempty"`
CurrentIndex uint32 `protobuf:"varint,2,opt,name=currentIndex,proto3" json:"currentIndex,omitempty"`
DeviceIndexes []uint32 `protobuf:"varint,3,rep,packed,name=deviceIndexes,proto3" json:"deviceIndexes,omitempty"`
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) Reset() {
*x = MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint{}
if protoimpl.UnsafeEnabled {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) ProtoMessage() {
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) ProtoReflect() protoreflect.Message {
mi := &file_waMultiDevice_WAMultiDevice_proto_msgTypes[10]
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 MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint.ProtoReflect.Descriptor instead.
func (*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) Descriptor() ([]byte, []int) {
return file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP(), []int{0, 2, 2, 0, 0}
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) GetRawID() uint32 {
if x != nil {
return x.RawID
}
return 0
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) GetCurrentIndex() uint32 {
if x != nil {
return x.CurrentIndex
}
return 0
}
func (x *MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint) GetDeviceIndexes() []uint32 {
if x != nil {
return x.DeviceIndexes
}
return nil
}
var File_waMultiDevice_WAMultiDevice_proto protoreflect.FileDescriptor
//go:embed WAMultiDevice.pb.raw
var file_waMultiDevice_WAMultiDevice_proto_rawDesc []byte
var (
file_waMultiDevice_WAMultiDevice_proto_rawDescOnce sync.Once
file_waMultiDevice_WAMultiDevice_proto_rawDescData = file_waMultiDevice_WAMultiDevice_proto_rawDesc
)
func file_waMultiDevice_WAMultiDevice_proto_rawDescGZIP() []byte {
file_waMultiDevice_WAMultiDevice_proto_rawDescOnce.Do(func() {
file_waMultiDevice_WAMultiDevice_proto_rawDescData = protoimpl.X.CompressGZIP(file_waMultiDevice_WAMultiDevice_proto_rawDescData)
})
return file_waMultiDevice_WAMultiDevice_proto_rawDescData
}
var file_waMultiDevice_WAMultiDevice_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_waMultiDevice_WAMultiDevice_proto_goTypes = []interface{}{
(*MultiDevice)(nil), // 0: WAMultiDevice.MultiDevice
(*MultiDevice_Metadata)(nil), // 1: WAMultiDevice.MultiDevice.Metadata
(*MultiDevice_Payload)(nil), // 2: WAMultiDevice.MultiDevice.Payload
(*MultiDevice_ApplicationData)(nil), // 3: WAMultiDevice.MultiDevice.ApplicationData
(*MultiDevice_Signal)(nil), // 4: WAMultiDevice.MultiDevice.Signal
(*MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage)(nil), // 5: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyRequestMessage
(*MultiDevice_ApplicationData_AppStateSyncKeyShareMessage)(nil), // 6: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyShareMessage
(*MultiDevice_ApplicationData_AppStateSyncKey)(nil), // 7: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey
(*MultiDevice_ApplicationData_AppStateSyncKeyId)(nil), // 8: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyId
(*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData)(nil), // 9: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.AppStateSyncKeyData
(*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint)(nil), // 10: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.AppStateSyncKeyData.AppStateSyncKeyFingerprint
}
var file_waMultiDevice_WAMultiDevice_proto_depIdxs = []int32{
2, // 0: WAMultiDevice.MultiDevice.payload:type_name -> WAMultiDevice.MultiDevice.Payload
1, // 1: WAMultiDevice.MultiDevice.metadata:type_name -> WAMultiDevice.MultiDevice.Metadata
3, // 2: WAMultiDevice.MultiDevice.Payload.applicationData:type_name -> WAMultiDevice.MultiDevice.ApplicationData
4, // 3: WAMultiDevice.MultiDevice.Payload.signal:type_name -> WAMultiDevice.MultiDevice.Signal
6, // 4: WAMultiDevice.MultiDevice.ApplicationData.appStateSyncKeyShare:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyShareMessage
5, // 5: WAMultiDevice.MultiDevice.ApplicationData.appStateSyncKeyRequest:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyRequestMessage
8, // 6: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyRequestMessage.keyIDs:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyId
7, // 7: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyShareMessage.keys:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey
8, // 8: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.keyID:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKeyId
9, // 9: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.keyData:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.AppStateSyncKeyData
10, // 10: WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.AppStateSyncKeyData.fingerprint:type_name -> WAMultiDevice.MultiDevice.ApplicationData.AppStateSyncKey.AppStateSyncKeyData.AppStateSyncKeyFingerprint
11, // [11:11] is the sub-list for method output_type
11, // [11:11] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_waMultiDevice_WAMultiDevice_proto_init() }
func file_waMultiDevice_WAMultiDevice_proto_init() {
if File_waMultiDevice_WAMultiDevice_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waMultiDevice_WAMultiDevice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_Metadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_Payload); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_Signal); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData_AppStateSyncKeyRequestMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData_AppStateSyncKeyShareMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData_AppStateSyncKey); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData_AppStateSyncKeyId); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiDevice_ApplicationData_AppStateSyncKey_AppStateSyncKeyData_AppStateSyncKeyFingerprint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[2].OneofWrappers = []interface{}{
(*MultiDevice_Payload_ApplicationData)(nil),
(*MultiDevice_Payload_Signal)(nil),
}
file_waMultiDevice_WAMultiDevice_proto_msgTypes[3].OneofWrappers = []interface{}{
(*MultiDevice_ApplicationData_AppStateSyncKeyShare)(nil),
(*MultiDevice_ApplicationData_AppStateSyncKeyRequest)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_waMultiDevice_WAMultiDevice_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waMultiDevice_WAMultiDevice_proto_goTypes,
DependencyIndexes: file_waMultiDevice_WAMultiDevice_proto_depIdxs,
MessageInfos: file_waMultiDevice_WAMultiDevice_proto_msgTypes,
}.Build()
File_waMultiDevice_WAMultiDevice_proto = out.File
file_waMultiDevice_WAMultiDevice_proto_rawDesc = nil
file_waMultiDevice_WAMultiDevice_proto_goTypes = nil
file_waMultiDevice_WAMultiDevice_proto_depIdxs = nil
}

View File

@ -0,0 +1,57 @@
syntax = "proto3";
package WAMultiDevice;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waMultiDevice";
message MultiDevice {
message Metadata {
}
message Payload {
oneof payload {
ApplicationData applicationData = 1;
Signal signal = 2;
}
}
message ApplicationData {
message AppStateSyncKeyRequestMessage {
repeated AppStateSyncKeyId keyIDs = 1;
}
message AppStateSyncKeyShareMessage {
repeated AppStateSyncKey keys = 1;
}
message AppStateSyncKey {
message AppStateSyncKeyData {
message AppStateSyncKeyFingerprint {
uint32 rawID = 1;
uint32 currentIndex = 2;
repeated uint32 deviceIndexes = 3 [packed=true];
}
bytes keyData = 1;
AppStateSyncKeyFingerprint fingerprint = 2;
int64 timestamp = 3;
}
AppStateSyncKeyId keyID = 1;
AppStateSyncKeyData keyData = 2;
}
message AppStateSyncKeyId {
bytes keyID = 1;
}
oneof applicationData {
AppStateSyncKeyShareMessage appStateSyncKeyShare = 1;
AppStateSyncKeyRequestMessage appStateSyncKeyRequest = 2;
}
}
message Signal {
}
Payload payload = 1;
Metadata metadata = 2;
}

View File

@ -0,0 +1,3 @@
package waMultiDevice
func (*MultiDevice) IsMessageApplicationSub() {}

View File

@ -0,0 +1,163 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: waProtocol/WAProtocol.proto
package waProtocol
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "embed"
)
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 MessageKey struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RemoteJID string `protobuf:"bytes,1,opt,name=remoteJID,proto3" json:"remoteJID,omitempty"`
FromMe bool `protobuf:"varint,2,opt,name=fromMe,proto3" json:"fromMe,omitempty"`
ID string `protobuf:"bytes,3,opt,name=ID,proto3" json:"ID,omitempty"`
Participant string `protobuf:"bytes,4,opt,name=participant,proto3" json:"participant,omitempty"`
}
func (x *MessageKey) Reset() {
*x = MessageKey{}
if protoimpl.UnsafeEnabled {
mi := &file_waProtocol_WAProtocol_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageKey) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageKey) ProtoMessage() {}
func (x *MessageKey) ProtoReflect() protoreflect.Message {
mi := &file_waProtocol_WAProtocol_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 MessageKey.ProtoReflect.Descriptor instead.
func (*MessageKey) Descriptor() ([]byte, []int) {
return file_waProtocol_WAProtocol_proto_rawDescGZIP(), []int{0}
}
func (x *MessageKey) GetRemoteJID() string {
if x != nil {
return x.RemoteJID
}
return ""
}
func (x *MessageKey) GetFromMe() bool {
if x != nil {
return x.FromMe
}
return false
}
func (x *MessageKey) GetID() string {
if x != nil {
return x.ID
}
return ""
}
func (x *MessageKey) GetParticipant() string {
if x != nil {
return x.Participant
}
return ""
}
var File_waProtocol_WAProtocol_proto protoreflect.FileDescriptor
//go:embed WAProtocol.pb.raw
var file_waProtocol_WAProtocol_proto_rawDesc []byte
var (
file_waProtocol_WAProtocol_proto_rawDescOnce sync.Once
file_waProtocol_WAProtocol_proto_rawDescData = file_waProtocol_WAProtocol_proto_rawDesc
)
func file_waProtocol_WAProtocol_proto_rawDescGZIP() []byte {
file_waProtocol_WAProtocol_proto_rawDescOnce.Do(func() {
file_waProtocol_WAProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_waProtocol_WAProtocol_proto_rawDescData)
})
return file_waProtocol_WAProtocol_proto_rawDescData
}
var file_waProtocol_WAProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_waProtocol_WAProtocol_proto_goTypes = []interface{}{
(*MessageKey)(nil), // 0: WAProtocol.MessageKey
}
var file_waProtocol_WAProtocol_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_waProtocol_WAProtocol_proto_init() }
func file_waProtocol_WAProtocol_proto_init() {
if File_waProtocol_WAProtocol_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waProtocol_WAProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageKey); 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_waProtocol_WAProtocol_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waProtocol_WAProtocol_proto_goTypes,
DependencyIndexes: file_waProtocol_WAProtocol_proto_depIdxs,
MessageInfos: file_waProtocol_WAProtocol_proto_msgTypes,
}.Build()
File_waProtocol_WAProtocol_proto = out.File
file_waProtocol_WAProtocol_proto_rawDesc = nil
file_waProtocol_WAProtocol_proto_goTypes = nil
file_waProtocol_WAProtocol_proto_depIdxs = nil
}

View File

@ -0,0 +1,9 @@
waProtocol/WAProtocol.proto
WAProtocol"t
MessageKey
remoteJID ( R remoteJID
fromMe (RfromMe
ID ( RID
participant ( R participantB1Z/go.mau.fi/whatsmeow/binary/armadillo/waProtocolbproto3

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package WAProtocol;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waProtocol";
message MessageKey {
string remoteJID = 1;
bool fromMe = 2;
string ID = 3;
string participant = 4;
}

View File

@ -0,0 +1,962 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: waServerSync/WAServerSync.proto
package waServerSync
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "embed"
)
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 SyncdMutation_SyncdOperation int32
const (
SyncdMutation_SET SyncdMutation_SyncdOperation = 0
SyncdMutation_REMOVE SyncdMutation_SyncdOperation = 1
)
// Enum value maps for SyncdMutation_SyncdOperation.
var (
SyncdMutation_SyncdOperation_name = map[int32]string{
0: "SET",
1: "REMOVE",
}
SyncdMutation_SyncdOperation_value = map[string]int32{
"SET": 0,
"REMOVE": 1,
}
)
func (x SyncdMutation_SyncdOperation) Enum() *SyncdMutation_SyncdOperation {
p := new(SyncdMutation_SyncdOperation)
*p = x
return p
}
func (x SyncdMutation_SyncdOperation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SyncdMutation_SyncdOperation) Descriptor() protoreflect.EnumDescriptor {
return file_waServerSync_WAServerSync_proto_enumTypes[0].Descriptor()
}
func (SyncdMutation_SyncdOperation) Type() protoreflect.EnumType {
return &file_waServerSync_WAServerSync_proto_enumTypes[0]
}
func (x SyncdMutation_SyncdOperation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SyncdMutation_SyncdOperation.Descriptor instead.
func (SyncdMutation_SyncdOperation) EnumDescriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{0, 0}
}
type SyncdMutation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Operation SyncdMutation_SyncdOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=WAServerSync.SyncdMutation_SyncdOperation" json:"operation,omitempty"`
Record *SyncdRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}
func (x *SyncdMutation) Reset() {
*x = SyncdMutation{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdMutation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdMutation) ProtoMessage() {}
func (x *SyncdMutation) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdMutation.ProtoReflect.Descriptor instead.
func (*SyncdMutation) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{0}
}
func (x *SyncdMutation) GetOperation() SyncdMutation_SyncdOperation {
if x != nil {
return x.Operation
}
return SyncdMutation_SET
}
func (x *SyncdMutation) GetRecord() *SyncdRecord {
if x != nil {
return x.Record
}
return nil
}
type SyncdVersion struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
}
func (x *SyncdVersion) Reset() {
*x = SyncdVersion{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdVersion) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdVersion) ProtoMessage() {}
func (x *SyncdVersion) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdVersion.ProtoReflect.Descriptor instead.
func (*SyncdVersion) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{1}
}
func (x *SyncdVersion) GetVersion() uint64 {
if x != nil {
return x.Version
}
return 0
}
type ExitCode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code uint64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
}
func (x *ExitCode) Reset() {
*x = ExitCode{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExitCode) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExitCode) ProtoMessage() {}
func (x *ExitCode) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 ExitCode.ProtoReflect.Descriptor instead.
func (*ExitCode) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{2}
}
func (x *ExitCode) GetCode() uint64 {
if x != nil {
return x.Code
}
return 0
}
func (x *ExitCode) GetText() string {
if x != nil {
return x.Text
}
return ""
}
type SyncdIndex struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"`
}
func (x *SyncdIndex) Reset() {
*x = SyncdIndex{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdIndex) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdIndex) ProtoMessage() {}
func (x *SyncdIndex) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdIndex.ProtoReflect.Descriptor instead.
func (*SyncdIndex) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{3}
}
func (x *SyncdIndex) GetBlob() []byte {
if x != nil {
return x.Blob
}
return nil
}
type SyncdValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"`
}
func (x *SyncdValue) Reset() {
*x = SyncdValue{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdValue) ProtoMessage() {}
func (x *SyncdValue) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdValue.ProtoReflect.Descriptor instead.
func (*SyncdValue) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{4}
}
func (x *SyncdValue) GetBlob() []byte {
if x != nil {
return x.Blob
}
return nil
}
type KeyId struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID []byte `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (x *KeyId) Reset() {
*x = KeyId{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyId) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyId) ProtoMessage() {}
func (x *KeyId) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 KeyId.ProtoReflect.Descriptor instead.
func (*KeyId) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{5}
}
func (x *KeyId) GetID() []byte {
if x != nil {
return x.ID
}
return nil
}
type SyncdRecord struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index *SyncdIndex `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
Value *SyncdValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
KeyID *KeyId `protobuf:"bytes,3,opt,name=keyID,proto3" json:"keyID,omitempty"`
}
func (x *SyncdRecord) Reset() {
*x = SyncdRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdRecord) ProtoMessage() {}
func (x *SyncdRecord) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdRecord.ProtoReflect.Descriptor instead.
func (*SyncdRecord) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{6}
}
func (x *SyncdRecord) GetIndex() *SyncdIndex {
if x != nil {
return x.Index
}
return nil
}
func (x *SyncdRecord) GetValue() *SyncdValue {
if x != nil {
return x.Value
}
return nil
}
func (x *SyncdRecord) GetKeyID() *KeyId {
if x != nil {
return x.KeyID
}
return nil
}
type ExternalBlobReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MediaKey []byte `protobuf:"bytes,1,opt,name=mediaKey,proto3" json:"mediaKey,omitempty"`
DirectPath string `protobuf:"bytes,2,opt,name=directPath,proto3" json:"directPath,omitempty"`
Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"`
FileSizeBytes uint64 `protobuf:"varint,4,opt,name=fileSizeBytes,proto3" json:"fileSizeBytes,omitempty"`
FileSHA256 []byte `protobuf:"bytes,5,opt,name=fileSHA256,proto3" json:"fileSHA256,omitempty"`
FileEncSHA256 []byte `protobuf:"bytes,6,opt,name=fileEncSHA256,proto3" json:"fileEncSHA256,omitempty"`
}
func (x *ExternalBlobReference) Reset() {
*x = ExternalBlobReference{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExternalBlobReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExternalBlobReference) ProtoMessage() {}
func (x *ExternalBlobReference) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 ExternalBlobReference.ProtoReflect.Descriptor instead.
func (*ExternalBlobReference) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{7}
}
func (x *ExternalBlobReference) GetMediaKey() []byte {
if x != nil {
return x.MediaKey
}
return nil
}
func (x *ExternalBlobReference) GetDirectPath() string {
if x != nil {
return x.DirectPath
}
return ""
}
func (x *ExternalBlobReference) GetHandle() string {
if x != nil {
return x.Handle
}
return ""
}
func (x *ExternalBlobReference) GetFileSizeBytes() uint64 {
if x != nil {
return x.FileSizeBytes
}
return 0
}
func (x *ExternalBlobReference) GetFileSHA256() []byte {
if x != nil {
return x.FileSHA256
}
return nil
}
func (x *ExternalBlobReference) GetFileEncSHA256() []byte {
if x != nil {
return x.FileEncSHA256
}
return nil
}
type SyncdSnapshot struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Version *SyncdVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
Records []*SyncdRecord `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
Mac []byte `protobuf:"bytes,3,opt,name=mac,proto3" json:"mac,omitempty"`
KeyID *KeyId `protobuf:"bytes,4,opt,name=keyID,proto3" json:"keyID,omitempty"`
}
func (x *SyncdSnapshot) Reset() {
*x = SyncdSnapshot{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdSnapshot) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdSnapshot) ProtoMessage() {}
func (x *SyncdSnapshot) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdSnapshot.ProtoReflect.Descriptor instead.
func (*SyncdSnapshot) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{8}
}
func (x *SyncdSnapshot) GetVersion() *SyncdVersion {
if x != nil {
return x.Version
}
return nil
}
func (x *SyncdSnapshot) GetRecords() []*SyncdRecord {
if x != nil {
return x.Records
}
return nil
}
func (x *SyncdSnapshot) GetMac() []byte {
if x != nil {
return x.Mac
}
return nil
}
func (x *SyncdSnapshot) GetKeyID() *KeyId {
if x != nil {
return x.KeyID
}
return nil
}
type SyncdMutations struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Mutations []*SyncdMutation `protobuf:"bytes,1,rep,name=mutations,proto3" json:"mutations,omitempty"`
}
func (x *SyncdMutations) Reset() {
*x = SyncdMutations{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdMutations) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdMutations) ProtoMessage() {}
func (x *SyncdMutations) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_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 SyncdMutations.ProtoReflect.Descriptor instead.
func (*SyncdMutations) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{9}
}
func (x *SyncdMutations) GetMutations() []*SyncdMutation {
if x != nil {
return x.Mutations
}
return nil
}
type SyncdPatch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Version *SyncdVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
Mutations []*SyncdMutation `protobuf:"bytes,2,rep,name=mutations,proto3" json:"mutations,omitempty"`
ExternalMutations *ExternalBlobReference `protobuf:"bytes,3,opt,name=externalMutations,proto3" json:"externalMutations,omitempty"`
SnapshotMAC []byte `protobuf:"bytes,4,opt,name=snapshotMAC,proto3" json:"snapshotMAC,omitempty"`
PatchMAC []byte `protobuf:"bytes,5,opt,name=patchMAC,proto3" json:"patchMAC,omitempty"`
KeyID *KeyId `protobuf:"bytes,6,opt,name=keyID,proto3" json:"keyID,omitempty"`
ExitCode *ExitCode `protobuf:"bytes,7,opt,name=exitCode,proto3" json:"exitCode,omitempty"`
DeviceIndex uint32 `protobuf:"varint,8,opt,name=deviceIndex,proto3" json:"deviceIndex,omitempty"`
ClientDebugData []byte `protobuf:"bytes,9,opt,name=clientDebugData,proto3" json:"clientDebugData,omitempty"`
}
func (x *SyncdPatch) Reset() {
*x = SyncdPatch{}
if protoimpl.UnsafeEnabled {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncdPatch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncdPatch) ProtoMessage() {}
func (x *SyncdPatch) ProtoReflect() protoreflect.Message {
mi := &file_waServerSync_WAServerSync_proto_msgTypes[10]
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 SyncdPatch.ProtoReflect.Descriptor instead.
func (*SyncdPatch) Descriptor() ([]byte, []int) {
return file_waServerSync_WAServerSync_proto_rawDescGZIP(), []int{10}
}
func (x *SyncdPatch) GetVersion() *SyncdVersion {
if x != nil {
return x.Version
}
return nil
}
func (x *SyncdPatch) GetMutations() []*SyncdMutation {
if x != nil {
return x.Mutations
}
return nil
}
func (x *SyncdPatch) GetExternalMutations() *ExternalBlobReference {
if x != nil {
return x.ExternalMutations
}
return nil
}
func (x *SyncdPatch) GetSnapshotMAC() []byte {
if x != nil {
return x.SnapshotMAC
}
return nil
}
func (x *SyncdPatch) GetPatchMAC() []byte {
if x != nil {
return x.PatchMAC
}
return nil
}
func (x *SyncdPatch) GetKeyID() *KeyId {
if x != nil {
return x.KeyID
}
return nil
}
func (x *SyncdPatch) GetExitCode() *ExitCode {
if x != nil {
return x.ExitCode
}
return nil
}
func (x *SyncdPatch) GetDeviceIndex() uint32 {
if x != nil {
return x.DeviceIndex
}
return 0
}
func (x *SyncdPatch) GetClientDebugData() []byte {
if x != nil {
return x.ClientDebugData
}
return nil
}
var File_waServerSync_WAServerSync_proto protoreflect.FileDescriptor
//go:embed WAServerSync.pb.raw
var file_waServerSync_WAServerSync_proto_rawDesc []byte
var (
file_waServerSync_WAServerSync_proto_rawDescOnce sync.Once
file_waServerSync_WAServerSync_proto_rawDescData = file_waServerSync_WAServerSync_proto_rawDesc
)
func file_waServerSync_WAServerSync_proto_rawDescGZIP() []byte {
file_waServerSync_WAServerSync_proto_rawDescOnce.Do(func() {
file_waServerSync_WAServerSync_proto_rawDescData = protoimpl.X.CompressGZIP(file_waServerSync_WAServerSync_proto_rawDescData)
})
return file_waServerSync_WAServerSync_proto_rawDescData
}
var file_waServerSync_WAServerSync_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_waServerSync_WAServerSync_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_waServerSync_WAServerSync_proto_goTypes = []interface{}{
(SyncdMutation_SyncdOperation)(0), // 0: WAServerSync.SyncdMutation.SyncdOperation
(*SyncdMutation)(nil), // 1: WAServerSync.SyncdMutation
(*SyncdVersion)(nil), // 2: WAServerSync.SyncdVersion
(*ExitCode)(nil), // 3: WAServerSync.ExitCode
(*SyncdIndex)(nil), // 4: WAServerSync.SyncdIndex
(*SyncdValue)(nil), // 5: WAServerSync.SyncdValue
(*KeyId)(nil), // 6: WAServerSync.KeyId
(*SyncdRecord)(nil), // 7: WAServerSync.SyncdRecord
(*ExternalBlobReference)(nil), // 8: WAServerSync.ExternalBlobReference
(*SyncdSnapshot)(nil), // 9: WAServerSync.SyncdSnapshot
(*SyncdMutations)(nil), // 10: WAServerSync.SyncdMutations
(*SyncdPatch)(nil), // 11: WAServerSync.SyncdPatch
}
var file_waServerSync_WAServerSync_proto_depIdxs = []int32{
0, // 0: WAServerSync.SyncdMutation.operation:type_name -> WAServerSync.SyncdMutation.SyncdOperation
7, // 1: WAServerSync.SyncdMutation.record:type_name -> WAServerSync.SyncdRecord
4, // 2: WAServerSync.SyncdRecord.index:type_name -> WAServerSync.SyncdIndex
5, // 3: WAServerSync.SyncdRecord.value:type_name -> WAServerSync.SyncdValue
6, // 4: WAServerSync.SyncdRecord.keyID:type_name -> WAServerSync.KeyId
2, // 5: WAServerSync.SyncdSnapshot.version:type_name -> WAServerSync.SyncdVersion
7, // 6: WAServerSync.SyncdSnapshot.records:type_name -> WAServerSync.SyncdRecord
6, // 7: WAServerSync.SyncdSnapshot.keyID:type_name -> WAServerSync.KeyId
1, // 8: WAServerSync.SyncdMutations.mutations:type_name -> WAServerSync.SyncdMutation
2, // 9: WAServerSync.SyncdPatch.version:type_name -> WAServerSync.SyncdVersion
1, // 10: WAServerSync.SyncdPatch.mutations:type_name -> WAServerSync.SyncdMutation
8, // 11: WAServerSync.SyncdPatch.externalMutations:type_name -> WAServerSync.ExternalBlobReference
6, // 12: WAServerSync.SyncdPatch.keyID:type_name -> WAServerSync.KeyId
3, // 13: WAServerSync.SyncdPatch.exitCode:type_name -> WAServerSync.ExitCode
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_waServerSync_WAServerSync_proto_init() }
func file_waServerSync_WAServerSync_proto_init() {
if File_waServerSync_WAServerSync_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waServerSync_WAServerSync_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdMutation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdVersion); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExitCode); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdIndex); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyId); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdRecord); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExternalBlobReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdSnapshot); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdMutations); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waServerSync_WAServerSync_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncdPatch); 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_waServerSync_WAServerSync_proto_rawDesc,
NumEnums: 1,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waServerSync_WAServerSync_proto_goTypes,
DependencyIndexes: file_waServerSync_WAServerSync_proto_depIdxs,
EnumInfos: file_waServerSync_WAServerSync_proto_enumTypes,
MessageInfos: file_waServerSync_WAServerSync_proto_msgTypes,
}.Build()
File_waServerSync_WAServerSync_proto = out.File
file_waServerSync_WAServerSync_proto_rawDesc = nil
file_waServerSync_WAServerSync_proto_goTypes = nil
file_waServerSync_WAServerSync_proto_depIdxs = nil
}

View File

@ -0,0 +1,72 @@
syntax = "proto3";
package WAServerSync;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waServerSync";
message SyncdMutation {
enum SyncdOperation {
SET = 0;
REMOVE = 1;
}
SyncdOperation operation = 1;
SyncdRecord record = 2;
}
message SyncdVersion {
uint64 version = 1;
}
message ExitCode {
uint64 code = 1;
string text = 2;
}
message SyncdIndex {
bytes blob = 1;
}
message SyncdValue {
bytes blob = 1;
}
message KeyId {
bytes ID = 1;
}
message SyncdRecord {
SyncdIndex index = 1;
SyncdValue value = 2;
KeyId keyID = 3;
}
message ExternalBlobReference {
bytes mediaKey = 1;
string directPath = 2;
string handle = 3;
uint64 fileSizeBytes = 4;
bytes fileSHA256 = 5;
bytes fileEncSHA256 = 6;
}
message SyncdSnapshot {
SyncdVersion version = 1;
repeated SyncdRecord records = 2;
bytes mac = 3;
KeyId keyID = 4;
}
message SyncdMutations {
repeated SyncdMutation mutations = 1;
}
message SyncdPatch {
SyncdVersion version = 1;
repeated SyncdMutation mutations = 2;
ExternalBlobReference externalMutations = 3;
bytes snapshotMAC = 4;
bytes patchMAC = 5;
KeyId keyID = 6;
ExitCode exitCode = 7;
uint32 deviceIndex = 8;
bytes clientDebugData = 9;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,375 @@
syntax = "proto3";
package WASyncAction;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waSyncAction";
import "waCommon/WACommon.proto";
message CallLogRecord {
enum CallType {
REGULAR = 0;
SCHEDULED_CALL = 1;
VOICE_CHAT = 2;
}
enum SilenceReason {
NONE = 0;
SCHEDULED = 1;
PRIVACY = 2;
LIGHTWEIGHT = 3;
}
enum CallResult {
CONNECTED = 0;
REJECTED = 1;
CANCELLED = 2;
ACCEPTEDELSEWHERE = 3;
MISSED = 4;
INVALID = 5;
UNAVAILABLE = 6;
UPCOMING = 7;
FAILED = 8;
ABANDONED = 9;
ONGOING = 10;
}
message ParticipantInfo {
string userJID = 1;
CallResult callResult = 2;
}
CallResult callResult = 1;
bool isDndMode = 2;
SilenceReason silenceReason = 3;
int64 duration = 4;
int64 startTime = 5;
bool isIncoming = 6;
bool isVideo = 7;
bool isCallLink = 8;
string callLinkToken = 9;
string scheduledCallID = 10;
string callID = 11;
string callCreatorJID = 12;
string groupJID = 13;
repeated ParticipantInfo participants = 14;
CallType callType = 15;
}
message SyncActionValue {
message StatusPrivacyAction {
enum StatusDistributionMode {
ALLOW_LIST = 0;
DENY_LIST = 1;
CONTACTS = 2;
}
StatusDistributionMode mode = 1;
repeated string userJID = 2;
}
message MarketingMessageAction {
enum MarketingMessagePrototypeType {
PERSONALIZED = 0;
}
string name = 1;
string message = 2;
MarketingMessagePrototypeType type = 3;
int64 createdAt = 4;
int64 lastSentAt = 5;
bool isDeleted = 6;
string mediaID = 7;
}
message CustomPaymentMethodsAction {
repeated CustomPaymentMethod customPaymentMethods = 1;
}
message CustomPaymentMethod {
string credentialID = 1;
string country = 2;
string type = 3;
repeated CustomPaymentMethodMetadata metadata = 4;
}
message CustomPaymentMethodMetadata {
string key = 1;
string value = 2;
}
message PaymentInfoAction {
string cpi = 1;
}
message LabelReorderingAction {
repeated int32 sortedLabelIDs = 1;
}
message DeleteIndividualCallLogAction {
string peerJID = 1;
bool isIncoming = 2;
}
message BotWelcomeRequestAction {
bool isSent = 1;
}
message CallLogAction {
CallLogRecord callLogRecord = 1;
}
message PrivacySettingRelayAllCalls {
bool isEnabled = 1;
}
message ExternalWebBetaAction {
bool isOptIn = 1;
}
message MarketingMessageBroadcastAction {
int32 repliedCount = 1;
}
message PnForLidChatAction {
string pnJID = 1;
}
message ChatAssignmentOpenedStatusAction {
bool chatOpened = 1;
}
message ChatAssignmentAction {
string deviceAgentID = 1;
}
message StickerAction {
string URL = 1;
bytes fileEncSHA256 = 2;
bytes mediaKey = 3;
string mimetype = 4;
uint32 height = 5;
uint32 width = 6;
string directPath = 7;
uint64 fileLength = 8;
bool isFavorite = 9;
uint32 deviceIDHint = 10;
}
message RemoveRecentStickerAction {
int64 lastStickerSentTS = 1;
}
message PrimaryVersionAction {
string version = 1;
}
message NuxAction {
bool acknowledged = 1;
}
message TimeFormatAction {
bool isTwentyFourHourFormatEnabled = 1;
}
message UserStatusMuteAction {
bool muted = 1;
}
message SubscriptionAction {
bool isDeactivated = 1;
bool isAutoRenewing = 2;
int64 expirationDate = 3;
}
message AgentAction {
string name = 1;
int32 deviceID = 2;
bool isDeleted = 3;
}
message AndroidUnsupportedActions {
bool allowed = 1;
}
message PrimaryFeature {
repeated string flags = 1;
}
message KeyExpiration {
int32 expiredKeyEpoch = 1;
}
message SyncActionMessage {
WACommon.MessageKey key = 1;
int64 timestamp = 2;
}
message SyncActionMessageRange {
int64 lastMessageTimestamp = 1;
int64 lastSystemMessageTimestamp = 2;
repeated SyncActionMessage messages = 3;
}
message UnarchiveChatsSetting {
bool unarchiveChats = 1;
}
message DeleteChatAction {
SyncActionMessageRange messageRange = 1;
}
message ClearChatAction {
SyncActionMessageRange messageRange = 1;
}
message MarkChatAsReadAction {
bool read = 1;
SyncActionMessageRange messageRange = 2;
}
message DeleteMessageForMeAction {
bool deleteMedia = 1;
int64 messageTimestamp = 2;
}
message ArchiveChatAction {
bool archived = 1;
SyncActionMessageRange messageRange = 2;
}
message RecentEmojiWeightsAction {
repeated RecentEmojiWeight weights = 1;
}
message LabelEditAction {
string name = 1;
int32 color = 2;
int32 predefinedID = 3;
bool deleted = 4;
int32 orderIndex = 5;
}
message LabelAssociationAction {
bool labeled = 1;
}
message QuickReplyAction {
string shortcut = 1;
string message = 2;
repeated string keywords = 3;
int32 count = 4;
bool deleted = 5;
}
message LocaleSetting {
string locale = 1;
}
message PushNameSetting {
string name = 1;
}
message SecurityNotificationSetting {
bool showNotification = 1;
}
message PinAction {
bool pinned = 1;
}
message MuteAction {
bool muted = 1;
int64 muteEndTimestamp = 2;
bool autoMuted = 3;
}
message ContactAction {
string fullName = 1;
string firstName = 2;
string lidJID = 3;
bool saveOnPrimaryAddressbook = 4;
}
message StarAction {
bool starred = 1;
}
int64 timestamp = 1;
StarAction starAction = 2;
ContactAction contactAction = 3;
MuteAction muteAction = 4;
PinAction pinAction = 5;
SecurityNotificationSetting securityNotificationSetting = 6;
PushNameSetting pushNameSetting = 7;
QuickReplyAction quickReplyAction = 8;
RecentEmojiWeightsAction recentEmojiWeightsAction = 11;
LabelEditAction labelEditAction = 14;
LabelAssociationAction labelAssociationAction = 15;
LocaleSetting localeSetting = 16;
ArchiveChatAction archiveChatAction = 17;
DeleteMessageForMeAction deleteMessageForMeAction = 18;
KeyExpiration keyExpiration = 19;
MarkChatAsReadAction markChatAsReadAction = 20;
ClearChatAction clearChatAction = 21;
DeleteChatAction deleteChatAction = 22;
UnarchiveChatsSetting unarchiveChatsSetting = 23;
PrimaryFeature primaryFeature = 24;
AndroidUnsupportedActions androidUnsupportedActions = 26;
AgentAction agentAction = 27;
SubscriptionAction subscriptionAction = 28;
UserStatusMuteAction userStatusMuteAction = 29;
TimeFormatAction timeFormatAction = 30;
NuxAction nuxAction = 31;
PrimaryVersionAction primaryVersionAction = 32;
StickerAction stickerAction = 33;
RemoveRecentStickerAction removeRecentStickerAction = 34;
ChatAssignmentAction chatAssignment = 35;
ChatAssignmentOpenedStatusAction chatAssignmentOpenedStatus = 36;
PnForLidChatAction pnForLidChatAction = 37;
MarketingMessageAction marketingMessageAction = 38;
MarketingMessageBroadcastAction marketingMessageBroadcastAction = 39;
ExternalWebBetaAction externalWebBetaAction = 40;
PrivacySettingRelayAllCalls privacySettingRelayAllCalls = 41;
CallLogAction callLogAction = 42;
StatusPrivacyAction statusPrivacy = 44;
BotWelcomeRequestAction botWelcomeRequestAction = 45;
DeleteIndividualCallLogAction deleteIndividualCallLog = 46;
LabelReorderingAction labelReorderingAction = 47;
PaymentInfoAction paymentInfoAction = 48;
CustomPaymentMethodsAction customPaymentMethodsAction = 49;
}
message PatchDebugData {
enum Platform {
ANDROID = 0;
SMBA = 1;
IPHONE = 2;
SMBI = 3;
WEB = 4;
UWP = 5;
DARWIN = 6;
}
bytes currentLthash = 1;
bytes newLthash = 2;
bytes patchVersion = 3;
bytes collectionName = 4;
bytes firstFourBytesFromAHashOfSnapshotMACKey = 5;
bytes newLthashSubtract = 6;
int32 numberAdd = 7;
int32 numberRemove = 8;
int32 numberOverride = 9;
Platform senderPlatform = 10;
bool isSenderPrimary = 11;
}
message RecentEmojiWeight {
string emoji = 1;
float weight = 2;
}
message SyncActionData {
bytes index = 1;
SyncActionValue value = 2;
bytes padding = 3;
int32 version = 4;
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,227 @@
syntax = "proto3";
package WAWa5;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waWa5";
message ClientPayload {
enum Product {
WHATSAPP = 0;
MESSENGER = 1;
}
enum ConnectType {
CELLULAR_UNKNOWN = 0;
WIFI_UNKNOWN = 1;
CELLULAR_EDGE = 100;
CELLULAR_IDEN = 101;
CELLULAR_UMTS = 102;
CELLULAR_EVDO = 103;
CELLULAR_GPRS = 104;
CELLULAR_HSDPA = 105;
CELLULAR_HSUPA = 106;
CELLULAR_HSPA = 107;
CELLULAR_CDMA = 108;
CELLULAR_1XRTT = 109;
CELLULAR_EHRPD = 110;
CELLULAR_LTE = 111;
CELLULAR_HSPAP = 112;
}
enum ConnectReason {
PUSH = 0;
USER_ACTIVATED = 1;
SCHEDULED = 2;
ERROR_RECONNECT = 3;
NETWORK_SWITCH = 4;
PING_RECONNECT = 5;
UNKNOWN = 6;
}
enum IOSAppExtension {
SHARE_EXTENSION = 0;
SERVICE_EXTENSION = 1;
INTENTS_EXTENSION = 2;
}
message DNSSource {
enum DNSResolutionMethod {
SYSTEM = 0;
GOOGLE = 1;
HARDCODED = 2;
OVERRIDE = 3;
FALLBACK = 4;
}
DNSResolutionMethod dnsMethod = 15;
bool appCached = 16;
}
message WebInfo {
enum WebSubPlatform {
WEB_BROWSER = 0;
APP_STORE = 1;
WIN_STORE = 2;
DARWIN = 3;
WIN32 = 4;
}
message WebdPayload {
bool usesParticipantInKey = 1;
bool supportsStarredMessages = 2;
bool supportsDocumentMessages = 3;
bool supportsURLMessages = 4;
bool supportsMediaRetry = 5;
bool supportsE2EImage = 6;
bool supportsE2EVideo = 7;
bool supportsE2EAudio = 8;
bool supportsE2EDocument = 9;
string documentTypes = 10;
bytes features = 11;
}
string refToken = 1;
string version = 2;
WebdPayload webdPayload = 3;
WebSubPlatform webSubPlatform = 4;
}
message UserAgent {
enum DeviceType {
PHONE = 0;
TABLET = 1;
DESKTOP = 2;
WEARABLE = 3;
VR = 4;
}
enum ReleaseChannel {
RELEASE = 0;
BETA = 1;
ALPHA = 2;
DEBUG = 3;
}
enum Platform {
ANDROID = 0;
IOS = 1;
WINDOWS_PHONE = 2;
BLACKBERRY = 3;
BLACKBERRYX = 4;
S40 = 5;
S60 = 6;
PYTHON_CLIENT = 7;
TIZEN = 8;
ENTERPRISE = 9;
SMB_ANDROID = 10;
KAIOS = 11;
SMB_IOS = 12;
WINDOWS = 13;
WEB = 14;
PORTAL = 15;
GREEN_ANDROID = 16;
GREEN_IPHONE = 17;
BLUE_ANDROID = 18;
BLUE_IPHONE = 19;
FBLITE_ANDROID = 20;
MLITE_ANDROID = 21;
IGLITE_ANDROID = 22;
PAGE = 23;
MACOS = 24;
OCULUS_MSG = 25;
OCULUS_CALL = 26;
MILAN = 27;
CAPI = 28;
WEAROS = 29;
ARDEVICE = 30;
VRDEVICE = 31;
BLUE_WEB = 32;
IPAD = 33;
TEST = 34;
SMART_GLASSES = 35;
}
message AppVersion {
uint32 primary = 1;
uint32 secondary = 2;
uint32 tertiary = 3;
uint32 quaternary = 4;
uint32 quinary = 5;
}
Platform platform = 1;
AppVersion appVersion = 2;
string mcc = 3;
string mnc = 4;
string osVersion = 5;
string manufacturer = 6;
string device = 7;
string osBuildNumber = 8;
string phoneID = 9;
ReleaseChannel releaseChannel = 10;
string localeLanguageIso6391 = 11;
string localeCountryIso31661Alpha2 = 12;
string deviceBoard = 13;
string deviceExpID = 14;
DeviceType deviceType = 15;
}
message DevicePairingRegistrationData {
bytes eRegid = 1;
bytes eKeytype = 2;
bytes eIdent = 3;
bytes eSkeyID = 4;
bytes eSkeyVal = 5;
bytes eSkeySig = 6;
bytes buildHash = 7;
bytes deviceProps = 8;
}
uint64 username = 1;
bool passive = 3;
UserAgent userAgent = 5;
WebInfo webInfo = 6;
string pushName = 7;
sfixed32 sessionID = 9;
bool shortConnect = 10;
ConnectType connectType = 12;
ConnectReason connectReason = 13;
repeated int32 shards = 14;
DNSSource dnsSource = 15;
uint32 connectAttemptCount = 16;
uint32 device = 18;
DevicePairingRegistrationData devicePairingData = 19;
Product product = 20;
bytes fbCat = 21;
bytes fbUserAgent = 22;
bool oc = 23;
int32 lc = 24;
IOSAppExtension iosAppExtension = 30;
uint64 fbAppID = 31;
bytes fbDeviceID = 32;
bool pull = 33;
bytes paddingBytes = 34;
int32 yearClass = 36;
int32 memClass = 37;
}
message HandshakeMessage {
message ClientFinish {
bytes static = 1;
bytes payload = 2;
}
message ServerHello {
bytes ephemeral = 1;
bytes static = 2;
bytes payload = 3;
}
message ClientHello {
bytes ephemeral = 1;
bytes static = 2;
bytes payload = 3;
}
ClientHello clientHello = 2;
ServerHello serverHello = 3;
ClientFinish clientFinish = 4;
}

View File

@ -123,6 +123,16 @@ func (au *AttrUtility) GetUnixTime(key string, require bool) (time.Time, bool) {
}
}
func (au *AttrUtility) GetUnixMilli(key string, require bool) (time.Time, bool) {
if intVal, ok := au.GetInt64(key, require); !ok {
return time.Time{}, false
} else if intVal == 0 {
return time.Time{}, true
} else {
return time.UnixMilli(intVal), true
}
}
// OptionalString returns the string under the given key.
func (au *AttrUtility) OptionalString(key string) string {
strVal, _ := au.GetString(key, false)
@ -176,6 +186,16 @@ func (au *AttrUtility) UnixTime(key string) time.Time {
return val
}
func (au *AttrUtility) OptionalUnixMilli(key string) time.Time {
val, _ := au.GetUnixMilli(key, false)
return val
}
func (au *AttrUtility) UnixMilli(key string) time.Time {
val, _ := au.GetUnixMilli(key, true)
return val
}
// OK returns true if there are no errors.
func (au *AttrUtility) OK() bool {
return len(au.Errors) == 0

View File

@ -204,6 +204,10 @@ func (r *binaryDecoder) read(string bool) (interface{}, error) {
}
return token.GetDoubleToken(tag-token.Dictionary0, i)
case token.FBJID:
return r.readFBJID()
case token.InteropJID:
return r.readInteropJID()
case token.JIDPair:
return r.readJIDPair()
case token.ADJID:
@ -234,6 +238,55 @@ func (r *binaryDecoder) readJIDPair() (interface{}, error) {
return types.NewJID(user.(string), server.(string)), nil
}
func (r *binaryDecoder) readInteropJID() (interface{}, error) {
user, err := r.read(true)
if err != nil {
return nil, err
}
device, err := r.readInt16(false)
if err != nil {
return nil, err
}
integrator, err := r.readInt16(false)
if err != nil {
return nil, err
}
server, err := r.read(true)
if err != nil {
return nil, err
} else if server != types.InteropServer {
return nil, fmt.Errorf("%w: expected %q, got %q", ErrInvalidJIDType, types.InteropServer, server)
}
return types.JID{
User: user.(string),
Device: uint16(device),
Integrator: uint16(integrator),
Server: types.InteropServer,
}, nil
}
func (r *binaryDecoder) readFBJID() (interface{}, error) {
user, err := r.read(true)
if err != nil {
return nil, err
}
device, err := r.readInt16(false)
if err != nil {
return nil, err
}
server, err := r.read(true)
if err != nil {
return nil, err
} else if server != types.MessengerServer {
return nil, fmt.Errorf("%w: expected %q, got %q", ErrInvalidJIDType, types.MessengerServer, server)
}
return types.JID{
User: user.(string),
Device: uint16(device),
Server: server.(string),
}, nil
}
func (r *binaryDecoder) readADJID() (interface{}, error) {
agent, err := r.readByte()
if err != nil {

View File

@ -159,11 +159,22 @@ func (w *binaryEncoder) writeStringRaw(value string) {
}
func (w *binaryEncoder) writeJID(jid types.JID) {
if jid.AD {
if (jid.Server == types.DefaultUserServer && jid.Device > 0) || jid.Server == types.HiddenUserServer || jid.Server == types.HostedServer {
w.pushByte(token.ADJID)
w.pushByte(jid.Agent)
w.pushByte(jid.Device)
w.pushByte(jid.ActualAgent())
w.pushByte(uint8(jid.Device))
w.writeString(jid.User)
} else if jid.Server == types.MessengerServer {
w.pushByte(token.FBJID)
w.write(jid.User)
w.pushInt16(int(jid.Device))
w.write(jid.Server)
} else if jid.Server == types.InteropServer {
w.pushByte(token.InteropJID)
w.write(jid.User)
w.pushInt16(int(jid.Device))
w.pushInt16(int(jid.Integrator))
w.write(jid.Server)
} else {
w.pushByte(token.JIDPair)
if len(jid.User) == 0 {

View File

@ -8,11 +8,14 @@
package binary
import (
"encoding/json"
"fmt"
"go.mau.fi/whatsmeow/types"
)
// Attrs is a type alias for the attributes of an XML element (Node).
type Attrs = map[string]interface{}
type Attrs = map[string]any
// Node represents an XML element.
type Node struct {
@ -21,6 +24,53 @@ type Node struct {
Content interface{} // The content inside the element. Can be nil, a list of Nodes, or a byte array.
}
type marshalableNode struct {
Tag string
Attrs Attrs
Content json.RawMessage
}
func (n *Node) UnmarshalJSON(data []byte) error {
var mn marshalableNode
err := json.Unmarshal(data, &mn)
if err != nil {
return err
}
for key, val := range mn.Attrs {
switch typedVal := val.(type) {
case string:
parsed, err := types.ParseJID(typedVal)
if err == nil && parsed.Server == types.DefaultUserServer || parsed.Server == types.NewsletterServer || parsed.Server == types.GroupServer || parsed.Server == types.BroadcastServer {
mn.Attrs[key] = parsed
}
case float64:
mn.Attrs[key] = int64(typedVal)
}
}
n.Tag = mn.Tag
n.Attrs = mn.Attrs
if len(mn.Content) > 0 {
if mn.Content[0] == '[' {
var nodes []Node
err = json.Unmarshal(mn.Content, &nodes)
if err != nil {
return err
}
n.Content = nodes
} else if mn.Content[0] == '"' {
var binaryContent []byte
err = json.Unmarshal(mn.Content, &binaryContent)
if err != nil {
return err
}
n.Content = binaryContent
} else {
return fmt.Errorf("node content must be an array of nodes or a base64 string")
}
}
return nil
}
// GetChildren returns the Content of the node as a list of nodes. If the content is not a list of nodes, this returns nil.
func (n *Node) GetChildren() []Node {
if n.Content == nil {