Bump go.mau.fi/whatsmeow v0.0.0-20240625083845-6acab596dd8c

This commit is contained in:
IntGrah
2024-08-27 11:17:32 +01:00
parent d16645c952
commit d3ade23665
344 changed files with 51582 additions and 43492 deletions

View File

@@ -41,11 +41,11 @@ func (b *Bwhatsapp) handleGroupInfo(event *events.GroupInfo) {
}
func (b *Bwhatsapp) handleUserJoin(event *events.GroupInfo) {
for _, joinedJid := range event.Join {
senderName := b.getSenderNameFromJID(joinedJid)
for _, joinedJID := range event.Join {
senderName := b.getSenderNameFromJID(joinedJID)
rmsg := config.Message{
UserID: joinedJid.String(),
UserID: joinedJID.String(),
Username: senderName,
Channel: event.JID.String(),
Account: b.Account,
@@ -58,11 +58,11 @@ func (b *Bwhatsapp) handleUserJoin(event *events.GroupInfo) {
}
}
func (b *Bwhatsapp) handleUserLeave(event *events.GroupInfo) {
for _, leftJid := range event.Leave {
senderName := b.getSenderNameFromJID(leftJid)
for _, leftJID := range event.Leave {
senderName := b.getSenderNameFromJID(leftJID)
rmsg := config.Message{
UserID: leftJid.String(),
UserID: leftJID.String(),
Username: senderName,
Channel: event.JID.String(),
Account: b.Account,
@@ -76,8 +76,8 @@ func (b *Bwhatsapp) handleUserLeave(event *events.GroupInfo) {
}
func (b *Bwhatsapp) handleTopicChange(event *events.GroupInfo) {
msg := event.Topic
senderJid := msg.TopicSetBy
senderName := b.getSenderNameFromJID(senderJid)
senderJID := msg.TopicSetBy
senderName := b.getSenderNameFromJID(senderJID)
text := msg.Topic
if text == "" {
@@ -85,7 +85,7 @@ func (b *Bwhatsapp) handleTopicChange(event *events.GroupInfo) {
}
rmsg := config.Message{
UserID: senderJid.String(),
UserID: senderJID.String(),
Username: senderName,
Channel: event.JID.String(),
Account: b.Account,
@@ -151,9 +151,9 @@ func (b *Bwhatsapp) handleTextMessage(messageInfo types.MessageInfo, msg *proto.
senderJID = types.NewJID(ci.GetParticipant(), types.DefaultUserServer)
}
if ci.MentionedJid != nil {
if ci.MentionedJID != nil {
// handle user mentions
for _, mentionedJID := range ci.MentionedJid {
for _, mentionedJID := range ci.MentionedJID {
numberAndSuffix := strings.SplitN(mentionedJID, "@", 2)
// mentions comes as telephone numbers and we don't want to expose it to other bridges
@@ -441,10 +441,10 @@ func (b *Bwhatsapp) handleDelete(messageInfo *proto.ProtocolMessage) {
rmsg := config.Message{
Account: b.Account,
Protocol: b.Protocol,
ID: getMessageIdFormat(sender, *messageInfo.Key.Id),
ID: getMessageIdFormat(sender, *messageInfo.Key.ID),
Event: config.EventMsgDelete,
Text: config.EventMsgDelete,
Channel: *messageInfo.Key.RemoteJid,
Channel: *messageInfo.Key.RemoteJID,
}
b.Log.Debugf("<= Sending message from %s to gateway", b.Account)

View File

@@ -157,7 +157,7 @@ func (b *Bwhatsapp) getNewReplyContext(parentID string) (*proto.ContextInfo, err
sender := fmt.Sprintf("%s@%s", replyInfo.Sender.User, replyInfo.Sender.Server)
ctx := &proto.ContextInfo{
StanzaId: &replyInfo.MessageID,
StanzaID: &replyInfo.MessageID,
Participant: &sender,
QuotedMessage: &proto.Message{Conversation: goproto.String("")},
}
@@ -191,11 +191,11 @@ func (b *Bwhatsapp) parseMessageID(id string) (*Replyable, error) {
}
func getParentIdFromCtx(ci *proto.ContextInfo) string {
if ci != nil && ci.StanzaId != nil {
if ci != nil && ci.StanzaID != nil {
senderJid, err := types.ParseJID(*ci.Participant)
if err == nil {
return getMessageIdFormat(senderJid, *ci.StanzaId)
return getMessageIdFormat(senderJid, *ci.StanzaID)
}
}

View File

@@ -239,10 +239,10 @@ func (b *Bwhatsapp) PostDocumentMessage(msg config.Message, filetype string) (st
Mimetype: &filetype,
Caption: &caption,
MediaKey: resp.MediaKey,
FileEncSha256: resp.FileEncSHA256,
FileSha256: resp.FileSHA256,
FileEncSHA256: resp.FileEncSHA256,
FileSHA256: resp.FileSHA256,
FileLength: goproto.Uint64(resp.FileLength),
Url: &resp.URL,
URL: &resp.URL,
DirectPath: &resp.DirectPath,
ContextInfo: ctx,
}
@@ -277,10 +277,10 @@ func (b *Bwhatsapp) PostImageMessage(msg config.Message, filetype string) (strin
Mimetype: &filetype,
Caption: &caption,
MediaKey: resp.MediaKey,
FileEncSha256: resp.FileEncSHA256,
FileSha256: resp.FileSHA256,
FileEncSHA256: resp.FileEncSHA256,
FileSHA256: resp.FileSHA256,
FileLength: goproto.Uint64(resp.FileLength),
Url: &resp.URL,
URL: &resp.URL,
DirectPath: &resp.DirectPath,
ContextInfo: ctx,
}
@@ -311,10 +311,10 @@ func (b *Bwhatsapp) PostVideoMessage(msg config.Message, filetype string) (strin
Mimetype: &filetype,
Caption: &caption,
MediaKey: resp.MediaKey,
FileEncSha256: resp.FileEncSHA256,
FileSha256: resp.FileSHA256,
FileEncSHA256: resp.FileEncSHA256,
FileSHA256: resp.FileSHA256,
FileLength: goproto.Uint64(resp.FileLength),
Url: &resp.URL,
URL: &resp.URL,
DirectPath: &resp.DirectPath,
ContextInfo: ctx,
}
@@ -344,10 +344,10 @@ func (b *Bwhatsapp) PostAudioMessage(msg config.Message, filetype string) (strin
message.AudioMessage = &proto.AudioMessage{
Mimetype: &filetype,
MediaKey: resp.MediaKey,
FileEncSha256: resp.FileEncSHA256,
FileSha256: resp.FileSHA256,
FileEncSHA256: resp.FileEncSHA256,
FileSHA256: resp.FileSHA256,
FileLength: goproto.Uint64(resp.FileLength),
Url: &resp.URL,
URL: &resp.URL,
DirectPath: &resp.DirectPath,
ContextInfo: ctx,
}

26
go.mod
View File

@@ -46,18 +46,18 @@ require (
github.com/writeas/go-strip-markdown v2.0.1+incompatible
github.com/yaegashi/msgraph.go v0.1.4
github.com/zfjagann/golang-ring v0.0.0-20220330170733-19bcea1b6289
go.mau.fi/whatsmeow v0.0.0-20240520180327-81f8f07f1dfb
go.mau.fi/whatsmeow v0.0.0-20240625083845-6acab596dd8c
golang.org/x/image v0.16.0
golang.org/x/oauth2 v0.20.0
golang.org/x/text v0.15.0
golang.org/x/text v0.17.0
gomod.garykim.dev/nc-talk v0.3.0
google.golang.org/protobuf v1.33.0
google.golang.org/protobuf v1.34.2
layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14
modernc.org/sqlite v1.29.10
)
require (
filippo.io/edwards25519 v1.0.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Benau/go_rlottie v0.0.0-20210807002906-98c1b2421989 // indirect
github.com/Jeffail/gabs v1.4.0 // indirect
github.com/apex/log v1.9.0 // indirect
@@ -72,7 +72,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gopackage/ddp v0.0.3 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
@@ -106,7 +106,7 @@ require (
github.com/rickb777/date v1.12.4 // indirect
github.com/rickb777/plural v1.2.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/zerolog v1.32.0 // indirect
github.com/rs/zerolog v1.33.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4 // indirect
@@ -124,14 +124,14 @@ require (
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wiggin77/merror v1.0.5 // indirect
github.com/wiggin77/srslog v1.0.1 // indirect
go.mau.fi/libsignal v0.1.0 // indirect
go.mau.fi/util v0.4.1 // indirect
go.mau.fi/libsignal v0.1.1 // indirect
go.mau.fi/util v0.7.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.62.0 // indirect

142
go.sum
View File

@@ -2,19 +2,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo=
cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic=
cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ=
cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8=
cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI=
cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek=
filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f h1:2dk3eOnYllh+wUOuDhOoC2vUVoJF/5z478ryJ+wzEII=
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f/go.mod h1:4a58ifQTEe2uwwsaqbh3i2un5/CBPg+At/qHpt18Tmk=
@@ -23,7 +16,6 @@ github.com/Benau/go_rlottie v0.0.0-20210807002906-98c1b2421989/go.mod h1:aDWSWjs
github.com/Benau/tgsconverter v0.0.0-20210809170556-99f4a4f6337f h1:aUkwZDEMJIGRcWlSDifSLoKG37UCOH/DPeG52/xwois=
github.com/Benau/tgsconverter v0.0.0-20210809170556-99f4a4f6337f/go.mod h1:AQiQKKI/YIIctvDt3hI3c1S05/JXMM7v/sQcRd0paVE=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
github.com/Jeffail/gabs v1.4.0 h1://5fYRRTq1edjfIrQGvdkcd22pkYUrHZ5YC/H2GJVAo=
github.com/Jeffail/gabs v1.4.0/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=
github.com/Philipp15b/go-steam v1.0.1-0.20200727090957-6ae9b3c0a560 h1:ItnC9PEEMESzTbFayxrhKBbuFQOXDBI8yy7NudTcEWs=
@@ -39,7 +31,6 @@ github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA
github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=
github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=
github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=
github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4=
github.com/av-elier/go-decimal-to-rational v0.0.0-20191127152832-89e6aad02ecf h1:csfEAyvOG4/498Q4SyF48ysFqQC9ESj3o8ppRtg+Rog=
github.com/av-elier/go-decimal-to-rational v0.0.0-20191127152832-89e6aad02ecf/go.mod h1:POPnOeaYF7U9o3PjLTb9icRfEOxjBNLRXh9BLximJGM=
github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
@@ -47,7 +38,6 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
@@ -55,12 +45,7 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7
github.com/bwmarrin/discordgo v0.28.1 h1:gXsuo2GBO7NbR6uqmrrBDplPUx2T3nzu775q/Rd1aG4=
github.com/bwmarrin/discordgo v0.28.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/d5/tengo/v2 v2.17.0 h1:BWUN9NoJzw48jZKiYDXDIF3QrIVZRm1uV1gTzeZ2lqM=
@@ -76,9 +61,7 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m
github.com/dyatlov/go-opengraph/opengraph v0.0.0-20220524092352-606d7b1e5f8a h1:etIrTD8BQqzColk9nKRusM9um5+1q0iOEJLqfBMIK64=
github.com/dyatlov/go-opengraph/opengraph v0.0.0-20220524092352-606d7b1e5f8a/go.mod h1:emQhSYTXqB0xxjLITTw4EaWZ+8IIQYw+kx9GqNUKdLg=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
@@ -98,22 +81,16 @@ github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD
github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho=
github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -149,55 +126,44 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo=
github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gopackage/ddp v0.0.3 h1:fd0DxScoiS+ogq22ktey6DjDSDybtJPAn69geMpUtFc=
github.com/gopackage/ddp v0.0.3/go.mod h1:3hUXYG6C/6JsoxKsQaK7st09+GP9RZBFPzyAlU/0SLg=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/schema v1.3.0 h1:rbciOzXAx3IB8stEFnfTwO3sYa6EWlQk79XdyustPDA=
github.com/gorilla/schema v1.3.0/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM=
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/harmony-development/shibshib v0.0.0-20220101224523-c98059d09cfa h1:0EefSRfsNrdEwmoGVz4+cMG8++5M2XhvJ1tTRmmrJu8=
github.com/harmony-development/shibshib v0.0.0-20220101224523-c98059d09cfa/go.mod h1:+KEOMb29OC2kRa5BajwNM2NEjHTbQA/Z3gKYARLHREI=
github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I=
github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
@@ -207,9 +173,7 @@ github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgb
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kettek/apng v0.0.0-20191108220231-414630eed80f h1:dnCYnTSltLuPMfc7dMrkz2uBUcEf/OFBR8yRh3oRT98=
github.com/kettek/apng v0.0.0-20191108220231-414630eed80f/go.mod h1:x78/VRQYKuCftMWS0uK5e+F5RJ7S4gSlESRWI0Prl6Q=
github.com/keybase/go-keybase-chat-bot v0.0.0-20221220212439-e48d9abd2c20 h1:imPu/fy8VhpzD318SnouRyvIgJAoouEyph6+7XAZbbk=
@@ -217,8 +181,6 @@ github.com/keybase/go-keybase-chat-bot v0.0.0-20221220212439-e48d9abd2c20/go.mod
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -235,10 +197,8 @@ github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+k
github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM=
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lrstanley/girc v0.0.0-20240519163535-a518c5b87a79 h1:6yveo9g55i+VPr+Dinsp/Z7z/msCAq0E+Nag8lTl25k=
github.com/lrstanley/girc v0.0.0-20240519163535-a518c5b87a79/go.mod h1:lgrnhcF8bg/Bd5HA5DOb4Z+uGqUqGnp4skr+J2GwVgI=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
@@ -282,7 +242,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mattn/godown v0.0.1 h1:39uk50ufLVQFs0eapIJVX5fCS74a1Fs2g5f1MVqIHdE=
github.com/mattn/godown v0.0.1/go.mod h1:/ivCKurgV/bx6yqtP/Jtc2Xmrv3beCYBvlfAUl4X5g4=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@@ -292,26 +251,20 @@ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyex
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/monaco-io/request v1.0.5 h1:QAJb5m1pCPZUGv3zzTZn7GlQI3q+uJWi7fH9QxDGbm4=
github.com/monaco-io/request v1.0.5/go.mod h1:EmggwHktBsbJmCgwZXqy7o0H1NNsAstQBWZrFVd3xtQ=
github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8=
github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
github.com/nelsonken/gomf v0.0.0-20190423072027-c65cc0469e94 h1:GRBho7BMw6le5OVegxDeFX+Ul1WPykzQs9CVrifrjik=
github.com/nelsonken/gomf v0.0.0-20190423072027-c65cc0469e94/go.mod h1:UT7a3UHzG7jEEeoW/AI2/e0RuLbkntdsiY94qt6Jv7Q=
github.com/nicksnyder/go-i18n/v2 v2.4.0/go.mod h1:nxYSZE9M0bf3Y70gPQjN9ha7XNHX7gMc814+6wVyEI4=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
@@ -339,11 +292,9 @@ github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -363,26 +314,22 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/rudderlabs/analytics-go v3.3.3+incompatible/go.mod h1:LF8/ty9kUX4PTY3l5c97K3nZZaX5Hwsvt+NBaRL/f30=
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg=
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d h1:hrujxIzL1woJ7AwssoOcM/tq5JjjG2yYOc8odClEiXA=
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU=
github.com/segmentio/backo-go v1.0.1/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4 h1:zwQ1HBo5FYwn1ksMd19qBCKO8JAWE9wmHivEpkw/DvE=
github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4/go.mod h1:vt2jWY/3Qw1bIzle5thrJWucsLuuX9iUNnp20CqCciI=
github.com/shazow/ssh-chat v1.10.1 h1:ePS+ngEYqm+yUuXegDPutysqLV2WoI22XDOeRgI6CE0=
github.com/shazow/ssh-chat v1.10.1/go.mod h1:0+7szsKylcre0vljkVnbuI6q7Odtc+QCDHxa+fFNV54=
github.com/shirou/gopsutil/v3 v3.23.1/go.mod h1:NN6mnm5/0k8jw4cBfCnJtr5L7ErOTg18tMNpgFkn0hA=
github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=
github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=
github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=
@@ -424,7 +371,6 @@ github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
@@ -432,7 +378,6 @@ github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMV
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -446,9 +391,6 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU=
github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k=
github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=
@@ -458,8 +400,6 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
@@ -480,32 +420,22 @@ github.com/writeas/go-strip-markdown v2.0.1+incompatible h1:IIqxTM5Jr7RzhigcL6Fk
github.com/writeas/go-strip-markdown v2.0.1+incompatible/go.mod h1:Rsyu10ZhbEK9pXdk8V6MVnZmTzRG0alMNLMwa0J01fE=
github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c/go.mod h1:UrdRz5enIKZ63MEE3IF9l2/ebyx59GyGgPi+tICQdmM=
github.com/yaegashi/msgraph.go v0.1.4 h1:leDXSczAbwBpYFSmmZrdByTiPoUw8dbTfNMetAjJvbw=
github.com/yaegashi/msgraph.go v0.1.4/go.mod h1:vgeYhHa5skJt/3lTyjGXThTZhwbhRnGo6uUxzoJIGME=
github.com/yaegashi/wtz.go v0.0.2/go.mod h1:nOLA5QXsmdkRxBkP5tljhua13ADHCKirLBrzPf4PEJc=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zfjagann/golang-ring v0.0.0-20220330170733-19bcea1b6289 h1:dEdcEes8Aki8XrgZFyrZvtazFlW4U7eNvX9NuyFJAtQ=
github.com/zfjagann/golang-ring v0.0.0-20220330170733-19bcea1b6289/go.mod h1:0MsIttMJIF/8Y7x0XjonJP7K99t3sR6bjj4m5S4JmqU=
go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI=
go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U=
go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA=
go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc=
go.mau.fi/libsignal v0.1.0 h1:vAKI/nJ5tMhdzke4cTK1fb0idJzz1JuEIpmjprueC+c=
go.mau.fi/libsignal v0.1.0/go.mod h1:R8ovrTezxtUNzCQE5PH30StOQWWeBskBsWE55vMfY9I=
go.mau.fi/util v0.4.1 h1:3EC9KxIXo5+h869zDGf5OOZklRd/FjeVnimTwtm3owg=
go.mau.fi/util v0.4.1/go.mod h1:GjkTEBsehYZbSh2LlE6cWEn+6ZIZTGrTMM/5DMNlmFY=
go.mau.fi/whatsmeow v0.0.0-20240520180327-81f8f07f1dfb h1:FW5W0ewNOmunylB3Pmru8PvxYkhI6ZphCJtimM2aB6o=
go.mau.fi/whatsmeow v0.0.0-20240520180327-81f8f07f1dfb/go.mod h1:0+65CYaE6r4dWzr0dN8i+UZKy0gIfJ79VuSqIl0nKRM=
go.mau.fi/libsignal v0.1.1 h1:m/0PGBh4QKP/I1MQ44ti4C0fMbLMuHb95cmDw01FIpI=
go.mau.fi/libsignal v0.1.1/go.mod h1:QLs89F/OA3ThdSL2Wz2p+o+fi8uuQUz0e1BRa6ExdBw=
go.mau.fi/util v0.7.0 h1:l31z+ivrSQw+cv/9eFebEqtQW2zhxivGypn+JT0h/ws=
go.mau.fi/util v0.7.0/go.mod h1:bWYreIoTULL/UiRbZdfddPh7uWDFW5yX4YCv5FB0eE0=
go.mau.fi/whatsmeow v0.0.0-20240625083845-6acab596dd8c h1:yiULssyKHJcFA1fae2NJkwU7QW4EHQs7QEWoIqfqilA=
go.mau.fi/whatsmeow v0.0.0-20240625083845-6acab596dd8c/go.mod h1:0+65CYaE6r4dWzr0dN8i+UZKy0gIfJ79VuSqIl0nKRM=
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -516,11 +446,11 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw=
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI=
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/image v0.16.0 h1:9kloLAKhUufZhA12l5fwnx2NZW39/we1UhBesW433jw=
golang.org/x/image v0.16.0/go.mod h1:ugSZItdV4nOxyqp56HmXwH0Ry0nBCpjnZdpDaIHdoPs=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -529,8 +459,8 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -547,8 +477,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -564,7 +494,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -587,20 +518,20 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
@@ -615,24 +546,21 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200529172331-a64b76657301/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
gomod.garykim.dev/nc-talk v0.3.0 h1:MZxLc/gX2/+bdOw4xt6pi+qQFUQld1woGfw1hEJ0fbM=
gomod.garykim.dev/nc-talk v0.3.0/go.mod h1:q/Adot/H7iqi+H4lANopV7/xcMf+sX3AZXUXqiITwok=
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=
google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
@@ -640,8 +568,6 @@ google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk
google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
@@ -664,8 +590,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
@@ -694,11 +620,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
layeh.com/gopus v0.0.0-20161224163843-0ebf989153aa/go.mod h1:AOef7vHz0+v4sWwJnr0jSyHiX/1NgsMoaxl+rEPz/I0=
layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14 h1:wY8eeq7DpM5iAugNbFrvuhdtmN8XM1iU+Ki5YZWjukg=
layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14/go.mod h1:tWPVA9ZAfImNwabjcd9uDE+Mtz0Hfs7a7G3vxrnrwyc=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y=
modernc.org/cc/v4 v4.20.0 h1:45Or8mQfbUqJOG9WaxvlFYOAQO0lQ5RvqBcFCXngjxk=
modernc.org/cc/v4 v4.20.0/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ=
modernc.org/ccgo/v3 v3.17.0/go.mod h1:Sg3fwVpmLvCUTaqEUjiBDAvshIaKDB0RXaf+zgqFu8I=
modernc.org/ccgo/v4 v4.16.0 h1:ofwORa6vx2FMm0916/CkZjpFPSR70VwTjUCe2Eg5BnA=
modernc.org/ccgo/v4 v4.16.0/go.mod h1:dkNyWIjFrVIZ68DTo36vHK+6/ShBn4ysU61So6PIqCI=
modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
@@ -723,7 +646,6 @@ modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
rsc.io/goversion v1.2.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo=
rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY=
rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs=
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=

View File

@@ -9,6 +9,6 @@ Read the docs at [pkg.go.dev/filippo.io/edwards25519](https://pkg.go.dev/filippo
The code is originally derived from Adam Langley's internal implementation in the Go standard library, and includes George Tankersley's [performance improvements](https://golang.org/cl/71950). It was then further developed by Henry de Valence for use in ristretto255, and was finally [merged back into the Go standard library](https://golang.org/cl/276272) as of Go 1.17. It now tracks the upstream codebase and extends it with additional functionality.
Most users don't need this package, and should instead use `crypto/ed25519` for signatures, `golang.org/x/crypto/curve25519` for Diffie-Hellman, or `github.com/gtank/ristretto255` for prime order group logic. However, for anyone currently using a fork of `crypto/ed25519/internal/edwards25519` or `github.com/agl/edwards25519`, this package should be a safer, faster, and more powerful alternative.
Most users don't need this package, and should instead use `crypto/ed25519` for signatures, `golang.org/x/crypto/curve25519` for Diffie-Hellman, or `github.com/gtank/ristretto255` for prime order group logic. However, for anyone currently using a fork of `crypto/internal/edwards25519`/`crypto/ed25519/internal/edwards25519` or `github.com/agl/edwards25519`, this package should be a safer, faster, and more powerful alternative.
Since this package is meant to curb proliferation of edwards25519 implementations in the Go ecosystem, it welcomes requests for new APIs or reviewable performance improvements.

View File

@@ -4,7 +4,7 @@
// Package edwards25519 implements group logic for the twisted Edwards curve
//
// -x^2 + y^2 = 1 + -(121665/121666)*x^2*y^2
// -x^2 + y^2 = 1 + -(121665/121666)*x^2*y^2
//
// This is better known as the Edwards curve equivalent to Curve25519, and is
// the curve used by the Ed25519 signature scheme.
@@ -15,6 +15,6 @@
//
// However, developers who do need to interact with low-level edwards25519
// operations can use this package, which is an extended version of
// crypto/ed25519/internal/edwards25519 from the standard library repackaged as
// crypto/internal/edwards25519 from the standard library repackaged as
// an importable module.
package edwards25519

View File

@@ -27,13 +27,13 @@ type projP2 struct {
//
// The zero value is NOT valid, and it may be used only as a receiver.
type Point struct {
// The point is internally represented in extended coordinates (X, Y, Z, T)
// where x = X/Z, y = Y/Z, and xy = T/Z per https://eprint.iacr.org/2008/522.
x, y, z, t field.Element
// Make the type not comparable (i.e. used with == or as a map key), as
// equivalent points can be represented by different Go values.
_ incomparable
// The point is internally represented in extended coordinates (X, Y, Z, T)
// where x = X/Z, y = Y/Z, and xy = T/Z per https://eprint.iacr.org/2008/522.
x, y, z, t field.Element
}
type incomparable [0]func()
@@ -148,9 +148,8 @@ func (v *Point) SetBytes(x []byte) (*Point, error) {
// (*field.Element).SetBytes docs) and
// 2) the ones where the x-coordinate is zero and the sign bit is set.
//
// This is consistent with crypto/ed25519/internal/edwards25519. Read more
// at https://hdevalence.ca/blog/2020-10-04-its-25519am, specifically the
// "Canonical A, R" section.
// Read more at https://hdevalence.ca/blog/2020-10-04-its-25519am,
// specifically the "Canonical A, R" section.
y, err := new(field.Element).SetBytes(x)
if err != nil {

View File

@@ -5,7 +5,7 @@
package edwards25519
// This file contains additional functionality that is not included in the
// upstream crypto/ed25519/internal/edwards25519 package.
// upstream crypto/internal/edwards25519 package.
import (
"errors"
@@ -79,6 +79,12 @@ func isOnCurve(X, Y, Z, T *field.Element) bool {
// Note that BytesMontgomery only encodes the u-coordinate, so v and -v encode
// to the same value. If v is the identity point, BytesMontgomery returns 32
// zero bytes, analogously to the X25519 function.
//
// The lack of an inverse operation (such as SetMontgomeryBytes) is deliberate:
// while every valid edwards25519 point has a unique u-coordinate Montgomery
// encoding, X25519 accepts inputs on the quadratic twist, which don't correspond
// to any edwards25519 point, and every other X25519 input corresponds to two
// edwards25519 points.
func (v *Point) BytesMontgomery() []byte {
// This function is outlined to make the allocations inline in the caller
// rather than happen on the heap.
@@ -137,7 +143,7 @@ func (s *Scalar) Invert(t *Scalar) *Scalar {
for i := 0; i < 7; i++ {
table[i+1].Multiply(&table[i], &tt)
}
// Now table = [t**1, t**3, t**7, t**11, t**13, t**15]
// Now table = [t**1, t**3, t**5, t**7, t**9, t**11, t**13, t**15]
// so t**k = t[k/2] for odd k
// To compute the sliding window digits, use the following Sage script:

View File

@@ -1,13 +1,16 @@
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
//go:build amd64 && gc && !purego
// +build amd64,gc,!purego
package field
// feMul sets out = a * b. It works like feMulGeneric.
//
//go:noescape
func feMul(out *Element, a *Element, b *Element)
// feSquare sets out = a * a. It works like feSquareGeneric.
//
//go:noescape
func feSquare(out *Element, a *Element)

View File

@@ -1,5 +1,6 @@
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
//go:build amd64 && gc && !purego
// +build amd64,gc,!purego
#include "textflag.h"

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build arm64,gc,!purego
//go:build arm64 && gc && !purego
#include "textflag.h"

View File

@@ -7,7 +7,7 @@ package field
import "errors"
// This file contains additional functionality that is not included in the
// upstream crypto/ed25519/internal/edwards25519/field package.
// upstream crypto/ed25519/edwards25519/field package.
// SetWideBytes sets v to x, where x is a 64-byte little-endian encoding, which
// is reduced modulo the field order. If x is not of the right length,

View File

@@ -156,7 +156,7 @@ func feMulGeneric(v, a, b *Element) {
rr4 := r4.lo&maskLow51Bits + c3
// Now all coefficients fit into 64-bit registers but are still too large to
// be passed around as a Element. We therefore do one last carry chain,
// be passed around as an Element. We therefore do one last carry chain,
// where the carries will be small enough to fit in the wiggle room above 2⁵¹.
*v = Element{rr0, rr1, rr2, rr3, rr4}
v.carryPropagate()
@@ -245,7 +245,7 @@ func feSquareGeneric(v, a *Element) {
v.carryPropagate()
}
// carryPropagate brings the limbs below 52 bits by applying the reduction
// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry.
func (v *Element) carryPropagateGeneric() *Element {
c0 := v.l0 >> 51

File diff suppressed because it is too large Load Diff

1147
vendor/filippo.io/edwards25519/scalar_fiat.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -38,9 +38,9 @@ func (v *projLookupTable) FromP3(q *Point) {
tmpP3 := Point{}
tmpP1xP1 := projP1xP1{}
for i := 0; i < 7; i++ {
// Compute (i+1)*Q as Q + i*Q and convert to a ProjCached
// Compute (i+1)*Q as Q + i*Q and convert to a projCached
// This is needlessly complicated because the API has explicit
// recievers instead of creating stack objects and relying on RVO
// receivers instead of creating stack objects and relying on RVO
v.points[i+1].FromP3(tmpP3.fromP1xP1(tmpP1xP1.Add(q, &v.points[i])))
}
}
@@ -53,7 +53,7 @@ func (v *affineLookupTable) FromP3(q *Point) {
tmpP3 := Point{}
tmpP1xP1 := projP1xP1{}
for i := 0; i < 7; i++ {
// Compute (i+1)*Q as Q + i*Q and convert to AffineCached
// Compute (i+1)*Q as Q + i*Q and convert to affineCached
v.points[i+1].FromP3(tmpP3.fromP1xP1(tmpP1xP1.AddAffine(q, &v.points[i])))
}
}

View File

@@ -1,20 +0,0 @@
; https://editorconfig.org/
root = true
[*]
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
indent_style = tab
indent_size = 4
[*.md]
indent_size = 4
trim_trailing_whitespace = false
eclint_indent_style = unset

View File

@@ -1 +1,25 @@
coverage.coverprofile
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
.idea/
*.iml

View File

@@ -1,3 +0,0 @@
run:
skip-dirs:
- examples/*.go

9
vendor/github.com/gorilla/websocket/AUTHORS generated vendored Normal file
View File

@@ -0,0 +1,9 @@
# This is the official list of Gorilla WebSocket authors for copyright
# purposes.
#
# Please keep the list sorted.
Gary Burd <gary@beagledreams.com>
Google LLC (https://opensource.google.com/)
Joachim Bauch <mail@joachim-bauch.de>

View File

@@ -1,27 +1,22 @@
Copyright (c) 2023 The Gorilla Authors. All rights reserved.
Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,34 +0,0 @@
GO_LINT=$(shell which golangci-lint 2> /dev/null || echo '')
GO_LINT_URI=github.com/golangci/golangci-lint/cmd/golangci-lint@latest
GO_SEC=$(shell which gosec 2> /dev/null || echo '')
GO_SEC_URI=github.com/securego/gosec/v2/cmd/gosec@latest
GO_VULNCHECK=$(shell which govulncheck 2> /dev/null || echo '')
GO_VULNCHECK_URI=golang.org/x/vuln/cmd/govulncheck@latest
.PHONY: golangci-lint
golangci-lint:
$(if $(GO_LINT), ,go install $(GO_LINT_URI))
@echo "##### Running golangci-lint"
golangci-lint run -v
.PHONY: gosec
gosec:
$(if $(GO_SEC), ,go install $(GO_SEC_URI))
@echo "##### Running gosec"
gosec -exclude-dir examples ./...
.PHONY: govulncheck
govulncheck:
$(if $(GO_VULNCHECK), ,go install $(GO_VULNCHECK_URI))
@echo "##### Running govulncheck"
govulncheck ./...
.PHONY: verify
verify: golangci-lint gosec govulncheck
.PHONY: test
test:
@echo "##### Running tests"
go test -race -cover -coverprofile=coverage.coverprofile -covermode=atomic -v ./...

View File

@@ -1,13 +1,10 @@
# gorilla/websocket
# Gorilla WebSocket
![testing](https://github.com/gorilla/websocket/actions/workflows/test.yml/badge.svg)
[![codecov](https://codecov.io/github/gorilla/websocket/branch/main/graph/badge.svg)](https://codecov.io/github/gorilla/websocket)
[![godoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket)
[![sourcegraph](https://sourcegraph.com/github.com/gorilla/websocket/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/websocket?badge)
[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket)
[![CircleCI](https://circleci.com/gh/gorilla/websocket.svg?style=svg)](https://circleci.com/gh/gorilla/websocket)
Gorilla WebSocket is a [Go](http://golang.org/) implementation of the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol.
![Gorilla Logo](https://github.com/gorilla/.github/assets/53367916/d92caabf-98e0-473e-bfbf-ab554ba435e5)
Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol.
### Documentation
@@ -17,7 +14,6 @@ Gorilla WebSocket is a [Go](http://golang.org/) implementation of the [WebSocket
* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command)
* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo)
* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch)
* [Write buffer pool example](https://github.com/gorilla/websocket/tree/master/examples/bufferpool)
### Status
@@ -34,3 +30,4 @@ package API is stable.
The Gorilla WebSocket package passes the server tests in the [Autobahn Test
Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn
subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn).

View File

@@ -11,16 +11,13 @@ import (
"errors"
"fmt"
"io"
"log"
"io/ioutil"
"net"
"net/http"
"net/http/httptrace"
"net/url"
"strings"
"time"
"golang.org/x/net/proxy"
)
// ErrBadHandshake is returned when the server response to opening handshake is
@@ -228,7 +225,6 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
k == "Connection" ||
k == "Sec-Websocket-Key" ||
k == "Sec-Websocket-Version" ||
//#nosec G101 (CWE-798): Potential HTTP request smuggling via parameter pollution
k == "Sec-Websocket-Extensions" ||
(k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0):
return nil, nil, errors.New("websocket: duplicate header not allowed: " + k)
@@ -294,9 +290,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
}
err = c.SetDeadline(deadline)
if err != nil {
if err := c.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
c.Close()
return nil, err
}
return c, nil
@@ -310,7 +304,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
return nil, nil, err
}
if proxyURL != nil {
dialer, err := proxy.FromURL(proxyURL, netDialerFunc(netDial))
dialer, err := proxy_FromURL(proxyURL, netDialerFunc(netDial))
if err != nil {
return nil, nil, err
}
@@ -336,9 +330,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
defer func() {
if netConn != nil {
if err := netConn.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
netConn.Close()
}
}()
@@ -408,7 +400,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
// debugging.
buf := make([]byte, 1024)
n, _ := io.ReadFull(resp.Body, buf)
resp.Body = io.NopCloser(bytes.NewReader(buf[:n]))
resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n]))
return nil, resp, ErrBadHandshake
}
@@ -426,19 +418,17 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
break
}
resp.Body = io.NopCloser(bytes.NewReader([]byte{}))
resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{}))
conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol")
if err := netConn.SetDeadline(time.Time{}); err != nil {
return nil, nil, err
}
netConn.SetDeadline(time.Time{})
netConn = nil // to avoid close in defer.
return conn, resp, nil
}
func cloneTLSConfig(cfg *tls.Config) *tls.Config {
if cfg == nil {
return &tls.Config{MinVersion: tls.VersionTLS12}
return &tls.Config{}
}
return cfg.Clone()
}

View File

@@ -8,7 +8,6 @@ import (
"compress/flate"
"errors"
"io"
"log"
"strings"
"sync"
)
@@ -34,9 +33,7 @@ func decompressNoContextTakeover(r io.Reader) io.ReadCloser {
"\x01\x00\x00\xff\xff"
fr, _ := flateReaderPool.Get().(io.ReadCloser)
if err := fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil); err != nil {
panic(err)
}
fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil)
return &flateReadWrapper{fr}
}
@@ -135,9 +132,7 @@ func (r *flateReadWrapper) Read(p []byte) (int, error) {
// Preemptively place the reader back in the pool. This helps with
// scenarios where the application does not call NextReader() soon after
// this final read.
if err := r.Close(); err != nil {
log.Printf("websocket: flateReadWrapper.Close() returned error: %v", err)
}
r.Close()
}
return n, err
}

View File

@@ -6,11 +6,11 @@ package websocket
import (
"bufio"
"crypto/rand"
"encoding/binary"
"errors"
"io"
"log"
"io/ioutil"
"math/rand"
"net"
"strconv"
"strings"
@@ -181,20 +181,13 @@ var (
errInvalidControlFrame = errors.New("websocket: invalid control frame")
)
// maskRand is an io.Reader for generating mask bytes. The reader is initialized
// to crypto/rand Reader. Tests swap the reader to a math/rand reader for
// reproducible results.
var maskRand = rand.Reader
// newMaskKey returns a new 32 bit value for masking client frames.
func newMaskKey() [4]byte {
var k [4]byte
_, _ = io.ReadFull(maskRand, k[:])
return k
n := rand.Uint32()
return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)}
}
func hideTempErr(err error) error {
if e, ok := err.(net.Error); ok {
if e, ok := err.(net.Error); ok && e.Temporary() {
err = &netError{msg: e.Error(), timeout: e.Timeout()}
}
return err
@@ -379,9 +372,7 @@ func (c *Conn) read(n int) ([]byte, error) {
if err == io.EOF {
err = errUnexpectedEOF
}
if _, err := c.br.Discard(len(p)); err != nil {
return p, err
}
c.br.Discard(len(p))
return p, err
}
@@ -396,9 +387,7 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error
return err
}
if err := c.conn.SetWriteDeadline(deadline); err != nil {
return c.writeFatal(err)
}
c.conn.SetWriteDeadline(deadline)
if len(buf1) == 0 {
_, err = c.conn.Write(buf0)
} else {
@@ -408,7 +397,7 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error
return c.writeFatal(err)
}
if frameType == CloseMessage {
_ = c.writeFatal(ErrCloseSent)
c.writeFatal(ErrCloseSent)
}
return nil
}
@@ -449,7 +438,7 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er
d := 1000 * time.Hour
if !deadline.IsZero() {
d = time.Until(deadline)
d = deadline.Sub(time.Now())
if d < 0 {
return errWriteTimeout
}
@@ -471,15 +460,13 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er
return err
}
if err := c.conn.SetWriteDeadline(deadline); err != nil {
return c.writeFatal(err)
}
c.conn.SetWriteDeadline(deadline)
_, err = c.conn.Write(buf)
if err != nil {
return c.writeFatal(err)
}
if messageType == CloseMessage {
_ = c.writeFatal(ErrCloseSent)
c.writeFatal(ErrCloseSent)
}
return err
}
@@ -490,9 +477,7 @@ func (c *Conn) beginMessage(mw *messageWriter, messageType int) error {
// probably better to return an error in this situation, but we cannot
// change this without breaking existing applications.
if c.writer != nil {
if err := c.writer.Close(); err != nil {
log.Printf("websocket: discarding writer close error: %v", err)
}
c.writer.Close()
c.writer = nil
}
@@ -645,7 +630,7 @@ func (w *messageWriter) flushFrame(final bool, extra []byte) error {
}
if final {
_ = w.endMessage(errWriteClosed)
w.endMessage(errWriteClosed)
return nil
}
@@ -810,7 +795,7 @@ func (c *Conn) advanceFrame() (int, error) {
// 1. Skip remainder of previous frame.
if c.readRemaining > 0 {
if _, err := io.CopyN(io.Discard, c.br, c.readRemaining); err != nil {
if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil {
return noFrame, err
}
}
@@ -832,9 +817,7 @@ func (c *Conn) advanceFrame() (int, error) {
rsv2 := p[0]&rsv2Bit != 0
rsv3 := p[0]&rsv3Bit != 0
mask := p[1]&maskBit != 0
if err := c.setReadRemaining(int64(p[1] & 0x7f)); err != nil {
return noFrame, err
}
c.setReadRemaining(int64(p[1] & 0x7f))
c.readDecompress = false
if rsv1 {
@@ -939,9 +922,7 @@ func (c *Conn) advanceFrame() (int, error) {
}
if c.readLimit > 0 && c.readLength > c.readLimit {
if err := c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)); err != nil {
return noFrame, err
}
c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait))
return noFrame, ErrReadLimit
}
@@ -953,9 +934,7 @@ func (c *Conn) advanceFrame() (int, error) {
var payload []byte
if c.readRemaining > 0 {
payload, err = c.read(int(c.readRemaining))
if err := c.setReadRemaining(0); err != nil {
return noFrame, err
}
c.setReadRemaining(0)
if err != nil {
return noFrame, err
}
@@ -1002,9 +981,7 @@ func (c *Conn) handleProtocolError(message string) error {
if len(data) > maxControlFramePayloadSize {
data = data[:maxControlFramePayloadSize]
}
if err := c.WriteControl(CloseMessage, data, time.Now().Add(writeWait)); err != nil {
return err
}
c.WriteControl(CloseMessage, data, time.Now().Add(writeWait))
return errors.New("websocket: " + message)
}
@@ -1021,9 +998,7 @@ func (c *Conn) handleProtocolError(message string) error {
func (c *Conn) NextReader() (messageType int, r io.Reader, err error) {
// Close previous reader, only relevant for decompression.
if c.reader != nil {
if err := c.reader.Close(); err != nil {
log.Printf("websocket: discarding reader close error: %v", err)
}
c.reader.Close()
c.reader = nil
}
@@ -1079,9 +1054,7 @@ func (r *messageReader) Read(b []byte) (int, error) {
}
rem := c.readRemaining
rem -= int64(n)
if err := c.setReadRemaining(rem); err != nil {
return 0, err
}
c.setReadRemaining(rem)
if c.readRemaining > 0 && c.readErr == io.EOF {
c.readErr = errUnexpectedEOF
}
@@ -1121,7 +1094,7 @@ func (c *Conn) ReadMessage() (messageType int, p []byte, err error) {
if err != nil {
return messageType, nil, err
}
p, err = io.ReadAll(r)
p, err = ioutil.ReadAll(r)
return messageType, p, err
}
@@ -1163,9 +1136,7 @@ func (c *Conn) SetCloseHandler(h func(code int, text string) error) {
if h == nil {
h = func(code int, text string) error {
message := FormatCloseMessage(code, "")
if err := c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)); err != nil {
return err
}
c.WriteControl(CloseMessage, message, time.Now().Add(writeWait))
return nil
}
}
@@ -1190,7 +1161,7 @@ func (c *Conn) SetPingHandler(h func(appData string) error) {
err := c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait))
if err == ErrCloseSent {
return nil
} else if _, ok := err.(net.Error); ok {
} else if e, ok := err.(net.Error); ok && e.Temporary() {
return nil
}
return err

View File

@@ -9,7 +9,6 @@ package websocket
import "unsafe"
// #nosec G103 -- (CWE-242) Has been audited
const wordSize = int(unsafe.Sizeof(uintptr(0)))
func maskBytes(key [4]byte, pos int, b []byte) int {
@@ -23,7 +22,6 @@ func maskBytes(key [4]byte, pos int, b []byte) int {
}
// Mask one byte at a time to word boundary.
//#nosec G103 -- (CWE-242) Has been audited
if n := int(uintptr(unsafe.Pointer(&b[0]))) % wordSize; n != 0 {
n = wordSize - n
for i := range b[:n] {
@@ -38,13 +36,11 @@ func maskBytes(key [4]byte, pos int, b []byte) int {
for i := range k {
k[i] = key[(pos+i)&3]
}
//#nosec G103 -- (CWE-242) Has been audited
kw := *(*uintptr)(unsafe.Pointer(&k))
// Mask one word at a time.
n := (len(b) / wordSize) * wordSize
for i := 0; i < n; i += wordSize {
//#nosec G103 -- (CWE-242) Has been audited
*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&b[0])) + uintptr(i))) ^= kw
}

View File

@@ -8,13 +8,10 @@ import (
"bufio"
"encoding/base64"
"errors"
"log"
"net"
"net/http"
"net/url"
"strings"
"golang.org/x/net/proxy"
)
type netDialerFunc func(network, addr string) (net.Conn, error)
@@ -24,7 +21,7 @@ func (fn netDialerFunc) Dial(network, addr string) (net.Conn, error) {
}
func init() {
proxy.RegisterDialerType("http", func(proxyURL *url.URL, forwardDialer proxy.Dialer) (proxy.Dialer, error) {
proxy_RegisterDialerType("http", func(proxyURL *url.URL, forwardDialer proxy_Dialer) (proxy_Dialer, error) {
return &httpProxyDialer{proxyURL: proxyURL, forwardDial: forwardDialer.Dial}, nil
})
}
@@ -58,9 +55,7 @@ func (hpd *httpProxyDialer) Dial(network string, addr string) (net.Conn, error)
}
if err := connectReq.Write(conn); err != nil {
if err := conn.Close(); err != nil {
log.Printf("httpProxyDialer: failed to close connection: %v", err)
}
conn.Close()
return nil, err
}
@@ -69,16 +64,12 @@ func (hpd *httpProxyDialer) Dial(network string, addr string) (net.Conn, error)
br := bufio.NewReader(conn)
resp, err := http.ReadResponse(br, connectReq)
if err != nil {
if err := conn.Close(); err != nil {
log.Printf("httpProxyDialer: failed to close connection: %v", err)
}
conn.Close()
return nil, err
}
if resp.StatusCode != 200 {
if err := conn.Close(); err != nil {
log.Printf("httpProxyDialer: failed to close connection: %v", err)
}
conn.Close()
f := strings.SplitN(resp.Status, " ", 2)
return nil, errors.New(f[1])
}

View File

@@ -8,7 +8,6 @@ import (
"bufio"
"errors"
"io"
"log"
"net/http"
"net/url"
"strings"
@@ -184,9 +183,7 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
}
if brw.Reader.Buffered() > 0 {
if err := netConn.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
netConn.Close()
return nil, errors.New("websocket: client sent data before handshake is complete")
}
@@ -251,34 +248,17 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
p = append(p, "\r\n"...)
// Clear deadlines set by HTTP server.
if err := netConn.SetDeadline(time.Time{}); err != nil {
if err := netConn.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
return nil, err
}
netConn.SetDeadline(time.Time{})
if u.HandshakeTimeout > 0 {
if err := netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)); err != nil {
if err := netConn.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
return nil, err
}
netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout))
}
if _, err = netConn.Write(p); err != nil {
if err := netConn.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
netConn.Close()
return nil, err
}
if u.HandshakeTimeout > 0 {
if err := netConn.SetWriteDeadline(time.Time{}); err != nil {
if err := netConn.Close(); err != nil {
log.Printf("websocket: failed to close network connection: %v", err)
}
return nil, err
}
netConn.SetWriteDeadline(time.Time{})
}
return c, nil
@@ -376,12 +356,8 @@ func bufioWriterBuffer(originalWriter io.Writer, bw *bufio.Writer) []byte {
// bufio.Writer's underlying writer.
var wh writeHook
bw.Reset(&wh)
if err := bw.WriteByte(0); err != nil {
panic(err)
}
if err := bw.Flush(); err != nil {
log.Printf("websocket: bufioWriterBuffer: Flush: %v", err)
}
bw.WriteByte(0)
bw.Flush()
bw.Reset(originalWriter)

View File

@@ -1,3 +1,6 @@
//go:build go1.17
// +build go1.17
package websocket
import (

View File

@@ -0,0 +1,21 @@
//go:build !go1.17
// +build !go1.17
package websocket
import (
"context"
"crypto/tls"
)
func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error {
if err := tlsConn.Handshake(); err != nil {
return err
}
if !cfg.InsecureSkipVerify {
if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
return err
}
}
return nil
}

View File

@@ -6,7 +6,7 @@ package websocket
import (
"crypto/rand"
"crypto/sha1" //#nosec G505 -- (CWE-327) https://datatracker.ietf.org/doc/html/rfc6455#page-54
"crypto/sha1"
"encoding/base64"
"io"
"net/http"
@@ -17,7 +17,7 @@ import (
var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
func computeAcceptKey(challengeKey string) string {
h := sha1.New() //#nosec G401 -- (CWE-326) https://datatracker.ietf.org/doc/html/rfc6455#page-54
h := sha1.New()
h.Write([]byte(challengeKey))
h.Write(keyGUID)
return base64.StdEncoding.EncodeToString(h.Sum(nil))

473
vendor/github.com/gorilla/websocket/x_net_proxy.go generated vendored Normal file
View File

@@ -0,0 +1,473 @@
// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT.
//go:generate bundle -o x_net_proxy.go golang.org/x/net/proxy
// Package proxy provides support for a variety of protocols to proxy network
// data.
//
package websocket
import (
"errors"
"io"
"net"
"net/url"
"os"
"strconv"
"strings"
"sync"
)
type proxy_direct struct{}
// Direct is a direct proxy: one that makes network connections directly.
var proxy_Direct = proxy_direct{}
func (proxy_direct) Dial(network, addr string) (net.Conn, error) {
return net.Dial(network, addr)
}
// A PerHost directs connections to a default Dialer unless the host name
// requested matches one of a number of exceptions.
type proxy_PerHost struct {
def, bypass proxy_Dialer
bypassNetworks []*net.IPNet
bypassIPs []net.IP
bypassZones []string
bypassHosts []string
}
// NewPerHost returns a PerHost Dialer that directs connections to either
// defaultDialer or bypass, depending on whether the connection matches one of
// the configured rules.
func proxy_NewPerHost(defaultDialer, bypass proxy_Dialer) *proxy_PerHost {
return &proxy_PerHost{
def: defaultDialer,
bypass: bypass,
}
}
// Dial connects to the address addr on the given network through either
// defaultDialer or bypass.
func (p *proxy_PerHost) Dial(network, addr string) (c net.Conn, err error) {
host, _, err := net.SplitHostPort(addr)
if err != nil {
return nil, err
}
return p.dialerForRequest(host).Dial(network, addr)
}
func (p *proxy_PerHost) dialerForRequest(host string) proxy_Dialer {
if ip := net.ParseIP(host); ip != nil {
for _, net := range p.bypassNetworks {
if net.Contains(ip) {
return p.bypass
}
}
for _, bypassIP := range p.bypassIPs {
if bypassIP.Equal(ip) {
return p.bypass
}
}
return p.def
}
for _, zone := range p.bypassZones {
if strings.HasSuffix(host, zone) {
return p.bypass
}
if host == zone[1:] {
// For a zone ".example.com", we match "example.com"
// too.
return p.bypass
}
}
for _, bypassHost := range p.bypassHosts {
if bypassHost == host {
return p.bypass
}
}
return p.def
}
// AddFromString parses a string that contains comma-separated values
// specifying hosts that should use the bypass proxy. Each value is either an
// IP address, a CIDR range, a zone (*.example.com) or a host name
// (localhost). A best effort is made to parse the string and errors are
// ignored.
func (p *proxy_PerHost) AddFromString(s string) {
hosts := strings.Split(s, ",")
for _, host := range hosts {
host = strings.TrimSpace(host)
if len(host) == 0 {
continue
}
if strings.Contains(host, "/") {
// We assume that it's a CIDR address like 127.0.0.0/8
if _, net, err := net.ParseCIDR(host); err == nil {
p.AddNetwork(net)
}
continue
}
if ip := net.ParseIP(host); ip != nil {
p.AddIP(ip)
continue
}
if strings.HasPrefix(host, "*.") {
p.AddZone(host[1:])
continue
}
p.AddHost(host)
}
}
// AddIP specifies an IP address that will use the bypass proxy. Note that
// this will only take effect if a literal IP address is dialed. A connection
// to a named host will never match an IP.
func (p *proxy_PerHost) AddIP(ip net.IP) {
p.bypassIPs = append(p.bypassIPs, ip)
}
// AddNetwork specifies an IP range that will use the bypass proxy. Note that
// this will only take effect if a literal IP address is dialed. A connection
// to a named host will never match.
func (p *proxy_PerHost) AddNetwork(net *net.IPNet) {
p.bypassNetworks = append(p.bypassNetworks, net)
}
// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of
// "example.com" matches "example.com" and all of its subdomains.
func (p *proxy_PerHost) AddZone(zone string) {
if strings.HasSuffix(zone, ".") {
zone = zone[:len(zone)-1]
}
if !strings.HasPrefix(zone, ".") {
zone = "." + zone
}
p.bypassZones = append(p.bypassZones, zone)
}
// AddHost specifies a host name that will use the bypass proxy.
func (p *proxy_PerHost) AddHost(host string) {
if strings.HasSuffix(host, ".") {
host = host[:len(host)-1]
}
p.bypassHosts = append(p.bypassHosts, host)
}
// A Dialer is a means to establish a connection.
type proxy_Dialer interface {
// Dial connects to the given address via the proxy.
Dial(network, addr string) (c net.Conn, err error)
}
// Auth contains authentication parameters that specific Dialers may require.
type proxy_Auth struct {
User, Password string
}
// FromEnvironment returns the dialer specified by the proxy related variables in
// the environment.
func proxy_FromEnvironment() proxy_Dialer {
allProxy := proxy_allProxyEnv.Get()
if len(allProxy) == 0 {
return proxy_Direct
}
proxyURL, err := url.Parse(allProxy)
if err != nil {
return proxy_Direct
}
proxy, err := proxy_FromURL(proxyURL, proxy_Direct)
if err != nil {
return proxy_Direct
}
noProxy := proxy_noProxyEnv.Get()
if len(noProxy) == 0 {
return proxy
}
perHost := proxy_NewPerHost(proxy, proxy_Direct)
perHost.AddFromString(noProxy)
return perHost
}
// proxySchemes is a map from URL schemes to a function that creates a Dialer
// from a URL with such a scheme.
var proxy_proxySchemes map[string]func(*url.URL, proxy_Dialer) (proxy_Dialer, error)
// RegisterDialerType takes a URL scheme and a function to generate Dialers from
// a URL with that scheme and a forwarding Dialer. Registered schemes are used
// by FromURL.
func proxy_RegisterDialerType(scheme string, f func(*url.URL, proxy_Dialer) (proxy_Dialer, error)) {
if proxy_proxySchemes == nil {
proxy_proxySchemes = make(map[string]func(*url.URL, proxy_Dialer) (proxy_Dialer, error))
}
proxy_proxySchemes[scheme] = f
}
// FromURL returns a Dialer given a URL specification and an underlying
// Dialer for it to make network requests.
func proxy_FromURL(u *url.URL, forward proxy_Dialer) (proxy_Dialer, error) {
var auth *proxy_Auth
if u.User != nil {
auth = new(proxy_Auth)
auth.User = u.User.Username()
if p, ok := u.User.Password(); ok {
auth.Password = p
}
}
switch u.Scheme {
case "socks5":
return proxy_SOCKS5("tcp", u.Host, auth, forward)
}
// If the scheme doesn't match any of the built-in schemes, see if it
// was registered by another package.
if proxy_proxySchemes != nil {
if f, ok := proxy_proxySchemes[u.Scheme]; ok {
return f(u, forward)
}
}
return nil, errors.New("proxy: unknown scheme: " + u.Scheme)
}
var (
proxy_allProxyEnv = &proxy_envOnce{
names: []string{"ALL_PROXY", "all_proxy"},
}
proxy_noProxyEnv = &proxy_envOnce{
names: []string{"NO_PROXY", "no_proxy"},
}
)
// envOnce looks up an environment variable (optionally by multiple
// names) once. It mitigates expensive lookups on some platforms
// (e.g. Windows).
// (Borrowed from net/http/transport.go)
type proxy_envOnce struct {
names []string
once sync.Once
val string
}
func (e *proxy_envOnce) Get() string {
e.once.Do(e.init)
return e.val
}
func (e *proxy_envOnce) init() {
for _, n := range e.names {
e.val = os.Getenv(n)
if e.val != "" {
return
}
}
}
// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address
// with an optional username and password. See RFC 1928 and RFC 1929.
func proxy_SOCKS5(network, addr string, auth *proxy_Auth, forward proxy_Dialer) (proxy_Dialer, error) {
s := &proxy_socks5{
network: network,
addr: addr,
forward: forward,
}
if auth != nil {
s.user = auth.User
s.password = auth.Password
}
return s, nil
}
type proxy_socks5 struct {
user, password string
network, addr string
forward proxy_Dialer
}
const proxy_socks5Version = 5
const (
proxy_socks5AuthNone = 0
proxy_socks5AuthPassword = 2
)
const proxy_socks5Connect = 1
const (
proxy_socks5IP4 = 1
proxy_socks5Domain = 3
proxy_socks5IP6 = 4
)
var proxy_socks5Errors = []string{
"",
"general failure",
"connection forbidden",
"network unreachable",
"host unreachable",
"connection refused",
"TTL expired",
"command not supported",
"address type not supported",
}
// Dial connects to the address addr on the given network via the SOCKS5 proxy.
func (s *proxy_socks5) Dial(network, addr string) (net.Conn, error) {
switch network {
case "tcp", "tcp6", "tcp4":
default:
return nil, errors.New("proxy: no support for SOCKS5 proxy connections of type " + network)
}
conn, err := s.forward.Dial(s.network, s.addr)
if err != nil {
return nil, err
}
if err := s.connect(conn, addr); err != nil {
conn.Close()
return nil, err
}
return conn, nil
}
// connect takes an existing connection to a socks5 proxy server,
// and commands the server to extend that connection to target,
// which must be a canonical address with a host and port.
func (s *proxy_socks5) connect(conn net.Conn, target string) error {
host, portStr, err := net.SplitHostPort(target)
if err != nil {
return err
}
port, err := strconv.Atoi(portStr)
if err != nil {
return errors.New("proxy: failed to parse port number: " + portStr)
}
if port < 1 || port > 0xffff {
return errors.New("proxy: port number out of range: " + portStr)
}
// the size here is just an estimate
buf := make([]byte, 0, 6+len(host))
buf = append(buf, proxy_socks5Version)
if len(s.user) > 0 && len(s.user) < 256 && len(s.password) < 256 {
buf = append(buf, 2 /* num auth methods */, proxy_socks5AuthNone, proxy_socks5AuthPassword)
} else {
buf = append(buf, 1 /* num auth methods */, proxy_socks5AuthNone)
}
if _, err := conn.Write(buf); err != nil {
return errors.New("proxy: failed to write greeting to SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
if _, err := io.ReadFull(conn, buf[:2]); err != nil {
return errors.New("proxy: failed to read greeting from SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
if buf[0] != 5 {
return errors.New("proxy: SOCKS5 proxy at " + s.addr + " has unexpected version " + strconv.Itoa(int(buf[0])))
}
if buf[1] == 0xff {
return errors.New("proxy: SOCKS5 proxy at " + s.addr + " requires authentication")
}
// See RFC 1929
if buf[1] == proxy_socks5AuthPassword {
buf = buf[:0]
buf = append(buf, 1 /* password protocol version */)
buf = append(buf, uint8(len(s.user)))
buf = append(buf, s.user...)
buf = append(buf, uint8(len(s.password)))
buf = append(buf, s.password...)
if _, err := conn.Write(buf); err != nil {
return errors.New("proxy: failed to write authentication request to SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
if _, err := io.ReadFull(conn, buf[:2]); err != nil {
return errors.New("proxy: failed to read authentication reply from SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
if buf[1] != 0 {
return errors.New("proxy: SOCKS5 proxy at " + s.addr + " rejected username/password")
}
}
buf = buf[:0]
buf = append(buf, proxy_socks5Version, proxy_socks5Connect, 0 /* reserved */)
if ip := net.ParseIP(host); ip != nil {
if ip4 := ip.To4(); ip4 != nil {
buf = append(buf, proxy_socks5IP4)
ip = ip4
} else {
buf = append(buf, proxy_socks5IP6)
}
buf = append(buf, ip...)
} else {
if len(host) > 255 {
return errors.New("proxy: destination host name too long: " + host)
}
buf = append(buf, proxy_socks5Domain)
buf = append(buf, byte(len(host)))
buf = append(buf, host...)
}
buf = append(buf, byte(port>>8), byte(port))
if _, err := conn.Write(buf); err != nil {
return errors.New("proxy: failed to write connect request to SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
if _, err := io.ReadFull(conn, buf[:4]); err != nil {
return errors.New("proxy: failed to read connect reply from SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
failure := "unknown error"
if int(buf[1]) < len(proxy_socks5Errors) {
failure = proxy_socks5Errors[buf[1]]
}
if len(failure) > 0 {
return errors.New("proxy: SOCKS5 proxy at " + s.addr + " failed to connect: " + failure)
}
bytesToDiscard := 0
switch buf[3] {
case proxy_socks5IP4:
bytesToDiscard = net.IPv4len
case proxy_socks5IP6:
bytesToDiscard = net.IPv6len
case proxy_socks5Domain:
_, err := io.ReadFull(conn, buf[:1])
if err != nil {
return errors.New("proxy: failed to read domain length from SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
bytesToDiscard = int(buf[0])
default:
return errors.New("proxy: got unknown address type " + strconv.Itoa(int(buf[3])) + " from SOCKS5 proxy at " + s.addr)
}
if cap(buf) < bytesToDiscard {
buf = make([]byte, bytesToDiscard)
} else {
buf = buf[:bytesToDiscard]
}
if _, err := io.ReadFull(conn, buf); err != nil {
return errors.New("proxy: failed to read address from SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
// Also need to discard the port number
if _, err := io.ReadFull(conn, buf[:2]); err != nil {
return errors.New("proxy: failed to read port from SOCKS5 proxy at " + s.addr + ": " + err.Error())
}
return nil
}

View File

@@ -60,7 +60,7 @@ func main() {
// Output: {"time":1516134303,"level":"debug","message":"hello world"}
```
> Note: By default log writes to `os.Stderr`
> Note: The default log level for `log.Print` is *debug*
> Note: The default log level for `log.Print` is *trace*
### Contextual Logging
@@ -412,15 +412,7 @@ Equivalent of `Lshortfile`:
```go
zerolog.CallerMarshalFunc = func(pc uintptr, file string, line int) string {
short := file
for i := len(file) - 1; i > 0; i-- {
if file[i] == '/' {
short = file[i+1:]
break
}
}
file = short
return file + ":" + strconv.Itoa(line)
return filepath.Base(file) + ":" + strconv.Itoa(line)
}
log.Logger = log.With().Caller().Logger()
log.Info().Msg("hello world")
@@ -646,10 +638,14 @@ Some settings can be changed and will be applied to all loggers:
* `zerolog.LevelFieldName`: Can be set to customize level field name.
* `zerolog.MessageFieldName`: Can be set to customize message field name.
* `zerolog.ErrorFieldName`: Can be set to customize `Err` field name.
* `zerolog.TimeFieldFormat`: Can be set to customize `Time` field value formatting. If set with `zerolog.TimeFormatUnix`, `zerolog.TimeFormatUnixMs` or `zerolog.TimeFormatUnixMicro`, times are formated as UNIX timestamp.
* `zerolog.TimeFieldFormat`: Can be set to customize `Time` field value formatting. If set with `zerolog.TimeFormatUnix`, `zerolog.TimeFormatUnixMs` or `zerolog.TimeFormatUnixMicro`, times are formatted as UNIX timestamp.
* `zerolog.DurationFieldUnit`: Can be set to customize the unit for time.Duration type fields added by `Dur` (default: `time.Millisecond`).
* `zerolog.DurationFieldInteger`: If set to `true`, `Dur` fields are formatted as integers instead of floats (default: `false`).
* `zerolog.ErrorHandler`: Called whenever zerolog fails to write an event on its output. If not set, an error is printed on the stderr. This handler must be thread safe and non-blocking.
* `zerolog.FloatingPointPrecision`: If set to a value other than -1, controls the number
of digits when formatting float numbers in JSON. See
[strconv.FormatFloat](https://pkg.go.dev/strconv#FormatFloat)
for more details.
## Field Types

View File

@@ -183,13 +183,13 @@ func (a *Array) Uint64(i uint64) *Array {
// Float32 appends f as a float32 to the array.
func (a *Array) Float32(f float32) *Array {
a.buf = enc.AppendFloat32(enc.AppendArrayDelim(a.buf), f)
a.buf = enc.AppendFloat32(enc.AppendArrayDelim(a.buf), f, FloatingPointPrecision)
return a
}
// Float64 appends f as a float64 to the array.
func (a *Array) Float64(f float64) *Array {
a.buf = enc.AppendFloat64(enc.AppendArrayDelim(a.buf), f)
a.buf = enc.AppendFloat64(enc.AppendArrayDelim(a.buf), f, FloatingPointPrecision)
return a
}
@@ -201,7 +201,7 @@ func (a *Array) Time(t time.Time) *Array {
// Dur appends d to the array.
func (a *Array) Dur(d time.Duration) *Array {
a.buf = enc.AppendDuration(enc.AppendArrayDelim(a.buf), d, DurationFieldUnit, DurationFieldInteger)
a.buf = enc.AppendDuration(enc.AppendArrayDelim(a.buf), d, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
return a
}

View File

@@ -28,6 +28,8 @@ const (
colorBold = 1
colorDarkGray = 90
unknownLevel = "???"
)
var (
@@ -57,12 +59,21 @@ type ConsoleWriter struct {
// TimeFormat specifies the format for timestamp in output.
TimeFormat string
// TimeLocation tells ConsoleWriters default FormatTimestamp
// how to localize the time.
TimeLocation *time.Location
// PartsOrder defines the order of parts in output.
PartsOrder []string
// PartsExclude defines parts to not display in output.
PartsExclude []string
// FieldsOrder defines the order of contextual fields in output.
FieldsOrder []string
fieldIsOrdered map[string]int
// FieldsExclude defines contextual fields to not display in output.
FieldsExclude []string
@@ -83,9 +94,9 @@ type ConsoleWriter struct {
// NewConsoleWriter creates and initializes a new ConsoleWriter.
func NewConsoleWriter(options ...func(w *ConsoleWriter)) ConsoleWriter {
w := ConsoleWriter{
Out: os.Stdout,
TimeFormat: consoleDefaultTimeFormat,
PartsOrder: consoleDefaultPartsOrder(),
Out: os.Stdout,
TimeFormat: consoleDefaultTimeFormat,
PartsOrder: consoleDefaultPartsOrder(),
}
for _, opt := range options {
@@ -185,7 +196,12 @@ func (w ConsoleWriter) writeFields(evt map[string]interface{}, buf *bytes.Buffer
}
fields = append(fields, field)
}
sort.Strings(fields)
if len(w.FieldsOrder) > 0 {
w.orderFields(fields)
} else {
sort.Strings(fields)
}
// Write space only if something has already been written to the buffer, and if there are fields.
if buf.Len() > 0 && len(fields) > 0 {
@@ -284,7 +300,7 @@ func (w ConsoleWriter) writePart(buf *bytes.Buffer, evt map[string]interface{},
}
case TimestampFieldName:
if w.FormatTimestamp == nil {
f = consoleDefaultFormatTimestamp(w.TimeFormat, w.NoColor)
f = consoleDefaultFormatTimestamp(w.TimeFormat, w.TimeLocation, w.NoColor)
} else {
f = w.FormatTimestamp
}
@@ -318,6 +334,32 @@ func (w ConsoleWriter) writePart(buf *bytes.Buffer, evt map[string]interface{},
}
}
// orderFields takes an array of field names and an array representing field order
// and returns an array with any ordered fields at the beginning, in order,
// and the remaining fields after in their original order.
func (w ConsoleWriter) orderFields(fields []string) {
if w.fieldIsOrdered == nil {
w.fieldIsOrdered = make(map[string]int)
for i, fieldName := range w.FieldsOrder {
w.fieldIsOrdered[fieldName] = i
}
}
sort.Slice(fields, func(i, j int) bool {
ii, iOrdered := w.fieldIsOrdered[fields[i]]
jj, jOrdered := w.fieldIsOrdered[fields[j]]
if iOrdered && jOrdered {
return ii < jj
}
if iOrdered {
return true
}
if jOrdered {
return false
}
return fields[i] < fields[j]
})
}
// needsQuote returns true when the string s should be quoted in output.
func needsQuote(s string) bool {
for i := range s {
@@ -352,19 +394,23 @@ func consoleDefaultPartsOrder() []string {
}
}
func consoleDefaultFormatTimestamp(timeFormat string, noColor bool) Formatter {
func consoleDefaultFormatTimestamp(timeFormat string, location *time.Location, noColor bool) Formatter {
if timeFormat == "" {
timeFormat = consoleDefaultTimeFormat
}
if location == nil {
location = time.Local
}
return func(i interface{}) string {
t := "<nil>"
switch tt := i.(type) {
case string:
ts, err := time.ParseInLocation(TimeFieldFormat, tt, time.Local)
ts, err := time.ParseInLocation(TimeFieldFormat, tt, location)
if err != nil {
t = tt
} else {
t = ts.Local().Format(timeFormat)
t = ts.In(location).Format(timeFormat)
}
case json.Number:
i, err := tt.Int64()
@@ -385,32 +431,37 @@ func consoleDefaultFormatTimestamp(timeFormat string, noColor bool) Formatter {
}
ts := time.Unix(sec, nsec)
t = ts.Format(timeFormat)
t = ts.In(location).Format(timeFormat)
}
}
return colorize(t, colorDarkGray, noColor)
}
}
func stripLevel(ll string) string {
if len(ll) == 0 {
return unknownLevel
}
if len(ll) > 3 {
ll = ll[:3]
}
return strings.ToUpper(ll)
}
func consoleDefaultFormatLevel(noColor bool) Formatter {
return func(i interface{}) string {
var l string
if ll, ok := i.(string); ok {
level, _ := ParseLevel(ll)
fl, ok := FormattedLevels[level]
if ok {
l = colorize(fl, LevelColors[level], noColor)
} else {
l = strings.ToUpper(ll)[0:3]
}
} else {
if i == nil {
l = "???"
} else {
l = strings.ToUpper(fmt.Sprintf("%s", i))[0:3]
return colorize(fl, LevelColors[level], noColor)
}
return stripLevel(ll)
}
return l
if i == nil {
return unknownLevel
}
return stripLevel(fmt.Sprintf("%s", i))
}
}

View File

@@ -325,25 +325,25 @@ func (c Context) Uints64(key string, i []uint64) Context {
// Float32 adds the field key with f as a float32 to the logger context.
func (c Context) Float32(key string, f float32) Context {
c.l.context = enc.AppendFloat32(enc.AppendKey(c.l.context, key), f)
c.l.context = enc.AppendFloat32(enc.AppendKey(c.l.context, key), f, FloatingPointPrecision)
return c
}
// Floats32 adds the field key with f as a []float32 to the logger context.
func (c Context) Floats32(key string, f []float32) Context {
c.l.context = enc.AppendFloats32(enc.AppendKey(c.l.context, key), f)
c.l.context = enc.AppendFloats32(enc.AppendKey(c.l.context, key), f, FloatingPointPrecision)
return c
}
// Float64 adds the field key with f as a float64 to the logger context.
func (c Context) Float64(key string, f float64) Context {
c.l.context = enc.AppendFloat64(enc.AppendKey(c.l.context, key), f)
c.l.context = enc.AppendFloat64(enc.AppendKey(c.l.context, key), f, FloatingPointPrecision)
return c
}
// Floats64 adds the field key with f as a []float64 to the logger context.
func (c Context) Floats64(key string, f []float64) Context {
c.l.context = enc.AppendFloats64(enc.AppendKey(c.l.context, key), f)
c.l.context = enc.AppendFloats64(enc.AppendKey(c.l.context, key), f, FloatingPointPrecision)
return c
}
@@ -365,13 +365,13 @@ func (c Context) Timestamp() Context {
return c
}
// Time adds the field key with t formated as string using zerolog.TimeFieldFormat.
// Time adds the field key with t formatted as string using zerolog.TimeFieldFormat.
func (c Context) Time(key string, t time.Time) Context {
c.l.context = enc.AppendTime(enc.AppendKey(c.l.context, key), t, TimeFieldFormat)
return c
}
// Times adds the field key with t formated as string using zerolog.TimeFieldFormat.
// Times adds the field key with t formatted as string using zerolog.TimeFieldFormat.
func (c Context) Times(key string, t []time.Time) Context {
c.l.context = enc.AppendTimes(enc.AppendKey(c.l.context, key), t, TimeFieldFormat)
return c
@@ -379,13 +379,13 @@ func (c Context) Times(key string, t []time.Time) Context {
// Dur adds the fields key with d divided by unit and stored as a float.
func (c Context) Dur(key string, d time.Duration) Context {
c.l.context = enc.AppendDuration(enc.AppendKey(c.l.context, key), d, DurationFieldUnit, DurationFieldInteger)
c.l.context = enc.AppendDuration(enc.AppendKey(c.l.context, key), d, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
return c
}
// Durs adds the fields key with d divided by unit and stored as a float.
func (c Context) Durs(key string, d []time.Duration) Context {
c.l.context = enc.AppendDurations(enc.AppendKey(c.l.context, key), d, DurationFieldUnit, DurationFieldInteger)
c.l.context = enc.AppendDurations(enc.AppendKey(c.l.context, key), d, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
return c
}
@@ -409,6 +409,12 @@ func (c Context) Any(key string, i interface{}) Context {
return c.Interface(key, i)
}
// Reset removes all the context fields.
func (c Context) Reset() Context {
c.l.context = enc.AppendBeginMarker(make([]byte, 0, 500))
return c
}
type callerHook struct {
callerSkipFrameCount int
}

View File

@@ -13,13 +13,13 @@ type encoder interface {
AppendBool(dst []byte, val bool) []byte
AppendBools(dst []byte, vals []bool) []byte
AppendBytes(dst, s []byte) []byte
AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool) []byte
AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool) []byte
AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool, precision int) []byte
AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool, precision int) []byte
AppendEndMarker(dst []byte) []byte
AppendFloat32(dst []byte, val float32) []byte
AppendFloat64(dst []byte, val float64) []byte
AppendFloats32(dst []byte, vals []float32) []byte
AppendFloats64(dst []byte, vals []float64) []byte
AppendFloat32(dst []byte, val float32, precision int) []byte
AppendFloat64(dst []byte, val float64, precision int) []byte
AppendFloats32(dst []byte, vals []float32, precision int) []byte
AppendFloats64(dst []byte, vals []float64, precision int) []byte
AppendHex(dst, s []byte) []byte
AppendIPAddr(dst []byte, ip net.IP) []byte
AppendIPPrefix(dst []byte, pfx net.IPNet) []byte

View File

@@ -644,7 +644,7 @@ func (e *Event) Float32(key string, f float32) *Event {
if e == nil {
return e
}
e.buf = enc.AppendFloat32(enc.AppendKey(e.buf, key), f)
e.buf = enc.AppendFloat32(enc.AppendKey(e.buf, key), f, FloatingPointPrecision)
return e
}
@@ -653,7 +653,7 @@ func (e *Event) Floats32(key string, f []float32) *Event {
if e == nil {
return e
}
e.buf = enc.AppendFloats32(enc.AppendKey(e.buf, key), f)
e.buf = enc.AppendFloats32(enc.AppendKey(e.buf, key), f, FloatingPointPrecision)
return e
}
@@ -662,7 +662,7 @@ func (e *Event) Float64(key string, f float64) *Event {
if e == nil {
return e
}
e.buf = enc.AppendFloat64(enc.AppendKey(e.buf, key), f)
e.buf = enc.AppendFloat64(enc.AppendKey(e.buf, key), f, FloatingPointPrecision)
return e
}
@@ -671,7 +671,7 @@ func (e *Event) Floats64(key string, f []float64) *Event {
if e == nil {
return e
}
e.buf = enc.AppendFloats64(enc.AppendKey(e.buf, key), f)
e.buf = enc.AppendFloats64(enc.AppendKey(e.buf, key), f, FloatingPointPrecision)
return e
}
@@ -713,7 +713,7 @@ func (e *Event) Dur(key string, d time.Duration) *Event {
if e == nil {
return e
}
e.buf = enc.AppendDuration(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger)
e.buf = enc.AppendDuration(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
return e
}
@@ -724,7 +724,7 @@ func (e *Event) Durs(key string, d []time.Duration) *Event {
if e == nil {
return e
}
e.buf = enc.AppendDurations(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger)
e.buf = enc.AppendDurations(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
return e
}
@@ -739,7 +739,7 @@ func (e *Event) TimeDiff(key string, t time.Time, start time.Time) *Event {
if t.After(start) {
d = t.Sub(start)
}
e.buf = enc.AppendDuration(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger)
e.buf = enc.AppendDuration(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
return e
}

View File

@@ -139,13 +139,13 @@ func appendFieldList(dst []byte, kvList []interface{}, stack bool) []byte {
case uint64:
dst = enc.AppendUint64(dst, val)
case float32:
dst = enc.AppendFloat32(dst, val)
dst = enc.AppendFloat32(dst, val, FloatingPointPrecision)
case float64:
dst = enc.AppendFloat64(dst, val)
dst = enc.AppendFloat64(dst, val, FloatingPointPrecision)
case time.Time:
dst = enc.AppendTime(dst, val, TimeFieldFormat)
case time.Duration:
dst = enc.AppendDuration(dst, val, DurationFieldUnit, DurationFieldInteger)
dst = enc.AppendDuration(dst, val, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
case *string:
if val != nil {
dst = enc.AppendString(dst, *val)
@@ -220,13 +220,13 @@ func appendFieldList(dst []byte, kvList []interface{}, stack bool) []byte {
}
case *float32:
if val != nil {
dst = enc.AppendFloat32(dst, *val)
dst = enc.AppendFloat32(dst, *val, FloatingPointPrecision)
} else {
dst = enc.AppendNil(dst)
}
case *float64:
if val != nil {
dst = enc.AppendFloat64(dst, *val)
dst = enc.AppendFloat64(dst, *val, FloatingPointPrecision)
} else {
dst = enc.AppendNil(dst)
}
@@ -238,7 +238,7 @@ func appendFieldList(dst []byte, kvList []interface{}, stack bool) []byte {
}
case *time.Duration:
if val != nil {
dst = enc.AppendDuration(dst, *val, DurationFieldUnit, DurationFieldInteger)
dst = enc.AppendDuration(dst, *val, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
} else {
dst = enc.AppendNil(dst)
}
@@ -267,13 +267,13 @@ func appendFieldList(dst []byte, kvList []interface{}, stack bool) []byte {
case []uint64:
dst = enc.AppendUints64(dst, val)
case []float32:
dst = enc.AppendFloats32(dst, val)
dst = enc.AppendFloats32(dst, val, FloatingPointPrecision)
case []float64:
dst = enc.AppendFloats64(dst, val)
dst = enc.AppendFloats64(dst, val, FloatingPointPrecision)
case []time.Time:
dst = enc.AppendTimes(dst, val, TimeFieldFormat)
case []time.Duration:
dst = enc.AppendDurations(dst, val, DurationFieldUnit, DurationFieldInteger)
dst = enc.AppendDurations(dst, val, DurationFieldUnit, DurationFieldInteger, FloatingPointPrecision)
case nil:
dst = enc.AppendNil(dst)
case net.IP:

View File

@@ -1,6 +1,7 @@
package zerolog
import (
"bytes"
"encoding/json"
"strconv"
"sync/atomic"
@@ -81,8 +82,22 @@ var (
}
// InterfaceMarshalFunc allows customization of interface marshaling.
// Default: "encoding/json.Marshal"
InterfaceMarshalFunc = json.Marshal
// Default: "encoding/json.Marshal" with disabled HTML escaping
InterfaceMarshalFunc = func(v interface{}) ([]byte, error) {
var buf bytes.Buffer
encoder := json.NewEncoder(&buf)
encoder.SetEscapeHTML(false)
err := encoder.Encode(v)
if err != nil {
return nil, err
}
b := buf.Bytes()
if len(b) > 0 {
// Remove trailing \n which is added by Encode.
return b[:len(b)-1], nil
}
return b, nil
}
// TimeFieldFormat defines the time format of the Time field type. If set to
// TimeFormatUnix, TimeFormatUnixMs, TimeFormatUnixMicro or TimeFormatUnixNano, the time is formatted as a UNIX
@@ -136,6 +151,11 @@ var (
// TriggerLevelWriterBufferReuseLimit is a limit in bytes that a buffer is dropped
// from the TriggerLevelWriter buffer pool if the buffer grows above the limit.
TriggerLevelWriterBufferReuseLimit = 64 * 1024
// FloatingPointPrecision, if set to a value other than -1, controls the number
// of digits when formatting float numbers in JSON. See strconv.FormatFloat for
// more details.
FloatingPointPrecision = -1
)
var (

View File

@@ -95,7 +95,7 @@ func decodeFloat(src *bufio.Reader) (float64, int) {
switch minor {
case additionalTypeFloat16:
panic(fmt.Errorf("float16 is not suppported in decodeFloat"))
panic(fmt.Errorf("float16 is not supported in decodeFloat"))
case additionalTypeFloat32:
pb := readNBytes(src, 4)

View File

@@ -29,7 +29,7 @@ func (e Encoder) appendFloatTimestamp(dst []byte, t time.Time) []byte {
nanos := t.Nanosecond()
var val float64
val = float64(secs)*1.0 + float64(nanos)*1e-9
return e.AppendFloat64(dst, val)
return e.AppendFloat64(dst, val, -1)
}
// AppendTime encodes and adds a timestamp to the dst byte array.
@@ -64,17 +64,17 @@ func (e Encoder) AppendTimes(dst []byte, vals []time.Time, unused string) []byte
// AppendDuration encodes and adds a duration to the dst byte array.
// useInt field indicates whether to store the duration as seconds (integer) or
// as seconds+nanoseconds (float).
func (e Encoder) AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool) []byte {
func (e Encoder) AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool, unused int) []byte {
if useInt {
return e.AppendInt64(dst, int64(d/unit))
}
return e.AppendFloat64(dst, float64(d)/float64(unit))
return e.AppendFloat64(dst, float64(d)/float64(unit), unused)
}
// AppendDurations encodes and adds an array of durations to the dst byte array.
// useInt field indicates whether to store the duration as seconds (integer) or
// as seconds+nanoseconds (float).
func (e Encoder) AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool) []byte {
func (e Encoder) AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool, unused int) []byte {
major := majorTypeArray
l := len(vals)
if l == 0 {
@@ -87,7 +87,7 @@ func (e Encoder) AppendDurations(dst []byte, vals []time.Duration, unit time.Dur
dst = appendCborTypePrefix(dst, major, uint64(l))
}
for _, d := range vals {
dst = e.AppendDuration(dst, d, unit, useInt)
dst = e.AppendDuration(dst, d, unit, useInt, unused)
}
return dst
}

View File

@@ -352,7 +352,7 @@ func (e Encoder) AppendUints64(dst []byte, vals []uint64) []byte {
}
// AppendFloat32 encodes and inserts a single precision float value into the dst byte array.
func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
func (Encoder) AppendFloat32(dst []byte, val float32, unused int) []byte {
switch {
case math.IsNaN(float64(val)):
return append(dst, "\xfa\x7f\xc0\x00\x00"...)
@@ -372,7 +372,7 @@ func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
}
// AppendFloats32 encodes and inserts an array of single precision float value into the dst byte array.
func (e Encoder) AppendFloats32(dst []byte, vals []float32) []byte {
func (e Encoder) AppendFloats32(dst []byte, vals []float32, unused int) []byte {
major := majorTypeArray
l := len(vals)
if l == 0 {
@@ -385,13 +385,13 @@ func (e Encoder) AppendFloats32(dst []byte, vals []float32) []byte {
dst = appendCborTypePrefix(dst, major, uint64(l))
}
for _, v := range vals {
dst = e.AppendFloat32(dst, v)
dst = e.AppendFloat32(dst, v, unused)
}
return dst
}
// AppendFloat64 encodes and inserts a double precision float value into the dst byte array.
func (Encoder) AppendFloat64(dst []byte, val float64) []byte {
func (Encoder) AppendFloat64(dst []byte, val float64, unused int) []byte {
switch {
case math.IsNaN(val):
return append(dst, "\xfb\x7f\xf8\x00\x00\x00\x00\x00\x00"...)
@@ -412,7 +412,7 @@ func (Encoder) AppendFloat64(dst []byte, val float64) []byte {
}
// AppendFloats64 encodes and inserts an array of double precision float values into the dst byte array.
func (e Encoder) AppendFloats64(dst []byte, vals []float64) []byte {
func (e Encoder) AppendFloats64(dst []byte, vals []float64, unused int) []byte {
major := majorTypeArray
l := len(vals)
if l == 0 {
@@ -425,7 +425,7 @@ func (e Encoder) AppendFloats64(dst []byte, vals []float64) []byte {
dst = appendCborTypePrefix(dst, major, uint64(l))
}
for _, v := range vals {
dst = e.AppendFloat64(dst, v)
dst = e.AppendFloat64(dst, v, unused)
}
return dst
}

View File

@@ -88,24 +88,24 @@ func appendUnixNanoTimes(dst []byte, vals []time.Time, div int64) []byte {
// AppendDuration formats the input duration with the given unit & format
// and appends the encoded string to the input byte slice.
func (e Encoder) AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool) []byte {
func (e Encoder) AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool, precision int) []byte {
if useInt {
return strconv.AppendInt(dst, int64(d/unit), 10)
}
return e.AppendFloat64(dst, float64(d)/float64(unit))
return e.AppendFloat64(dst, float64(d)/float64(unit), precision)
}
// AppendDurations formats the input durations with the given unit & format
// and appends the encoded string list to the input byte slice.
func (e Encoder) AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool) []byte {
func (e Encoder) AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool, precision int) []byte {
if len(vals) == 0 {
return append(dst, '[', ']')
}
dst = append(dst, '[')
dst = e.AppendDuration(dst, vals[0], unit, useInt)
dst = e.AppendDuration(dst, vals[0], unit, useInt, precision)
if len(vals) > 1 {
for _, d := range vals[1:] {
dst = e.AppendDuration(append(dst, ','), d, unit, useInt)
dst = e.AppendDuration(append(dst, ','), d, unit, useInt, precision)
}
}
dst = append(dst, ']')

View File

@@ -299,7 +299,7 @@ func (Encoder) AppendUints64(dst []byte, vals []uint64) []byte {
return dst
}
func appendFloat(dst []byte, val float64, bitSize int) []byte {
func appendFloat(dst []byte, val float64, bitSize, precision int) []byte {
// JSON does not permit NaN or Infinity. A typical JSON encoder would fail
// with an error, but a logging library wants the data to get through so we
// make a tradeoff and store those types as string.
@@ -311,26 +311,47 @@ func appendFloat(dst []byte, val float64, bitSize int) []byte {
case math.IsInf(val, -1):
return append(dst, `"-Inf"`...)
}
return strconv.AppendFloat(dst, val, 'f', -1, bitSize)
// convert as if by es6 number to string conversion
// see also https://cs.opensource.google/go/go/+/refs/tags/go1.20.3:src/encoding/json/encode.go;l=573
strFmt := byte('f')
// If precision is set to a value other than -1, we always just format the float using that precision.
if precision == -1 {
// Use float32 comparisons for underlying float32 value to get precise cutoffs right.
if abs := math.Abs(val); abs != 0 {
if bitSize == 64 && (abs < 1e-6 || abs >= 1e21) || bitSize == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) {
strFmt = 'e'
}
}
}
dst = strconv.AppendFloat(dst, val, strFmt, precision, bitSize)
if strFmt == 'e' {
// Clean up e-09 to e-9
n := len(dst)
if n >= 4 && dst[n-4] == 'e' && dst[n-3] == '-' && dst[n-2] == '0' {
dst[n-2] = dst[n-1]
dst = dst[:n-1]
}
}
return dst
}
// AppendFloat32 converts the input float32 to a string and
// appends the encoded string to the input byte slice.
func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
return appendFloat(dst, float64(val), 32)
func (Encoder) AppendFloat32(dst []byte, val float32, precision int) []byte {
return appendFloat(dst, float64(val), 32, precision)
}
// AppendFloats32 encodes the input float32s to json and
// appends the encoded string list to the input byte slice.
func (Encoder) AppendFloats32(dst []byte, vals []float32) []byte {
func (Encoder) AppendFloats32(dst []byte, vals []float32, precision int) []byte {
if len(vals) == 0 {
return append(dst, '[', ']')
}
dst = append(dst, '[')
dst = appendFloat(dst, float64(vals[0]), 32)
dst = appendFloat(dst, float64(vals[0]), 32, precision)
if len(vals) > 1 {
for _, val := range vals[1:] {
dst = appendFloat(append(dst, ','), float64(val), 32)
dst = appendFloat(append(dst, ','), float64(val), 32, precision)
}
}
dst = append(dst, ']')
@@ -339,21 +360,21 @@ func (Encoder) AppendFloats32(dst []byte, vals []float32) []byte {
// AppendFloat64 converts the input float64 to a string and
// appends the encoded string to the input byte slice.
func (Encoder) AppendFloat64(dst []byte, val float64) []byte {
return appendFloat(dst, val, 64)
func (Encoder) AppendFloat64(dst []byte, val float64, precision int) []byte {
return appendFloat(dst, val, 64, precision)
}
// AppendFloats64 encodes the input float64s to json and
// appends the encoded string list to the input byte slice.
func (Encoder) AppendFloats64(dst []byte, vals []float64) []byte {
func (Encoder) AppendFloats64(dst []byte, vals []float64, precision int) []byte {
if len(vals) == 0 {
return append(dst, '[', ']')
}
dst = append(dst, '[')
dst = appendFloat(dst, vals[0], 64)
dst = appendFloat(dst, vals[0], 64, precision)
if len(vals) > 1 {
for _, val := range vals[1:] {
dst = appendFloat(append(dst, ','), val, 64)
dst = appendFloat(append(dst, ','), val, 64, precision)
}
}
dst = append(dst, ']')

View File

@@ -24,7 +24,7 @@
//
// Sub-loggers let you chain loggers with additional context:
//
// sublogger := log.With().Str("component": "foo").Logger()
// sublogger := log.With().Str("component", "foo").Logger()
// sublogger.Info().Msg("hello world")
// // Output: {"time":1494567715,"level":"info","message":"hello world","component":"foo"}
//

View File

@@ -84,7 +84,7 @@ func (s *BurstSampler) Sample(lvl Level) bool {
}
func (s *BurstSampler) inc() uint32 {
now := time.Now().UnixNano()
now := TimestampFunc().UnixNano()
resetAt := atomic.LoadInt64(&s.resetAt)
var c uint32
if now > resetAt {

View File

@@ -112,7 +112,7 @@ func (j *ProtoBufPreKeySignalMessageSerializer) Serialize(signalMessage *protoco
Message: signalMessage.Message,
}
if !signalMessage.PreKeyID.IsEmpty {
if signalMessage.PreKeyID != nil && !signalMessage.PreKeyID.IsEmpty {
preKeyMessage.PreKeyId = &signalMessage.PreKeyID.Value
}

View File

@@ -318,14 +318,14 @@ func (cli *Client) requestAppStateKeys(ctx context.Context, rawKeyIDs [][]byte)
keyIDs := make([]*waProto.AppStateSyncKeyId, len(rawKeyIDs))
debugKeyIDs := make([]string, len(rawKeyIDs))
for i, keyID := range rawKeyIDs {
keyIDs[i] = &waProto.AppStateSyncKeyId{KeyId: keyID}
keyIDs[i] = &waProto.AppStateSyncKeyId{KeyID: keyID}
debugKeyIDs[i] = hex.EncodeToString(keyID)
}
msg := &waProto.Message{
ProtocolMessage: &waProto.ProtocolMessage{
Type: waProto.ProtocolMessage_APP_STATE_SYNC_KEY_REQUEST.Enum(),
AppStateSyncKeyRequest: &waProto.AppStateSyncKeyRequest{
KeyIds: keyIDs,
KeyIDs: keyIDs,
},
},
}

View File

@@ -257,7 +257,7 @@ func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo Patc
Record: &waProto.SyncdRecord{
Index: &waProto.SyncdIndex{Blob: indexMac},
Value: &waProto.SyncdValue{Blob: append(encryptedContent, valueMac...)},
KeyId: &waProto.KeyId{Id: keyID},
KeyID: &waProto.KeyId{ID: keyID},
},
})
}
@@ -275,11 +275,11 @@ func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo Patc
state.Version += 1
syncdPatch := &waProto.SyncdPatch{
SnapshotMac: state.generateSnapshotMAC(patchInfo.Type, keys.SnapshotMAC),
KeyId: &waProto.KeyId{Id: keyID},
SnapshotMAC: state.generateSnapshotMAC(patchInfo.Type, keys.SnapshotMAC),
KeyID: &waProto.KeyId{ID: keyID},
Mutations: mutations,
}
syncdPatch.PatchMac = generatePatchMAC(syncdPatch, patchInfo.Type, keys.PatchMAC, state.Version)
syncdPatch.PatchMAC = generatePatchMAC(syncdPatch, patchInfo.Type, keys.PatchMAC, state.Version)
result, err := proto.Marshal(syncdPatch)
if err != nil {

View File

@@ -11,10 +11,10 @@ import (
"google.golang.org/protobuf/proto"
"go.mau.fi/whatsmeow/binary/armadillo"
"go.mau.fi/whatsmeow/binary/armadillo/waCommon"
"go.mau.fi/whatsmeow/binary/armadillo/waMsgApplication"
"go.mau.fi/whatsmeow/binary/armadillo/waMsgTransport"
armadillo "go.mau.fi/whatsmeow/proto"
"go.mau.fi/whatsmeow/proto/waCommon"
"go.mau.fi/whatsmeow/proto/waMsgApplication"
"go.mau.fi/whatsmeow/proto/waMsgTransport"
"go.mau.fi/whatsmeow/types"
"go.mau.fi/whatsmeow/types/events"
)

View File

@@ -1 +0,0 @@
e2ee.js

View File

@@ -1,41 +0,0 @@
syntax = "proto3";
package WACommon;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waCommon";
enum FutureProofBehavior {
PLACEHOLDER = 0;
NO_PLACEHOLDER = 1;
IGNORE = 2;
}
message MessageKey {
string remoteJID = 1;
bool fromMe = 2;
string ID = 3;
string participant = 4;
}
message Command {
enum CommandType {
COMMANDTYPE_UNKNOWN = 0;
EVERYONE = 1;
SILENT = 2;
AI = 3;
}
CommandType commandType = 1;
uint32 offset = 2;
uint32 length = 3;
string validationToken = 4;
}
message MessageText {
string text = 1;
repeated string mentionedJID = 2;
repeated Command commands = 3;
}
message SubProtocol {
bytes payload = 1;
int32 version = 2;
}

View File

@@ -1,234 +0,0 @@
syntax = "proto3";
package WAConsumerApplication;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waConsumerApplication";
import "waCommon/WACommon.proto";
message ConsumerApplication {
message Payload {
oneof payload {
Content content = 1;
ApplicationData applicationData = 2;
Signal signal = 3;
SubProtocolPayload subProtocol = 4;
}
}
message SubProtocolPayload {
WACommon.FutureProofBehavior futureProof = 1;
}
message Metadata {
enum SpecialTextSize {
SPECIALTEXTSIZE_UNKNOWN = 0;
SMALL = 1;
MEDIUM = 2;
LARGE = 3;
}
SpecialTextSize specialTextSize = 1;
}
message Signal {
}
message ApplicationData {
oneof applicationContent {
RevokeMessage revoke = 1;
}
}
message Content {
oneof content {
WACommon.MessageText messageText = 1;
ImageMessage imageMessage = 2;
ContactMessage contactMessage = 3;
LocationMessage locationMessage = 4;
ExtendedTextMessage extendedTextMessage = 5;
StatusTextMesage statusTextMessage = 6;
DocumentMessage documentMessage = 7;
AudioMessage audioMessage = 8;
VideoMessage videoMessage = 9;
ContactsArrayMessage contactsArrayMessage = 10;
LiveLocationMessage liveLocationMessage = 11;
StickerMessage stickerMessage = 12;
GroupInviteMessage groupInviteMessage = 13;
ViewOnceMessage viewOnceMessage = 14;
ReactionMessage reactionMessage = 16;
PollCreationMessage pollCreationMessage = 17;
PollUpdateMessage pollUpdateMessage = 18;
EditMessage editMessage = 19;
}
}
message EditMessage {
WACommon.MessageKey key = 1;
WACommon.MessageText message = 2;
int64 timestampMS = 3;
}
message PollAddOptionMessage {
repeated Option pollOption = 1;
}
message PollVoteMessage {
repeated bytes selectedOptions = 1;
int64 senderTimestampMS = 2;
}
message PollEncValue {
bytes encPayload = 1;
bytes encIV = 2;
}
message PollUpdateMessage {
WACommon.MessageKey pollCreationMessageKey = 1;
PollEncValue vote = 2;
PollEncValue addOption = 3;
}
message PollCreationMessage {
bytes encKey = 1;
string name = 2;
repeated Option options = 3;
uint32 selectableOptionsCount = 4;
}
message Option {
string optionName = 1;
}
message ReactionMessage {
WACommon.MessageKey key = 1;
string text = 2;
string groupingKey = 3;
int64 senderTimestampMS = 4;
string reactionMetadataDataclassData = 5;
int32 style = 6;
}
message RevokeMessage {
WACommon.MessageKey key = 1;
}
message ViewOnceMessage {
oneof viewOnceContent {
ImageMessage imageMessage = 1;
VideoMessage videoMessage = 2;
}
}
message GroupInviteMessage {
string groupJID = 1;
string inviteCode = 2;
int64 inviteExpiration = 3;
string groupName = 4;
bytes JPEGThumbnail = 5;
WACommon.MessageText caption = 6;
}
message LiveLocationMessage {
Location location = 1;
uint32 accuracyInMeters = 2;
float speedInMps = 3;
uint32 degreesClockwiseFromMagneticNorth = 4;
WACommon.MessageText caption = 5;
int64 sequenceNumber = 6;
uint32 timeOffset = 7;
}
message ContactsArrayMessage {
string displayName = 1;
repeated ContactMessage contacts = 2;
}
message ContactMessage {
WACommon.SubProtocol contact = 1;
}
message StatusTextMesage {
enum FontType {
SANS_SERIF = 0;
SERIF = 1;
NORICAN_REGULAR = 2;
BRYNDAN_WRITE = 3;
BEBASNEUE_REGULAR = 4;
OSWALD_HEAVY = 5;
}
ExtendedTextMessage text = 1;
fixed32 textArgb = 6;
fixed32 backgroundArgb = 7;
FontType font = 8;
}
message ExtendedTextMessage {
enum PreviewType {
NONE = 0;
VIDEO = 1;
}
WACommon.MessageText text = 1;
string matchedText = 2;
string canonicalURL = 3;
string description = 4;
string title = 5;
WACommon.SubProtocol thumbnail = 6;
PreviewType previewType = 7;
}
message LocationMessage {
Location location = 1;
string address = 2;
}
message StickerMessage {
WACommon.SubProtocol sticker = 1;
}
message DocumentMessage {
WACommon.SubProtocol document = 1;
string fileName = 2;
}
message VideoMessage {
WACommon.SubProtocol video = 1;
WACommon.MessageText caption = 2;
}
message AudioMessage {
WACommon.SubProtocol audio = 1;
bool PTT = 2;
}
message ImageMessage {
WACommon.SubProtocol image = 1;
WACommon.MessageText caption = 2;
}
message InteractiveAnnotation {
oneof action {
Location location = 2;
}
repeated Point polygonVertices = 1;
}
message Point {
double x = 1;
double y = 2;
}
message Location {
double degreesLatitude = 1;
double degreesLongitude = 2;
string name = 3;
}
message MediaPayload {
WACommon.SubProtocol protocol = 1;
}
Payload payload = 1;
Metadata metadata = 2;
}

View File

@@ -1,154 +0,0 @@
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

@@ -1,87 +0,0 @@
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

@@ -1,75 +0,0 @@
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;
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,6 @@
// Package proto contains the compiled protobuf structs from WhatsApp's protobuf schema.
// Package proto contains type aliases for backwards compatibility.
//
// Deprecated: New code should reference the protobuf types in the go.mau.fi/whatsmeow/proto/wa* packages directly.
package proto
//go:generate ./generatelegacy.sh

View File

@@ -0,0 +1,69 @@
#!/usr/bin/env python3
import os
import sys
with open("old-types.txt") as f:
old_types = [line.rstrip("\n") for line in f]
with open("old-enums.txt") as f:
old_enums = [line.rstrip("\n") for line in f]
os.chdir("../../proto")
new_protos = {}
for dir in os.listdir("."):
if not dir.startswith("wa"):
continue
for file in os.listdir(dir):
if file.endswith(".pb.go"):
with open(f"{dir}/{file}") as f:
new_protos[dir] = f.read()
break
match_type_map = {
"HandshakeServerHello": "HandshakeMessage_ServerHello",
"HandshakeClientHello": "HandshakeMessage_ClientHello",
"HandshakeClientFinish": "HandshakeMessage_ClientFinish",
"InteractiveMessage_Header_JpegThumbnail": "InteractiveMessage_Header_JPEGThumbnail",
}
print("// DO NOT MODIFY: Generated by generatelegacy.sh")
print()
print("package proto")
print()
print("import (")
for proto in new_protos.keys():
print(f'\t"go.mau.fi/whatsmeow/proto/{proto}"')
print(")")
print()
print("// Deprecated: use new packages directly")
print("type (")
for type in old_types:
match_type = match_type_map.get(type, type)
for mod, proto in new_protos.items():
if f"type {match_type} " in proto:
print(f"\t{type} = {mod}.{match_type}")
break
elif f"type ContextInfo_{match_type} " in proto:
print(f"\t{type} = {mod}.ContextInfo_{match_type}")
break
else:
print(f"{type} not found")
sys.exit(1)
print(")")
print()
print("// Deprecated: use new packages directly")
print("const (")
for type in old_enums:
for mod, proto in new_protos.items():
if f"\t{type} " in proto:
print(f"\t{type} = {mod}.{type}")
break
elif f"\tContextInfo_{type} " in proto:
print(f"\t{type} = {mod}.ContextInfo_{type}")
break
else:
print(f"{type} not found")
sys.exit(1)
print(")")

View File

@@ -0,0 +1,4 @@
#!/bin/sh
cd $(dirname $0)
python3 generatelegacy.py > legacy.go
goimports -w legacy.go

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,631 @@
ADVEncryptionType_E2EE
ADVEncryptionType_HOSTED
KeepType_UNKNOWN
KeepType_KEEP_FOR_ALL
KeepType_UNDO_KEEP_FOR_ALL
PeerDataOperationRequestType_UPLOAD_STICKER
PeerDataOperationRequestType_SEND_RECENT_STICKER_BOOTSTRAP
PeerDataOperationRequestType_GENERATE_LINK_PREVIEW
PeerDataOperationRequestType_HISTORY_SYNC_ON_DEMAND
PeerDataOperationRequestType_PLACEHOLDER_MESSAGE_RESEND
MediaVisibility_DEFAULT
MediaVisibility_OFF
MediaVisibility_ON
DeviceProps_UNKNOWN
DeviceProps_CHROME
DeviceProps_FIREFOX
DeviceProps_IE
DeviceProps_OPERA
DeviceProps_SAFARI
DeviceProps_EDGE
DeviceProps_DESKTOP
DeviceProps_IPAD
DeviceProps_ANDROID_TABLET
DeviceProps_OHANA
DeviceProps_ALOHA
DeviceProps_CATALINA
DeviceProps_TCL_TV
DeviceProps_IOS_PHONE
DeviceProps_IOS_CATALYST
DeviceProps_ANDROID_PHONE
DeviceProps_ANDROID_AMBIGUOUS
DeviceProps_WEAR_OS
DeviceProps_AR_WRIST
DeviceProps_AR_DEVICE
DeviceProps_UWP
DeviceProps_VR
ImageMessage_USER_IMAGE
ImageMessage_AI_GENERATED
ImageMessage_AI_MODIFIED
HistorySyncNotification_INITIAL_BOOTSTRAP
HistorySyncNotification_INITIAL_STATUS_V3
HistorySyncNotification_FULL
HistorySyncNotification_RECENT
HistorySyncNotification_PUSH_NAME
HistorySyncNotification_NON_BLOCKING_DATA
HistorySyncNotification_ON_DEMAND
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_MONDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_TUESDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_WEDNESDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_THURSDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_FRIDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_SATURDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_SUNDAY
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_GREGORIAN
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_SOLAR_HIJRI
GroupInviteMessage_DEFAULT
GroupInviteMessage_PARENT
ExtendedTextMessage_NONE
ExtendedTextMessage_VIDEO
ExtendedTextMessage_PLACEHOLDER
ExtendedTextMessage_IMAGE
ExtendedTextMessage_DEFAULT
ExtendedTextMessage_PARENT
ExtendedTextMessage_SUB
ExtendedTextMessage_DEFAULT_SUB
ExtendedTextMessage_SYSTEM
ExtendedTextMessage_SYSTEM_TEXT
ExtendedTextMessage_FB_SCRIPT
ExtendedTextMessage_SYSTEM_BOLD
ExtendedTextMessage_MORNINGBREEZE_REGULAR
ExtendedTextMessage_CALISTOGA_REGULAR
ExtendedTextMessage_EXO2_EXTRABOLD
ExtendedTextMessage_COURIERPRIME_BOLD
EventResponseMessage_UNKNOWN
EventResponseMessage_GOING
EventResponseMessage_NOT_GOING
CallLogMessage_REGULAR
CallLogMessage_SCHEDULED_CALL
CallLogMessage_VOICE_CHAT
CallLogMessage_CONNECTED
CallLogMessage_MISSED
CallLogMessage_FAILED
CallLogMessage_REJECTED
CallLogMessage_ACCEPTED_ELSEWHERE
CallLogMessage_ONGOING
CallLogMessage_SILENCED_BY_DND
CallLogMessage_SILENCED_UNKNOWN_CALLER
ButtonsResponseMessage_UNKNOWN
ButtonsResponseMessage_DISPLAY_TEXT
ButtonsMessage_UNKNOWN
ButtonsMessage_EMPTY
ButtonsMessage_TEXT
ButtonsMessage_DOCUMENT
ButtonsMessage_IMAGE
ButtonsMessage_VIDEO
ButtonsMessage_LOCATION
ButtonsMessage_Button_UNKNOWN
ButtonsMessage_Button_RESPONSE
ButtonsMessage_Button_NATIVE_FLOW
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING
BotFeedbackMessage_BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT
BotFeedbackMessage_BOT_FEEDBACK_POSITIVE
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_GENERIC
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_HELPFUL
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_INTERESTING
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_ACCURATE
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_SAFE
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_OTHER
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_REFUSED
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING
BotFeedbackMessage_BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT
BCallMessage_UNKNOWN
BCallMessage_AUDIO
BCallMessage_VIDEO
HydratedTemplateButton_HydratedURLButton_FULL
HydratedTemplateButton_HydratedURLButton_TALL
HydratedTemplateButton_HydratedURLButton_COMPACT
DisappearingMode_UNKNOWN
DisappearingMode_CHAT_SETTING
DisappearingMode_ACCOUNT_SETTING
DisappearingMode_BULK_CHANGE
DisappearingMode_BIZ_SUPPORTS_FB_HOSTING
DisappearingMode_CHANGED_IN_CHAT
DisappearingMode_INITIATED_BY_ME
DisappearingMode_INITIATED_BY_OTHER
DisappearingMode_BIZ_UPGRADE_FB_HOSTING
ContextInfo_ExternalAdReplyInfo_NONE
ContextInfo_ExternalAdReplyInfo_IMAGE
ContextInfo_ExternalAdReplyInfo_VIDEO
ContextInfo_AdReplyInfo_NONE
ContextInfo_AdReplyInfo_IMAGE
ContextInfo_AdReplyInfo_VIDEO
ForwardedNewsletterMessageInfo_UPDATE
ForwardedNewsletterMessageInfo_UPDATE_CARD
ForwardedNewsletterMessageInfo_LINK_CARD
BotPluginMetadata_BING
BotPluginMetadata_GOOGLE
BotPluginMetadata_REELS
BotPluginMetadata_SEARCH
PaymentBackground_UNKNOWN
PaymentBackground_DEFAULT
VideoMessage_NONE
VideoMessage_GIPHY
VideoMessage_TENOR
SecretEncryptedMessage_UNKNOWN
SecretEncryptedMessage_EVENT_EDIT
ScheduledCallEditMessage_UNKNOWN
ScheduledCallEditMessage_CANCEL
ScheduledCallCreationMessage_UNKNOWN
ScheduledCallCreationMessage_VOICE
ScheduledCallCreationMessage_VIDEO
RequestWelcomeMessageMetadata_EMPTY
RequestWelcomeMessageMetadata_NON_EMPTY
ProtocolMessage_REVOKE
ProtocolMessage_EPHEMERAL_SETTING
ProtocolMessage_EPHEMERAL_SYNC_RESPONSE
ProtocolMessage_HISTORY_SYNC_NOTIFICATION
ProtocolMessage_APP_STATE_SYNC_KEY_SHARE
ProtocolMessage_APP_STATE_SYNC_KEY_REQUEST
ProtocolMessage_MSG_FANOUT_BACKFILL_REQUEST
ProtocolMessage_INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC
ProtocolMessage_APP_STATE_FATAL_EXCEPTION_NOTIFICATION
ProtocolMessage_SHARE_PHONE_NUMBER
ProtocolMessage_MESSAGE_EDIT
ProtocolMessage_PEER_DATA_OPERATION_REQUEST_MESSAGE
ProtocolMessage_PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE
ProtocolMessage_REQUEST_WELCOME_MESSAGE
ProtocolMessage_BOT_FEEDBACK_MESSAGE
ProtocolMessage_MEDIA_NOTIFY_MESSAGE
PlaceholderMessage_MASK_LINKED_DEVICES
PinInChatMessage_UNKNOWN_TYPE
PinInChatMessage_PIN_FOR_ALL
PinInChatMessage_UNPIN_FOR_ALL
PaymentInviteMessage_UNKNOWN
PaymentInviteMessage_FBPAY
PaymentInviteMessage_NOVI
PaymentInviteMessage_UPI
OrderMessage_CATALOG
OrderMessage_INQUIRY
OrderMessage_ACCEPTED
OrderMessage_DECLINED
ListResponseMessage_UNKNOWN
ListResponseMessage_SINGLE_SELECT
ListMessage_UNKNOWN
ListMessage_SINGLE_SELECT
ListMessage_PRODUCT_LIST
InvoiceMessage_IMAGE
InvoiceMessage_PDF
InteractiveResponseMessage_Body_DEFAULT
InteractiveResponseMessage_Body_EXTENSIONS_1
InteractiveMessage_ShopMessage_UNKNOWN_SURFACE
InteractiveMessage_ShopMessage_FB
InteractiveMessage_ShopMessage_IG
InteractiveMessage_ShopMessage_WA
PastParticipant_LEFT
PastParticipant_REMOVED
HistorySync_INITIAL_BOOTSTRAP
HistorySync_INITIAL_STATUS_V3
HistorySync_FULL
HistorySync_RECENT
HistorySync_PUSH_NAME
HistorySync_NON_BLOCKING_DATA
HistorySync_ON_DEMAND
HistorySync_IN_WAITLIST
HistorySync_AI_AVAILABLE
GroupParticipant_REGULAR
GroupParticipant_ADMIN
GroupParticipant_SUPERADMIN
Conversation_COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY
Conversation_COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY
Conversation_COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY
MediaRetryNotification_GENERAL_ERROR
MediaRetryNotification_SUCCESS
MediaRetryNotification_NOT_FOUND
MediaRetryNotification_DECRYPTION_ERROR
SyncdMutation_SET
SyncdMutation_REMOVE
StatusPrivacyAction_ALLOW_LIST
StatusPrivacyAction_DENY_LIST
StatusPrivacyAction_CONTACTS
MarketingMessageAction_PERSONALIZED
PatchDebugData_ANDROID
PatchDebugData_SMBA
PatchDebugData_IPHONE
PatchDebugData_SMBI
PatchDebugData_WEB
PatchDebugData_UWP
PatchDebugData_DARWIN
CallLogRecord_NONE
CallLogRecord_SCHEDULED
CallLogRecord_PRIVACY
CallLogRecord_LIGHTWEIGHT
CallLogRecord_REGULAR
CallLogRecord_SCHEDULED_CALL
CallLogRecord_VOICE_CHAT
CallLogRecord_CONNECTED
CallLogRecord_REJECTED
CallLogRecord_CANCELLED
CallLogRecord_ACCEPTEDELSEWHERE
CallLogRecord_MISSED
CallLogRecord_INVALID
CallLogRecord_UNAVAILABLE
CallLogRecord_UPCOMING
CallLogRecord_FAILED
CallLogRecord_ABANDONED
CallLogRecord_ONGOING
BizIdentityInfo_UNKNOWN
BizIdentityInfo_LOW
BizIdentityInfo_HIGH
BizIdentityInfo_ON_PREMISE
BizIdentityInfo_FACEBOOK
BizIdentityInfo_SELF
BizIdentityInfo_BSP
BizAccountLinkInfo_ON_PREMISE
BizAccountLinkInfo_FACEBOOK
BizAccountLinkInfo_ENTERPRISE
ClientPayload_WHATSAPP
ClientPayload_MESSENGER
ClientPayload_INTEROP
ClientPayload_INTEROP_MSGR
ClientPayload_SHARE_EXTENSION
ClientPayload_SERVICE_EXTENSION
ClientPayload_INTENTS_EXTENSION
ClientPayload_CELLULAR_UNKNOWN
ClientPayload_WIFI_UNKNOWN
ClientPayload_CELLULAR_EDGE
ClientPayload_CELLULAR_IDEN
ClientPayload_CELLULAR_UMTS
ClientPayload_CELLULAR_EVDO
ClientPayload_CELLULAR_GPRS
ClientPayload_CELLULAR_HSDPA
ClientPayload_CELLULAR_HSUPA
ClientPayload_CELLULAR_HSPA
ClientPayload_CELLULAR_CDMA
ClientPayload_CELLULAR_1XRTT
ClientPayload_CELLULAR_EHRPD
ClientPayload_CELLULAR_LTE
ClientPayload_CELLULAR_HSPAP
ClientPayload_PUSH
ClientPayload_USER_ACTIVATED
ClientPayload_SCHEDULED
ClientPayload_ERROR_RECONNECT
ClientPayload_NETWORK_SWITCH
ClientPayload_PING_RECONNECT
ClientPayload_UNKNOWN
ClientPayload_WebInfo_WEB_BROWSER
ClientPayload_WebInfo_APP_STORE
ClientPayload_WebInfo_WIN_STORE
ClientPayload_WebInfo_DARWIN
ClientPayload_WebInfo_WIN32
ClientPayload_UserAgent_RELEASE
ClientPayload_UserAgent_BETA
ClientPayload_UserAgent_ALPHA
ClientPayload_UserAgent_DEBUG
ClientPayload_UserAgent_ANDROID
ClientPayload_UserAgent_IOS
ClientPayload_UserAgent_WINDOWS_PHONE
ClientPayload_UserAgent_BLACKBERRY
ClientPayload_UserAgent_BLACKBERRYX
ClientPayload_UserAgent_S40
ClientPayload_UserAgent_S60
ClientPayload_UserAgent_PYTHON_CLIENT
ClientPayload_UserAgent_TIZEN
ClientPayload_UserAgent_ENTERPRISE
ClientPayload_UserAgent_SMB_ANDROID
ClientPayload_UserAgent_KAIOS
ClientPayload_UserAgent_SMB_IOS
ClientPayload_UserAgent_WINDOWS
ClientPayload_UserAgent_WEB
ClientPayload_UserAgent_PORTAL
ClientPayload_UserAgent_GREEN_ANDROID
ClientPayload_UserAgent_GREEN_IPHONE
ClientPayload_UserAgent_BLUE_ANDROID
ClientPayload_UserAgent_BLUE_IPHONE
ClientPayload_UserAgent_FBLITE_ANDROID
ClientPayload_UserAgent_MLITE_ANDROID
ClientPayload_UserAgent_IGLITE_ANDROID
ClientPayload_UserAgent_PAGE
ClientPayload_UserAgent_MACOS
ClientPayload_UserAgent_OCULUS_MSG
ClientPayload_UserAgent_OCULUS_CALL
ClientPayload_UserAgent_MILAN
ClientPayload_UserAgent_CAPI
ClientPayload_UserAgent_WEAROS
ClientPayload_UserAgent_ARDEVICE
ClientPayload_UserAgent_VRDEVICE
ClientPayload_UserAgent_BLUE_WEB
ClientPayload_UserAgent_IPAD
ClientPayload_UserAgent_TEST
ClientPayload_UserAgent_SMART_GLASSES
ClientPayload_UserAgent_PHONE
ClientPayload_UserAgent_TABLET
ClientPayload_UserAgent_DESKTOP
ClientPayload_UserAgent_WEARABLE
ClientPayload_UserAgent_VR
ClientPayload_DNSSource_SYSTEM
ClientPayload_DNSSource_GOOGLE
ClientPayload_DNSSource_HARDCODED
ClientPayload_DNSSource_OVERRIDE
ClientPayload_DNSSource_FALLBACK
WebMessageInfo_UNKNOWN
WebMessageInfo_REVOKE
WebMessageInfo_CIPHERTEXT
WebMessageInfo_FUTUREPROOF
WebMessageInfo_NON_VERIFIED_TRANSITION
WebMessageInfo_UNVERIFIED_TRANSITION
WebMessageInfo_VERIFIED_TRANSITION
WebMessageInfo_VERIFIED_LOW_UNKNOWN
WebMessageInfo_VERIFIED_HIGH
WebMessageInfo_VERIFIED_INITIAL_UNKNOWN
WebMessageInfo_VERIFIED_INITIAL_LOW
WebMessageInfo_VERIFIED_INITIAL_HIGH
WebMessageInfo_VERIFIED_TRANSITION_ANY_TO_NONE
WebMessageInfo_VERIFIED_TRANSITION_ANY_TO_HIGH
WebMessageInfo_VERIFIED_TRANSITION_HIGH_TO_LOW
WebMessageInfo_VERIFIED_TRANSITION_HIGH_TO_UNKNOWN
WebMessageInfo_VERIFIED_TRANSITION_UNKNOWN_TO_LOW
WebMessageInfo_VERIFIED_TRANSITION_LOW_TO_UNKNOWN
WebMessageInfo_VERIFIED_TRANSITION_NONE_TO_LOW
WebMessageInfo_VERIFIED_TRANSITION_NONE_TO_UNKNOWN
WebMessageInfo_GROUP_CREATE
WebMessageInfo_GROUP_CHANGE_SUBJECT
WebMessageInfo_GROUP_CHANGE_ICON
WebMessageInfo_GROUP_CHANGE_INVITE_LINK
WebMessageInfo_GROUP_CHANGE_DESCRIPTION
WebMessageInfo_GROUP_CHANGE_RESTRICT
WebMessageInfo_GROUP_CHANGE_ANNOUNCE
WebMessageInfo_GROUP_PARTICIPANT_ADD
WebMessageInfo_GROUP_PARTICIPANT_REMOVE
WebMessageInfo_GROUP_PARTICIPANT_PROMOTE
WebMessageInfo_GROUP_PARTICIPANT_DEMOTE
WebMessageInfo_GROUP_PARTICIPANT_INVITE
WebMessageInfo_GROUP_PARTICIPANT_LEAVE
WebMessageInfo_GROUP_PARTICIPANT_CHANGE_NUMBER
WebMessageInfo_BROADCAST_CREATE
WebMessageInfo_BROADCAST_ADD
WebMessageInfo_BROADCAST_REMOVE
WebMessageInfo_GENERIC_NOTIFICATION
WebMessageInfo_E2E_IDENTITY_CHANGED
WebMessageInfo_E2E_ENCRYPTED
WebMessageInfo_CALL_MISSED_VOICE
WebMessageInfo_CALL_MISSED_VIDEO
WebMessageInfo_INDIVIDUAL_CHANGE_NUMBER
WebMessageInfo_GROUP_DELETE
WebMessageInfo_GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE
WebMessageInfo_CALL_MISSED_GROUP_VOICE
WebMessageInfo_CALL_MISSED_GROUP_VIDEO
WebMessageInfo_PAYMENT_CIPHERTEXT
WebMessageInfo_PAYMENT_FUTUREPROOF
WebMessageInfo_PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED
WebMessageInfo_PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED
WebMessageInfo_PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED
WebMessageInfo_PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP
WebMessageInfo_PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP
WebMessageInfo_PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER
WebMessageInfo_PAYMENT_ACTION_SEND_PAYMENT_REMINDER
WebMessageInfo_PAYMENT_ACTION_SEND_PAYMENT_INVITATION
WebMessageInfo_PAYMENT_ACTION_REQUEST_DECLINED
WebMessageInfo_PAYMENT_ACTION_REQUEST_EXPIRED
WebMessageInfo_PAYMENT_ACTION_REQUEST_CANCELLED
WebMessageInfo_BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM
WebMessageInfo_BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP
WebMessageInfo_BIZ_INTRO_TOP
WebMessageInfo_BIZ_INTRO_BOTTOM
WebMessageInfo_BIZ_NAME_CHANGE
WebMessageInfo_BIZ_MOVE_TO_CONSUMER_APP
WebMessageInfo_BIZ_TWO_TIER_MIGRATION_TOP
WebMessageInfo_BIZ_TWO_TIER_MIGRATION_BOTTOM
WebMessageInfo_OVERSIZED
WebMessageInfo_GROUP_CHANGE_NO_FREQUENTLY_FORWARDED
WebMessageInfo_GROUP_V4_ADD_INVITE_SENT
WebMessageInfo_GROUP_PARTICIPANT_ADD_REQUEST_JOIN
WebMessageInfo_CHANGE_EPHEMERAL_SETTING
WebMessageInfo_E2E_DEVICE_CHANGED
WebMessageInfo_VIEWED_ONCE
WebMessageInfo_E2E_ENCRYPTED_NOW
WebMessageInfo_BLUE_MSG_BSP_FB_TO_BSP_PREMISE
WebMessageInfo_BLUE_MSG_BSP_FB_TO_SELF_FB
WebMessageInfo_BLUE_MSG_BSP_FB_TO_SELF_PREMISE
WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE
WebMessageInfo_BLUE_MSG_BSP_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_BSP_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_SELF_FB_TO_BSP_PREMISE
WebMessageInfo_BLUE_MSG_SELF_FB_TO_SELF_PREMISE
WebMessageInfo_BLUE_MSG_SELF_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_SELF_FB_VERIFIED
WebMessageInfo_BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE
WebMessageInfo_BLUE_MSG_SELF_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_SELF_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_TO_BSP_FB
WebMessageInfo_BLUE_MSG_TO_CONSUMER
WebMessageInfo_BLUE_MSG_TO_SELF_FB
WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED
WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED
WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_VERIFIED
WebMessageInfo_BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_VERIFIED_TO_UNVERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED
WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED
WebMessageInfo_BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED
WebMessageInfo_BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED
WebMessageInfo_E2E_IDENTITY_UNAVAILABLE
WebMessageInfo_GROUP_CREATING
WebMessageInfo_GROUP_CREATE_FAILED
WebMessageInfo_GROUP_BOUNCED
WebMessageInfo_BLOCK_CONTACT
WebMessageInfo_EPHEMERAL_SETTING_NOT_APPLIED
WebMessageInfo_SYNC_FAILED
WebMessageInfo_SYNCING
WebMessageInfo_BIZ_PRIVACY_MODE_INIT_FB
WebMessageInfo_BIZ_PRIVACY_MODE_INIT_BSP
WebMessageInfo_BIZ_PRIVACY_MODE_TO_FB
WebMessageInfo_BIZ_PRIVACY_MODE_TO_BSP
WebMessageInfo_DISAPPEARING_MODE
WebMessageInfo_E2E_DEVICE_FETCH_FAILED
WebMessageInfo_ADMIN_REVOKE
WebMessageInfo_GROUP_INVITE_LINK_GROWTH_LOCKED
WebMessageInfo_COMMUNITY_LINK_PARENT_GROUP
WebMessageInfo_COMMUNITY_LINK_SIBLING_GROUP
WebMessageInfo_COMMUNITY_LINK_SUB_GROUP
WebMessageInfo_COMMUNITY_UNLINK_PARENT_GROUP
WebMessageInfo_COMMUNITY_UNLINK_SIBLING_GROUP
WebMessageInfo_COMMUNITY_UNLINK_SUB_GROUP
WebMessageInfo_GROUP_PARTICIPANT_ACCEPT
WebMessageInfo_GROUP_PARTICIPANT_LINKED_GROUP_JOIN
WebMessageInfo_COMMUNITY_CREATE
WebMessageInfo_EPHEMERAL_KEEP_IN_CHAT
WebMessageInfo_GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST
WebMessageInfo_GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE
WebMessageInfo_INTEGRITY_UNLINK_PARENT_GROUP
WebMessageInfo_COMMUNITY_PARTICIPANT_PROMOTE
WebMessageInfo_COMMUNITY_PARTICIPANT_DEMOTE
WebMessageInfo_COMMUNITY_PARENT_GROUP_DELETED
WebMessageInfo_COMMUNITY_LINK_PARENT_GROUP_MEMBERSHIP_APPROVAL
WebMessageInfo_GROUP_PARTICIPANT_JOINED_GROUP_AND_PARENT_GROUP
WebMessageInfo_MASKED_THREAD_CREATED
WebMessageInfo_MASKED_THREAD_UNMASKED
WebMessageInfo_BIZ_CHAT_ASSIGNMENT
WebMessageInfo_CHAT_PSA
WebMessageInfo_CHAT_POLL_CREATION_MESSAGE
WebMessageInfo_CAG_MASKED_THREAD_CREATED
WebMessageInfo_COMMUNITY_PARENT_GROUP_SUBJECT_CHANGED
WebMessageInfo_CAG_INVITE_AUTO_ADD
WebMessageInfo_BIZ_CHAT_ASSIGNMENT_UNASSIGN
WebMessageInfo_CAG_INVITE_AUTO_JOINED
WebMessageInfo_SCHEDULED_CALL_START_MESSAGE
WebMessageInfo_COMMUNITY_INVITE_RICH
WebMessageInfo_COMMUNITY_INVITE_AUTO_ADD_RICH
WebMessageInfo_SUB_GROUP_INVITE_RICH
WebMessageInfo_SUB_GROUP_PARTICIPANT_ADD_RICH
WebMessageInfo_COMMUNITY_LINK_PARENT_GROUP_RICH
WebMessageInfo_COMMUNITY_PARTICIPANT_ADD_RICH
WebMessageInfo_SILENCED_UNKNOWN_CALLER_AUDIO
WebMessageInfo_SILENCED_UNKNOWN_CALLER_VIDEO
WebMessageInfo_GROUP_MEMBER_ADD_MODE
WebMessageInfo_GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD
WebMessageInfo_COMMUNITY_CHANGE_DESCRIPTION
WebMessageInfo_SENDER_INVITE
WebMessageInfo_RECEIVER_INVITE
WebMessageInfo_COMMUNITY_ALLOW_MEMBER_ADDED_GROUPS
WebMessageInfo_PINNED_MESSAGE_IN_CHAT
WebMessageInfo_PAYMENT_INVITE_SETUP_INVITER
WebMessageInfo_PAYMENT_INVITE_SETUP_INVITEE_RECEIVE_ONLY
WebMessageInfo_PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE
WebMessageInfo_LINKED_GROUP_CALL_START
WebMessageInfo_REPORT_TO_ADMIN_ENABLED_STATUS
WebMessageInfo_EMPTY_SUBGROUP_CREATE
WebMessageInfo_SCHEDULED_CALL_CANCEL
WebMessageInfo_SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH
WebMessageInfo_GROUP_CHANGE_RECENT_HISTORY_SHARING
WebMessageInfo_PAID_MESSAGE_SERVER_CAMPAIGN_ID
WebMessageInfo_GENERAL_CHAT_CREATE
WebMessageInfo_GENERAL_CHAT_ADD
WebMessageInfo_GENERAL_CHAT_AUTO_ADD_DISABLED
WebMessageInfo_SUGGESTED_SUBGROUP_ANNOUNCE
WebMessageInfo_BIZ_BOT_1P_MESSAGING_ENABLED
WebMessageInfo_CHANGE_USERNAME
WebMessageInfo_BIZ_COEX_PRIVACY_INIT_SELF
WebMessageInfo_BIZ_COEX_PRIVACY_TRANSITION_SELF
WebMessageInfo_SUPPORT_AI_EDUCATION
WebMessageInfo_BIZ_BOT_3P_MESSAGING_ENABLED
WebMessageInfo_REMINDER_SETUP_MESSAGE
WebMessageInfo_REMINDER_SENT_MESSAGE
WebMessageInfo_REMINDER_CANCEL_MESSAGE
WebMessageInfo_BIZ_COEX_PRIVACY_INIT
WebMessageInfo_BIZ_COEX_PRIVACY_TRANSITION
WebMessageInfo_GROUP_DEACTIVATED
WebMessageInfo_COMMUNITY_DEACTIVATE_SIBLING_GROUP
WebMessageInfo_ERROR
WebMessageInfo_PENDING
WebMessageInfo_SERVER_ACK
WebMessageInfo_DELIVERY_ACK
WebMessageInfo_READ
WebMessageInfo_PLAYED
WebMessageInfo_E2EE
WebMessageInfo_FB
WebMessageInfo_BSP
WebMessageInfo_BSP_AND_FB
WebFeatures_NOT_STARTED
WebFeatures_FORCE_UPGRADE
WebFeatures_DEVELOPMENT
WebFeatures_PRODUCTION
PinInChat_UNKNOWN_TYPE
PinInChat_PIN_FOR_ALL
PinInChat_UNPIN_FOR_ALL
PaymentInfo_UNKNOWN
PaymentInfo_PENDING_SETUP
PaymentInfo_PENDING_RECEIVER_SETUP
PaymentInfo_INIT
PaymentInfo_SUCCESS
PaymentInfo_COMPLETED
PaymentInfo_FAILED
PaymentInfo_FAILED_RISK
PaymentInfo_FAILED_PROCESSING
PaymentInfo_FAILED_RECEIVER_PROCESSING
PaymentInfo_FAILED_DA
PaymentInfo_FAILED_DA_FINAL
PaymentInfo_REFUNDED_TXN
PaymentInfo_REFUND_FAILED
PaymentInfo_REFUND_FAILED_PROCESSING
PaymentInfo_REFUND_FAILED_DA
PaymentInfo_EXPIRED_TXN
PaymentInfo_AUTH_CANCELED
PaymentInfo_AUTH_CANCEL_FAILED_PROCESSING
PaymentInfo_AUTH_CANCEL_FAILED
PaymentInfo_COLLECT_INIT
PaymentInfo_COLLECT_SUCCESS
PaymentInfo_COLLECT_FAILED
PaymentInfo_COLLECT_FAILED_RISK
PaymentInfo_COLLECT_REJECTED
PaymentInfo_COLLECT_EXPIRED
PaymentInfo_COLLECT_CANCELED
PaymentInfo_COLLECT_CANCELLING
PaymentInfo_IN_REVIEW
PaymentInfo_REVERSAL_SUCCESS
PaymentInfo_REVERSAL_PENDING
PaymentInfo_REFUND_PENDING
PaymentInfo_UNKNOWN_STATUS
PaymentInfo_PROCESSING
PaymentInfo_SENT
PaymentInfo_NEED_TO_ACCEPT
PaymentInfo_COMPLETE
PaymentInfo_COULD_NOT_COMPLETE
PaymentInfo_REFUNDED
PaymentInfo_EXPIRED
PaymentInfo_REJECTED
PaymentInfo_CANCELLED
PaymentInfo_WAITING_FOR_PAYER
PaymentInfo_WAITING
PaymentInfo_UNKNOWN_CURRENCY
PaymentInfo_INR
QP_TRUE
QP_FALSE
QP_UNKNOWN
QP_PASS_BY_DEFAULT
QP_FAIL_BY_DEFAULT
QP_AND
QP_OR
QP_NOR
DeviceCapabilities_NONE
DeviceCapabilities_MINIMAL
DeviceCapabilities_FULL
UserPassword_NONE
UserPassword_PBKDF2_HMAC_SHA512
UserPassword_PBKDF2_HMAC_SHA384
UserPassword_UTF8

View File

@@ -0,0 +1,421 @@
ADVEncryptionType
KeepType
PeerDataOperationRequestType
MediaVisibility
DeviceProps_PlatformType
ImageMessage_ImageSourceType
HistorySyncNotification_HistorySyncType
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_DayOfWeekType
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent_CalendarType
GroupInviteMessage_GroupType
ExtendedTextMessage_PreviewType
ExtendedTextMessage_InviteLinkGroupType
ExtendedTextMessage_FontType
EventResponseMessage_EventResponseType
CallLogMessage_CallType
CallLogMessage_CallOutcome
ButtonsResponseMessage_Type
ButtonsMessage_HeaderType
ButtonsMessage_Button_Type
BotFeedbackMessage_BotFeedbackKindMultiplePositive
BotFeedbackMessage_BotFeedbackKindMultipleNegative
BotFeedbackMessage_BotFeedbackKind
BCallMessage_MediaType
HydratedTemplateButton_HydratedURLButton_WebviewPresentationType
DisappearingMode_Trigger
DisappearingMode_Initiator
ContextInfo_ExternalAdReplyInfo_MediaType
ContextInfo_AdReplyInfo_MediaType
ForwardedNewsletterMessageInfo_ContentType
BotPluginMetadata_SearchProvider
BotPluginMetadata_PluginType
PaymentBackground_Type
VideoMessage_Attribution
SecretEncryptedMessage_SecretEncType
ScheduledCallEditMessage_EditType
ScheduledCallCreationMessage_CallType
RequestWelcomeMessageMetadata_LocalChatState
ProtocolMessage_Type
PlaceholderMessage_PlaceholderType
PinInChatMessage_Type
PaymentInviteMessage_ServiceType
OrderMessage_OrderSurface
OrderMessage_OrderStatus
ListResponseMessage_ListType
ListMessage_ListType
InvoiceMessage_AttachmentType
InteractiveResponseMessage_Body_Format
InteractiveMessage_ShopMessage_Surface
PastParticipant_LeaveReason
HistorySync_HistorySyncType
HistorySync_BotAIWaitListState
GroupParticipant_Rank
Conversation_EndOfHistoryTransferType
MediaRetryNotification_ResultType
SyncdMutation_SyncdOperation
StatusPrivacyAction_StatusDistributionMode
MarketingMessageAction_MarketingMessagePrototypeType
PatchDebugData_Platform
CallLogRecord_SilenceReason
CallLogRecord_CallType
CallLogRecord_CallResult
BizIdentityInfo_VerifiedLevelValue
BizIdentityInfo_HostStorageType
BizIdentityInfo_ActualActorsType
BizAccountLinkInfo_HostStorageType
BizAccountLinkInfo_AccountType
ClientPayload_Product
ClientPayload_IOSAppExtension
ClientPayload_ConnectType
ClientPayload_ConnectReason
ClientPayload_WebInfo_WebSubPlatform
ClientPayload_UserAgent_ReleaseChannel
ClientPayload_UserAgent_Platform
ClientPayload_UserAgent_DeviceType
ClientPayload_DNSSource_DNSResolutionMethod
WebMessageInfo_StubType
WebMessageInfo_Status
WebMessageInfo_BizPrivacyStatus
WebFeatures_Flag
PinInChat_Type
PaymentInfo_TxnStatus
PaymentInfo_Status
PaymentInfo_Currency
QP_FilterResult
QP_FilterClientNotSupportedConfig
QP_ClauseType
DeviceCapabilities_ChatLockSupportLevel
UserPassword_Transformer
UserPassword_Encoding
ADVSignedKeyIndexList
ADVSignedDeviceIdentity
ADVSignedDeviceIdentityHMAC
ADVKeyIndexList
ADVDeviceIdentity
DeviceProps
InitialSecurityNotificationSettingSync
ImageMessage
HistorySyncNotification
HighlyStructuredMessage
GroupInviteMessage
FutureProofMessage
ExtendedTextMessage
EventResponseMessage
EventMessage
EncReactionMessage
EncEventResponseMessage
EncCommentMessage
DocumentMessage
DeviceSentMessage
DeclinePaymentRequestMessage
ContactsArrayMessage
ContactMessage
CommentMessage
Chat
CancelPaymentRequestMessage
Call
CallLogMessage
ButtonsResponseMessage
ButtonsResponseMessage_SelectedDisplayText
ButtonsMessage
ButtonsMessage_Text
ButtonsMessage_DocumentMessage
ButtonsMessage_ImageMessage
ButtonsMessage_VideoMessage
ButtonsMessage_LocationMessage
BotFeedbackMessage
BCallMessage
AudioMessage
AppStateSyncKey
AppStateSyncKeyShare
AppStateSyncKeyRequest
AppStateSyncKeyId
AppStateSyncKeyFingerprint
AppStateSyncKeyData
AppStateFatalExceptionNotification
MediaNotifyMessage
Location
InteractiveAnnotation
InteractiveAnnotation_Location
InteractiveAnnotation_Newsletter
HydratedTemplateButton
HydratedTemplateButton_QuickReplyButton
HydratedTemplateButton_UrlButton
HydratedTemplateButton_CallButton
GroupMention
DisappearingMode
DeviceListMetadata
ContextInfo
ForwardedNewsletterMessageInfo
BotSuggestedPromptMetadata
BotSearchMetadata
BotPluginMetadata
BotMetadata
BotAvatarMetadata
ActionLink
TemplateButton
TemplateButton_QuickReplyButton_
TemplateButton_UrlButton
TemplateButton_CallButton_
Point
PaymentBackground
Money
Message
MessageSecretMessage
MessageContextInfo
VideoMessage
TemplateMessage
TemplateMessage_FourRowTemplate_
TemplateMessage_HydratedFourRowTemplate_
TemplateMessage_InteractiveMessageTemplate
TemplateButtonReplyMessage
StickerSyncRMRMessage
StickerMessage
SenderKeyDistributionMessage
SendPaymentMessage
SecretEncryptedMessage
ScheduledCallEditMessage
ScheduledCallCreationMessage
RequestWelcomeMessageMetadata
RequestPhoneNumberMessage
RequestPaymentMessage
ReactionMessage
ProtocolMessage
ProductMessage
PollVoteMessage
PollUpdateMessage
PollUpdateMessageMetadata
PollEncValue
PollCreationMessage
PlaceholderMessage
PinInChatMessage
PeerDataOperationRequestResponseMessage
PeerDataOperationRequestMessage
PaymentInviteMessage
OrderMessage
NewsletterAdminInviteMessage
MessageHistoryBundle
LocationMessage
LiveLocationMessage
ListResponseMessage
ListMessage
KeepInChatMessage
InvoiceMessage
InteractiveResponseMessage
InteractiveResponseMessage_NativeFlowResponseMessage_
InteractiveMessage
InteractiveMessage_ShopStorefrontMessage
InteractiveMessage_CollectionMessage_
InteractiveMessage_NativeFlowMessage_
InteractiveMessage_CarouselMessage_
EphemeralSetting
WallpaperSettings
StickerMetadata
Pushname
PhoneNumberToLIDMapping
PastParticipants
PastParticipant
NotificationSettings
HistorySync
HistorySyncMsg
GroupParticipant
GlobalSettings
Conversation
AvatarUserSettings
AutoDownloadSettings
ServerErrorReceipt
MediaRetryNotification
MessageKey
SyncdVersion
SyncdValue
SyncdSnapshot
SyncdRecord
SyncdPatch
SyncdMutations
SyncdMutation
SyncdIndex
KeyId
ExternalBlobReference
ExitCode
SyncActionValue
WamoUserIdentifierAction
UserStatusMuteAction
UnarchiveChatsSetting
TimeFormatAction
SyncActionMessage
SyncActionMessageRange
SubscriptionAction
StickerAction
StatusPrivacyAction
StarAction
SecurityNotificationSetting
RemoveRecentStickerAction
RecentEmojiWeightsAction
QuickReplyAction
PushNameSetting
PrivacySettingRelayAllCalls
PrivacySettingDisableLinkPreviewsAction
PrimaryVersionAction
PrimaryFeature
PnForLidChatAction
PinAction
PaymentInfoAction
NuxAction
MuteAction
MarketingMessageBroadcastAction
MarketingMessageAction
MarkChatAsReadAction
LockChatAction
LocaleSetting
LabelReorderingAction
LabelEditAction
LabelAssociationAction
KeyExpiration
ExternalWebBetaAction
DeleteMessageForMeAction
DeleteIndividualCallLogAction
DeleteChatAction
CustomPaymentMethodsAction
CustomPaymentMethod
CustomPaymentMethodMetadata
ContactAction
ClearChatAction
ChatAssignmentOpenedStatusAction
ChatAssignmentAction
CallLogAction
BotWelcomeRequestAction
ArchiveChatAction
AndroidUnsupportedActions
AgentAction
SyncActionData
RecentEmojiWeight
PatchDebugData
CallLogRecord
VerifiedNameCertificate
LocalizedName
BizIdentityInfo
BizAccountPayload
BizAccountLinkInfo
HandshakeMessage
HandshakeServerHello
HandshakeClientHello
HandshakeClientFinish
ClientPayload
WebNotificationsInfo
WebMessageInfo
WebFeatures
UserReceipt
StatusPSA
ReportingTokenInfo
Reaction
PremiumMessageInfo
PollUpdate
PollAdditionalMetadata
PinInChat
PhotoChange
PaymentInfo
NotificationMessageInfo
MessageAddOnContextInfo
MediaData
KeepInChat
EventResponse
EventAdditionalMetadata
CommentMetadata
NoiseCertificate
CertChain
QP
ChatLockSettings
DeviceCapabilities
UserPassword
DeviceProps_HistorySyncConfig
DeviceProps_AppVersion
HighlyStructuredMessage_HSMLocalizableParameter
HighlyStructuredMessage_HSMLocalizableParameter_Currency
HighlyStructuredMessage_HSMLocalizableParameter_DateTime
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_Component
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_UnixEpoch
HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch
HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent
CallLogMessage_CallParticipant
ButtonsMessage_Button
ButtonsMessage_Button_NativeFlowInfo
ButtonsMessage_Button_ButtonText
HydratedTemplateButton_HydratedURLButton
HydratedTemplateButton_HydratedQuickReplyButton
HydratedTemplateButton_HydratedCallButton
ContextInfo_UTMInfo
ContextInfo_ExternalAdReplyInfo
ContextInfo_DataSharingContext
ContextInfo_BusinessMessageForwardInfo
ContextInfo_AdReplyInfo
TemplateButton_URLButton
TemplateButton_QuickReplyButton
TemplateButton_CallButton
PaymentBackground_MediaData
TemplateMessage_HydratedFourRowTemplate
TemplateMessage_HydratedFourRowTemplate_DocumentMessage
TemplateMessage_HydratedFourRowTemplate_HydratedTitleText
TemplateMessage_HydratedFourRowTemplate_ImageMessage
TemplateMessage_HydratedFourRowTemplate_VideoMessage
TemplateMessage_HydratedFourRowTemplate_LocationMessage
TemplateMessage_FourRowTemplate
TemplateMessage_FourRowTemplate_DocumentMessage
TemplateMessage_FourRowTemplate_HighlyStructuredMessage
TemplateMessage_FourRowTemplate_ImageMessage
TemplateMessage_FourRowTemplate_VideoMessage
TemplateMessage_FourRowTemplate_LocationMessage
ProductMessage_ProductSnapshot
ProductMessage_CatalogSnapshot
PollCreationMessage_Option
PeerDataOperationRequestResponseMessage_PeerDataOperationResult
PeerDataOperationRequestResponseMessage_PeerDataOperationResult_PlaceholderMessageResendResponse
PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse
PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse_LinkPreviewHighQualityThumbnail
PeerDataOperationRequestMessage_RequestUrlPreview
PeerDataOperationRequestMessage_RequestStickerReupload
PeerDataOperationRequestMessage_PlaceholderMessageResendRequest
PeerDataOperationRequestMessage_HistorySyncOnDemandRequest
ListResponseMessage_SingleSelectReply
ListMessage_Section
ListMessage_Row
ListMessage_Product
ListMessage_ProductSection
ListMessage_ProductListInfo
ListMessage_ProductListHeaderImage
InteractiveResponseMessage_NativeFlowResponseMessage
InteractiveResponseMessage_Body
InteractiveMessage_NativeFlowMessage
InteractiveMessage_Header
InteractiveMessage_Header_DocumentMessage
InteractiveMessage_Header_ImageMessage
InteractiveMessage_Header_JpegThumbnail
InteractiveMessage_Header_VideoMessage
InteractiveMessage_Header_LocationMessage
InteractiveMessage_Header_ProductMessage
InteractiveMessage_Footer
InteractiveMessage_CollectionMessage
InteractiveMessage_CarouselMessage
InteractiveMessage_Body
InteractiveMessage_ShopMessage
InteractiveMessage_NativeFlowMessage_NativeFlowButton
CallLogRecord_ParticipantInfo
VerifiedNameCertificate_Details
ClientPayload_WebInfo
ClientPayload_UserAgent
ClientPayload_InteropData
ClientPayload_DevicePairingRegistrationData
ClientPayload_DNSSource
ClientPayload_WebInfo_WebdPayload
ClientPayload_UserAgent_AppVersion
NoiseCertificate_Details
CertChain_NoiseCertificate
CertChain_NoiseCertificate_Details
QP_Filter
QP_FilterParameters
QP_FilterClause
UserPassword_TransformerArg
UserPassword_TransformerArg_Value
UserPassword_TransformerArg_Value_AsBlob
UserPassword_TransformerArg_Value_AsUnsignedInteger

View File

@@ -28,7 +28,7 @@ func (cli *Client) handleStreamError(node *waBinary.Node) {
cli.Disconnect()
err := cli.Connect()
if err != nil {
cli.Log.Errorf("Failed to reconnect after 515 code:", err)
cli.Log.Errorf("Failed to reconnect after 515 code: %v", err)
}
}()
case code == "401" && conflictType == "device_removed":

View File

@@ -22,8 +22,8 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"go.mau.fi/whatsmeow/binary/armadillo/waMediaTransport"
waProto "go.mau.fi/whatsmeow/binary/proto"
"go.mau.fi/whatsmeow/proto/waMediaTransport"
"go.mau.fi/whatsmeow/socket"
"go.mau.fi/whatsmeow/util/cbcutil"
"go.mau.fi/whatsmeow/util/hkdfutil"
@@ -53,8 +53,8 @@ type DownloadableMessage interface {
proto.Message
GetDirectPath() string
GetMediaKey() []byte
GetFileSha256() []byte
GetFileEncSha256() []byte
GetFileSHA256() []byte
GetFileEncSHA256() []byte
}
// DownloadableThumbnail represents a protobuf message that contains a thumbnail attachment.
@@ -63,8 +63,8 @@ type DownloadableMessage interface {
type DownloadableThumbnail interface {
proto.Message
GetThumbnailDirectPath() string
GetThumbnailSha256() []byte
GetThumbnailEncSha256() []byte
GetThumbnailSHA256() []byte
GetThumbnailEncSHA256() []byte
GetMediaKey() []byte
}
@@ -167,7 +167,7 @@ func (cli *Client) DownloadThumbnail(msg DownloadableThumbnail) ([]byte, error)
if !ok {
return nil, fmt.Errorf("%w '%s'", ErrUnknownMediaType, string(msg.ProtoReflect().Descriptor().Name()))
} else if len(msg.GetThumbnailDirectPath()) > 0 {
return cli.DownloadMediaWithPath(msg.GetThumbnailDirectPath(), msg.GetThumbnailEncSha256(), msg.GetThumbnailSha256(), msg.GetMediaKey(), -1, mediaType, mediaTypeToMMSType[mediaType])
return cli.DownloadMediaWithPath(msg.GetThumbnailDirectPath(), msg.GetThumbnailEncSHA256(), msg.GetThumbnailSHA256(), msg.GetMediaKey(), -1, mediaType, mediaTypeToMMSType[mediaType])
} else {
return nil, ErrNoURLPresent
}
@@ -200,9 +200,9 @@ func (cli *Client) Download(msg DownloadableMessage) ([]byte, error) {
isWebWhatsappNetURL = strings.HasPrefix(url, "https://web.whatsapp.net")
}
if len(url) > 0 && !isWebWhatsappNetURL {
return cli.downloadAndDecrypt(url, msg.GetMediaKey(), mediaType, getSize(msg), msg.GetFileEncSha256(), msg.GetFileSha256())
return cli.downloadAndDecrypt(url, msg.GetMediaKey(), mediaType, getSize(msg), msg.GetFileEncSHA256(), msg.GetFileSHA256())
} else if len(msg.GetDirectPath()) > 0 {
return cli.DownloadMediaWithPath(msg.GetDirectPath(), msg.GetFileEncSha256(), msg.GetFileSha256(), msg.GetMediaKey(), getSize(msg), mediaType, mediaTypeToMMSType[mediaType])
return cli.DownloadMediaWithPath(msg.GetDirectPath(), msg.GetFileEncSHA256(), msg.GetFileSHA256(), msg.GetMediaKey(), getSize(msg), mediaType, mediaTypeToMMSType[mediaType])
} else {
if isWebWhatsappNetURL {
cli.Log.Warnf("Got a media message with a web.whatsapp.net URL (%s) and no direct path", url)
@@ -240,12 +240,12 @@ func (cli *Client) DownloadMediaWithPath(directPath string, encFileHash, fileHas
return
}
func (cli *Client) downloadAndDecrypt(url string, mediaKey []byte, appInfo MediaType, fileLength int, fileEncSha256, fileSha256 []byte) (data []byte, err error) {
func (cli *Client) downloadAndDecrypt(url string, mediaKey []byte, appInfo MediaType, fileLength int, fileEncSHA256, fileSHA256 []byte) (data []byte, err error) {
iv, cipherKey, macKey, _ := getMediaKeys(mediaKey, appInfo)
var ciphertext, mac []byte
if ciphertext, mac, err = cli.downloadPossiblyEncryptedMediaWithRetries(url, fileEncSha256); err != nil {
if ciphertext, mac, err = cli.downloadPossiblyEncryptedMediaWithRetries(url, fileEncSHA256); err != nil {
} else if mediaKey == nil && fileEncSha256 == nil && mac == nil {
} else if mediaKey == nil && fileEncSHA256 == nil && mac == nil {
// Unencrypted media, just return the downloaded data
data = ciphertext
} else if err = validateMedia(iv, ciphertext, macKey, mac); err != nil {
@@ -254,7 +254,7 @@ func (cli *Client) downloadAndDecrypt(url string, mediaKey []byte, appInfo Media
err = fmt.Errorf("failed to decrypt file: %w", err)
} else if fileLength >= 0 && len(data) != fileLength {
err = fmt.Errorf("%w: expected %d, got %d", ErrFileLengthMismatch, fileLength, len(data))
} else if len(fileSha256) == 32 && sha256.Sum256(data) != *(*[32]byte)(fileSha256) {
} else if len(fileSHA256) == 32 && sha256.Sum256(data) != *(*[32]byte)(fileSHA256) {
err = ErrInvalidMediaSHA256
}
return

View File

@@ -26,7 +26,7 @@ func getMediaRetryKey(mediaKey []byte) (cipherKey []byte) {
func encryptMediaRetryReceipt(messageID types.MessageID, mediaKey []byte) (ciphertext, iv []byte, err error) {
receipt := &waProto.ServerErrorReceipt{
StanzaId: proto.String(messageID),
StanzaID: proto.String(messageID),
}
var plaintext []byte
plaintext, err = proto.Marshal(receipt)

View File

@@ -70,7 +70,7 @@ func getOrigSenderFromKey(msg *events.Message, key *waProto.MessageKey) (types.J
}
type messageEncryptedSecret interface {
GetEncIv() []byte
GetEncIV() []byte
GetEncPayload() []byte
}
@@ -86,7 +86,7 @@ func (cli *Client) decryptMsgSecret(msg *events.Message, useCase MsgSecretType,
return nil, ErrOriginalMessageSecretNotFound
}
secretKey, additionalData := generateMsgSecretKey(useCase, msg.Info.Sender, origMsgKey.GetId(), pollSender, baseEncKey)
plaintext, err := gcmutil.Decrypt(secretKey, encrypted.GetEncIv(), encrypted.GetEncPayload(), additionalData)
plaintext, err := gcmutil.Decrypt(secretKey, encrypted.GetEncIV(), encrypted.GetEncPayload(), additionalData)
if err != nil {
return nil, fmt.Errorf("failed to decrypt secret message: %w", err)
}
@@ -175,9 +175,9 @@ func (cli *Client) DecryptPollVote(vote *events.Message) (*waProto.PollVoteMessa
func getKeyFromInfo(msgInfo *types.MessageInfo) *waProto.MessageKey {
creationKey := &waProto.MessageKey{
RemoteJid: proto.String(msgInfo.Chat.String()),
RemoteJID: proto.String(msgInfo.Chat.String()),
FromMe: proto.Bool(msgInfo.IsFromMe),
Id: proto.String(msgInfo.ID),
ID: proto.String(msgInfo.ID),
}
if msgInfo.IsGroup {
creationKey.Participant = proto.String(msgInfo.Sender.String())
@@ -255,8 +255,8 @@ func (cli *Client) EncryptPollVote(pollInfo *types.MessageInfo, vote *waProto.Po
PollCreationMessageKey: getKeyFromInfo(pollInfo),
Vote: &waProto.PollEncValue{
EncPayload: ciphertext,
EncIv: iv,
EncIV: iv,
},
SenderTimestampMs: proto.Int64(time.Now().UnixMilli()),
SenderTimestampMS: proto.Int64(time.Now().UnixMilli()),
}, nil
}

View File

@@ -107,7 +107,7 @@ func (cli *Client) handlePair(deviceIdentityBytes []byte, reqID, businessName, p
h := hmac.New(sha256.New, cli.Store.AdvSecretKey)
h.Write(deviceIdentityContainer.Details)
if !bytes.Equal(h.Sum(nil), deviceIdentityContainer.Hmac) {
if !bytes.Equal(h.Sum(nil), deviceIdentityContainer.HMAC) {
cli.Log.Warnf("Invalid HMAC from pair success message")
cli.sendPairError(reqID, 401, "not-authorized")
return ErrPairInvalidDeviceIdentityHMAC

View File

@@ -0,0 +1 @@
protos.js

View File

@@ -6,7 +6,7 @@ import (
"google.golang.org/protobuf/proto"
"go.mau.fi/whatsmeow/binary/armadillo/waCommon"
"go.mau.fi/whatsmeow/proto/waCommon"
)
var ErrUnsupportedVersion = errors.New("unsupported subprotocol version")
@@ -27,6 +27,6 @@ func Marshal[T proto.Message](msg T, version int32) (*waCommon.SubProtocol, erro
}
return &waCommon.SubProtocol{
Payload: payload,
Version: version,
Version: &version,
}, nil
}

View File

@@ -1,10 +1,10 @@
package armadillo
import (
"go.mau.fi/whatsmeow/binary/armadillo/waArmadilloApplication"
"go.mau.fi/whatsmeow/binary/armadillo/waCommon"
"go.mau.fi/whatsmeow/binary/armadillo/waConsumerApplication"
"go.mau.fi/whatsmeow/binary/armadillo/waMultiDevice"
"go.mau.fi/whatsmeow/proto/waArmadilloApplication"
"go.mau.fi/whatsmeow/proto/waCommon"
"go.mau.fi/whatsmeow/proto/waConsumerApplication"
"go.mau.fi/whatsmeow/proto/waMultiDevice"
)
type MessageApplicationSub interface {

View File

@@ -1,9 +1,10 @@
#!/bin/bash
cd $(dirname $0)
set -euo pipefail
if [[ ! -f "e2ee.js" ]]; then
echo "Please download the encryption javascript file and save it to e2ee.js first"
if [[ ! -f "protos.js" ]]; then
echo "Please download the WhatsApp JavaScript modules with protobuf schemas into protos.js first"
exit 1
fi
node parse-proto.js
protoc --go_out=. --go_opt=paths=source_relative --go_opt=embed_raw=true */*.proto
pre-commit run -a

View File

@@ -14,7 +14,20 @@ const modules = {
},
}
const depRenameMap = {
"WAProtocol.pb": "WACommon.pb",
"WAWebProtobufsProtocol.pb": "WACommon.pb",
"WAWebProtobufsAdv.pb": "WAAdv.pb",
"WAWebProtobufsMmsRetry.pb": "WAMmsRetry.pb",
"WAWebProtobufSyncAction.pb": "WASyncAction.pb",
"WAWebProtobufsFingerprintV3.pb": "WAFingerprint.pb",
"WAWebProtobufsDeviceCapabilities.pb": "WAProtobufsDeviceCapabilities.pb",
"WAWebProtobufsChatLockSettings.pb": "WAProtobufsChatLockSettings.pb",
"WAWebProtobufsUserPassword.pb": "WAProtobufsUserPassword.pb",
}
function requireModule(name) {
name = depRenameMap[name] ?? name
if (!modules[name]) {
throw new Error(`Unknown requirement ${name}`)
}
@@ -34,6 +47,16 @@ function ignoreModule(name) {
} else if (name.startsWith("MAWArmadillo") && (name.endsWith("TableSchema.pb") || name.endsWith("TablesSchema.pb"))) {
// Ignore internal table schemas
return true
} else if (name.startsWith("WAWebProtobufsMdStorage")) {
return true
} else if (["WAWebProtobufsAdv.pb", "WAWebProtobufsMmsRetry.pb", "WAWebProtobufSyncAction.pb", "WAWebProtobufsFingerprintV3.pb",
"WAWebProtobufsDeviceCapabilities.pb", "WAWebProtobufsChatLockSettings.pb", "WAWebProtobufsUserPassword.pb",
"WAProtocol.pb", "WAWebProtobufsProtocol.pb"].includes(name)) {
// Ignore duplicates (e.g. WAAdv.pb is the same as WAWebProtobufsAdv.pb)
return true
} else if (["WAWa5.pb", "WAE2E.pb"].includes(name)) {
// Ignore the shorter version of duplicates when the WebProtobufs one has more fields
return true
} else if (name === "WASignalLocalStorageProtocol.pb" || name === "WASignalWhisperTextProtocol.pb") {
// Ignore standard signal protocol stuff
return true
@@ -42,23 +65,89 @@ function ignoreModule(name) {
}
}
const lazyModules = {}
function defineModule(name, dependencies, callback, unknownIntOrNull) {
if (ignoreModule(name)) {
return
} else if (modules[name]) {
return // ignore duplicates
}
const exports = {}
if (dependencies.length > 0) {
callback(null, requireDefault, null, requireModule, null, null, exports)
} else {
callback(null, requireDefault, null, requireModule, exports, exports)
dependencies = dependencies.map(dep => depRenameMap[dep] ?? dep)
lazyModules[name] = {
dependencies,
load: () => {
const exports = {}
if (dependencies.length > 0) {
callback(null, requireDefault, null, requireModule, null, null, exports)
} else {
callback(null, requireDefault, null, requireModule, exports, exports)
}
modules[name] = {exports, dependencies}
}
}
}
function loadLazyModule(name) {
if (modules[name]) {
return
}
const mod = lazyModules[name]
for (const dep of mod.dependencies) {
loadLazyModule(dep)
}
console.log("Loading", name, mod.dependencies)
mod.load()
}
function loadLazyModules() {
for (const name of Object.keys(lazyModules)) {
loadLazyModule(name)
}
modules[name] = {exports, dependencies}
}
global.self = global
global.__d = defineModule
global.window = {}
require("./e2ee.js")
/*const neededFiles = new Map()
require("child_process").spawnSync("grep", ["-Er", `^__d\\("([A-Za-z0-9]+\\.pb|WAProtoConst)",`, 'js'])
.stdout
.toString()
.split("\n")
.forEach(line => {
if (!line) {
return
}
const match = line.match(/^(.+\.js):__d\("([A-Za-z0-9]+\.pb|WAProtoConst)",/)
const file = match[1]
const module = match[2]
if (module.startsWith("MAWArmadillo") && (module.endsWith("TableSchema.pb") || module.endsWith("TablesSchema.pb"))) {
return
} else if (module.startsWith("Instamadillo")) {
return
}
if (!neededFiles.has(file)) {
neededFiles.set(file, [])
}
neededFiles.get(file).push(module)
})
const neededFilesList = [...neededFiles.entries()]
const alreadyImported = new Set()
for (const [file, modules] of neededFilesList) {
if (modules.every(mod => alreadyImported.has(mod))) {
console.log("Skipping", file, "(only duplicates)")
} else {
modules.forEach(mod => alreadyImported.add(mod))
console.log("Requiring", file, "for", modules)
require(`./${file}`)
}
}*/
require("./protos.js")
console.log("Requirements loaded, evaluating...")
loadLazyModules()
console.log("Everything required")
function dereference(obj, module, currentPath, next, ...remainder) {
if (!next) {
@@ -91,10 +180,16 @@ function renameDependencies(dependencies) {
return dependencies
.filter(name => name.endsWith(".pb"))
.map(renameModule)
.map(name => name === "WAProtocol" ? "WACommon" : name)
// .map(name => name === "WAProtocol" ? "WACommon" : name)
}
function renameType(protoName, fieldName, field) {
fieldName = fieldName.replace(/Spec$/, "")
if (protoName === "WAWebProtobufsE2E" && fieldName.startsWith("Message$")) {
fieldName = fieldName.replace(/^Message\$/, "")
} else if (protoName === "WASyncAction" && fieldName.startsWith("SyncActionValue$")) {
fieldName = fieldName.replace(/^SyncActionValue\$/, "")
}
return fieldName
}
@@ -106,15 +201,15 @@ for (const [name, module] of Object.entries(modules)) {
continue
}
// Slightly hacky way to get rid of WAProtocol.pb and just use the MessageKey in WACommon
if (name === "WAProtocol.pb") {
if (Object.entries(module.exports).length > 1) {
console.warn("WAProtocol.pb has more than one export")
}
module.exports["MessageKeySpec"].__name__ = "MessageKey"
module.exports["MessageKeySpec"].__module__ = "WACommon"
module.exports["MessageKeySpec"].__path__ = []
continue
}
// if (name === "WAProtocol.pb" || name === "WAWebProtobufsProtocol.pb") {
// if (Object.entries(module.exports).length > 1) {
// console.warn("WAProtocol.pb has more than one export")
// }
// module.exports["MessageKeySpec"].__name__ = "MessageKey"
// module.exports["MessageKeySpec"].__module__ = "WACommon"
// module.exports["MessageKeySpec"].__path__ = []
// continue
// }
const proto = {
__protobuf__: true,
messages: {},
@@ -124,8 +219,8 @@ for (const [name, module] of Object.entries(modules)) {
}
const upperSnakeEnums = []
for (const [name, field] of Object.entries(module.exports)) {
const namePath = name.replace(/Spec$/, "").split("$")
field.__name__ = renameType(proto.__name__, namePath[namePath.length - 1], field)
const namePath = renameType(proto.__name__, name, field).split("$")
field.__name__ = namePath[namePath.length - 1]
namePath[namePath.length - 1] = field.__name__
field.__path__ = namePath.slice(0, -1)
field.__module__ = proto.__name__
@@ -165,10 +260,10 @@ function flattenWithBlankLines(...items) {
.flatMap(item => item)
}
function protoifyChildren(container) {
function protoifyChildren(container, proto3) {
return flattenWithBlankLines(
...Object.values(container.enums).map(protoifyEnum),
...Object.values(container.messages).map(protoifyMessage),
...Object.values(container.messages).map(msg => protoifyMessage(msg, proto3)),
)
}
@@ -180,7 +275,7 @@ function protoifyEnum(enumDef) {
enumDef[names["-1"]] = 0
} else {
// TODO add snake case
values.push(`${enumDef.__name__.toUpperCase()}_UNKNOWN = 0;`)
// values.push(`${enumDef.__name__.toUpperCase()}_AUTOGEN_UNKNOWN = 0;`)
}
}
for (const [name, value] of Object.entries(enumDef)) {
@@ -194,6 +289,14 @@ function protoifyEnum(enumDef) {
const {TYPES, TYPE_MASK, FLAGS} = requireModule("WAProtoConst")
function mapFieldTypeName(ref, parentModule, parentPath) {
if (typeof ref === "object") {
return fieldTypeName(TYPES.MESSAGE, ref, parentModule, parentPath)
} else {
return fieldTypeName(ref, undefined, parentModule, parentPath)
}
}
function fieldTypeName(typeID, typeRef, parentModule, parentPath) {
switch (typeID) {
case TYPES.INT32:
@@ -228,6 +331,8 @@ function fieldTypeName(typeID, typeRef, parentModule, parentPath) {
namePath.push(...typeRef.__path__.slice(pathStartIndex))
namePath.push(typeRef.__name__)
return namePath.join(".")
case TYPES.MAP:
return `map<${mapFieldTypeName(typeRef[0], parentModule, parentPath)}, ${mapFieldTypeName(typeRef[1], parentModule, parentPath)}>`
case TYPES.FIXED64:
return "fixed64"
case TYPES.SFIXED64:
@@ -279,17 +384,21 @@ function fixFieldName(name) {
.replace("Sha256", "SHA256")
}
function protoifyField(name, [index, flags, typeRef], parentModule, parentPath) {
function protoifyField(name, [index, flags, typeRef], parentModule, parentPath, isOneOf, proto3) {
const preflags = []
const postflags = [""]
if ((flags & FLAGS.REPEATED) !== 0) {
preflags.push("repeated")
const isMap = (flags & TYPE_MASK) === TYPES.MAP
if (!isOneOf) {
if ((flags & FLAGS.REPEATED) !== 0) {
preflags.push("repeated")
} else if (!proto3) {
if ((flags & FLAGS.REQUIRED) === 0) {
preflags.push("optional")
} else {
preflags.push("required")
}
}
}
// if ((flags & FLAGS.REQUIRED) === 0) {
// preflags.push("optional")
// } else {
// preflags.push("required")
// }
preflags.push(fieldTypeName(flags & TYPE_MASK, typeRef, parentModule, parentPath))
if ((flags & FLAGS.PACKED) !== 0) {
postflags.push(`[packed=true]`)
@@ -297,12 +406,12 @@ function protoifyField(name, [index, flags, typeRef], parentModule, parentPath)
return `${preflags.join(" ")} ${fixFieldName(name)} = ${index}${postflags.join(" ")};`
}
function protoifyFields(fields, parentModule, parentPath) {
return Object.entries(fields).map(([name, definition]) => protoifyField(name, definition, parentModule, parentPath))
function protoifyFields(fields, parentModule, parentPath, isOneOf, proto3) {
return Object.entries(fields).map(([name, definition]) => protoifyField(name, definition, parentModule, parentPath, isOneOf, proto3))
}
function protoifyMessage(message) {
const sections = [protoifyChildren(message)]
function protoifyMessage(message, proto3) {
const sections = [protoifyChildren(message, proto3)]
const spec = message.message
const fullMessagePath = message.__path__.concat([message.__name__])
for (const [name, fieldNames] of Object.entries(spec.__oneofs__ ?? {})) {
@@ -311,26 +420,35 @@ function protoifyMessage(message) {
delete spec[fieldName]
return [fieldName, def]
}))
sections.push([`oneof ${name} ` + "{", ...indent(protoifyFields(fields, message.__module__, fullMessagePath)), "}"])
sections.push([`oneof ${name} ` + "{", ...indent(protoifyFields(fields, message.__module__, fullMessagePath, true, proto3)), "}"])
}
if (spec.__reserved__) {
console.warn("Found reserved keys:", message.__name__, spec.__reserved__)
}
delete spec.__oneofs__
delete spec.__reserved__
sections.push(protoifyFields(spec, message.__module__, fullMessagePath))
sections.push(protoifyFields(spec, message.__module__, fullMessagePath, false, proto3))
return [`message ${message.__name__} ` + "{", ...indent(flattenWithBlankLines(...sections)), "}"]
}
function goPackageName(name) {
return name.replace(/^WA/, "wa")
return name.replace(/^WA/, "wa").replace("WebProtobufs", "").replace("Protobufs", "")
}
const needsProto3 = {
"WAWebProtobufsReporting": true
}
function protoifyModule(module) {
const output = []
output.push(`syntax = "proto3";`)
const proto3 = needsProto3[module.__name__]
if (proto3) {
output.push(`syntax = "proto3";`)
} else {
output.push(`syntax = "proto2";`)
}
output.push(`package ${module.__name__};`)
output.push(`option go_package = "go.mau.fi/whatsmeow/binary/armadillo/${goPackageName(module.__name__)}";`)
output.push(`option go_package = "go.mau.fi/whatsmeow/proto/${goPackageName(module.__name__)}";`)
output.push("")
if (module.dependencies.length > 0) {
for (const dependency of module.dependencies) {
@@ -338,7 +456,7 @@ function protoifyModule(module) {
}
output.push("")
}
const children = protoifyChildren(module)
const children = protoifyChildren(module, proto3)
children.push("")
return output.concat(children)
}

562
vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go generated vendored Normal file
View File

@@ -0,0 +1,562 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc v3.21.12
// source: waAdv/WAAdv.proto
package waAdv
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 ADVEncryptionType int32
const (
ADVEncryptionType_E2EE ADVEncryptionType = 0
ADVEncryptionType_HOSTED ADVEncryptionType = 1
)
// Enum value maps for ADVEncryptionType.
var (
ADVEncryptionType_name = map[int32]string{
0: "E2EE",
1: "HOSTED",
}
ADVEncryptionType_value = map[string]int32{
"E2EE": 0,
"HOSTED": 1,
}
)
func (x ADVEncryptionType) Enum() *ADVEncryptionType {
p := new(ADVEncryptionType)
*p = x
return p
}
func (x ADVEncryptionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ADVEncryptionType) Descriptor() protoreflect.EnumDescriptor {
return file_waAdv_WAAdv_proto_enumTypes[0].Descriptor()
}
func (ADVEncryptionType) Type() protoreflect.EnumType {
return &file_waAdv_WAAdv_proto_enumTypes[0]
}
func (x ADVEncryptionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *ADVEncryptionType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = ADVEncryptionType(num)
return nil
}
// Deprecated: Use ADVEncryptionType.Descriptor instead.
func (ADVEncryptionType) EnumDescriptor() ([]byte, []int) {
return file_waAdv_WAAdv_proto_rawDescGZIP(), []int{0}
}
type ADVKeyIndexList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RawID *uint32 `protobuf:"varint,1,opt,name=rawID" json:"rawID,omitempty"`
Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
CurrentIndex *uint32 `protobuf:"varint,3,opt,name=currentIndex" json:"currentIndex,omitempty"`
ValidIndexes []uint32 `protobuf:"varint,4,rep,packed,name=validIndexes" json:"validIndexes,omitempty"`
AccountType *ADVEncryptionType `protobuf:"varint,5,opt,name=accountType,enum=WAAdv.ADVEncryptionType" json:"accountType,omitempty"`
}
func (x *ADVKeyIndexList) Reset() {
*x = ADVKeyIndexList{}
if protoimpl.UnsafeEnabled {
mi := &file_waAdv_WAAdv_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ADVKeyIndexList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ADVKeyIndexList) ProtoMessage() {}
func (x *ADVKeyIndexList) ProtoReflect() protoreflect.Message {
mi := &file_waAdv_WAAdv_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 ADVKeyIndexList.ProtoReflect.Descriptor instead.
func (*ADVKeyIndexList) Descriptor() ([]byte, []int) {
return file_waAdv_WAAdv_proto_rawDescGZIP(), []int{0}
}
func (x *ADVKeyIndexList) GetRawID() uint32 {
if x != nil && x.RawID != nil {
return *x.RawID
}
return 0
}
func (x *ADVKeyIndexList) GetTimestamp() uint64 {
if x != nil && x.Timestamp != nil {
return *x.Timestamp
}
return 0
}
func (x *ADVKeyIndexList) GetCurrentIndex() uint32 {
if x != nil && x.CurrentIndex != nil {
return *x.CurrentIndex
}
return 0
}
func (x *ADVKeyIndexList) GetValidIndexes() []uint32 {
if x != nil {
return x.ValidIndexes
}
return nil
}
func (x *ADVKeyIndexList) GetAccountType() ADVEncryptionType {
if x != nil && x.AccountType != nil {
return *x.AccountType
}
return ADVEncryptionType_E2EE
}
type ADVSignedKeyIndexList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Details []byte `protobuf:"bytes,1,opt,name=details" json:"details,omitempty"`
AccountSignature []byte `protobuf:"bytes,2,opt,name=accountSignature" json:"accountSignature,omitempty"`
AccountSignatureKey []byte `protobuf:"bytes,3,opt,name=accountSignatureKey" json:"accountSignatureKey,omitempty"`
}
func (x *ADVSignedKeyIndexList) Reset() {
*x = ADVSignedKeyIndexList{}
if protoimpl.UnsafeEnabled {
mi := &file_waAdv_WAAdv_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ADVSignedKeyIndexList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ADVSignedKeyIndexList) ProtoMessage() {}
func (x *ADVSignedKeyIndexList) ProtoReflect() protoreflect.Message {
mi := &file_waAdv_WAAdv_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 ADVSignedKeyIndexList.ProtoReflect.Descriptor instead.
func (*ADVSignedKeyIndexList) Descriptor() ([]byte, []int) {
return file_waAdv_WAAdv_proto_rawDescGZIP(), []int{1}
}
func (x *ADVSignedKeyIndexList) GetDetails() []byte {
if x != nil {
return x.Details
}
return nil
}
func (x *ADVSignedKeyIndexList) GetAccountSignature() []byte {
if x != nil {
return x.AccountSignature
}
return nil
}
func (x *ADVSignedKeyIndexList) GetAccountSignatureKey() []byte {
if x != nil {
return x.AccountSignatureKey
}
return nil
}
type ADVDeviceIdentity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RawID *uint32 `protobuf:"varint,1,opt,name=rawID" json:"rawID,omitempty"`
Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
KeyIndex *uint32 `protobuf:"varint,3,opt,name=keyIndex" json:"keyIndex,omitempty"`
AccountType *ADVEncryptionType `protobuf:"varint,4,opt,name=accountType,enum=WAAdv.ADVEncryptionType" json:"accountType,omitempty"`
DeviceType *ADVEncryptionType `protobuf:"varint,5,opt,name=deviceType,enum=WAAdv.ADVEncryptionType" json:"deviceType,omitempty"`
}
func (x *ADVDeviceIdentity) Reset() {
*x = ADVDeviceIdentity{}
if protoimpl.UnsafeEnabled {
mi := &file_waAdv_WAAdv_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ADVDeviceIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ADVDeviceIdentity) ProtoMessage() {}
func (x *ADVDeviceIdentity) ProtoReflect() protoreflect.Message {
mi := &file_waAdv_WAAdv_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 ADVDeviceIdentity.ProtoReflect.Descriptor instead.
func (*ADVDeviceIdentity) Descriptor() ([]byte, []int) {
return file_waAdv_WAAdv_proto_rawDescGZIP(), []int{2}
}
func (x *ADVDeviceIdentity) GetRawID() uint32 {
if x != nil && x.RawID != nil {
return *x.RawID
}
return 0
}
func (x *ADVDeviceIdentity) GetTimestamp() uint64 {
if x != nil && x.Timestamp != nil {
return *x.Timestamp
}
return 0
}
func (x *ADVDeviceIdentity) GetKeyIndex() uint32 {
if x != nil && x.KeyIndex != nil {
return *x.KeyIndex
}
return 0
}
func (x *ADVDeviceIdentity) GetAccountType() ADVEncryptionType {
if x != nil && x.AccountType != nil {
return *x.AccountType
}
return ADVEncryptionType_E2EE
}
func (x *ADVDeviceIdentity) GetDeviceType() ADVEncryptionType {
if x != nil && x.DeviceType != nil {
return *x.DeviceType
}
return ADVEncryptionType_E2EE
}
type ADVSignedDeviceIdentity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Details []byte `protobuf:"bytes,1,opt,name=details" json:"details,omitempty"`
AccountSignatureKey []byte `protobuf:"bytes,2,opt,name=accountSignatureKey" json:"accountSignatureKey,omitempty"`
AccountSignature []byte `protobuf:"bytes,3,opt,name=accountSignature" json:"accountSignature,omitempty"`
DeviceSignature []byte `protobuf:"bytes,4,opt,name=deviceSignature" json:"deviceSignature,omitempty"`
}
func (x *ADVSignedDeviceIdentity) Reset() {
*x = ADVSignedDeviceIdentity{}
if protoimpl.UnsafeEnabled {
mi := &file_waAdv_WAAdv_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ADVSignedDeviceIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ADVSignedDeviceIdentity) ProtoMessage() {}
func (x *ADVSignedDeviceIdentity) ProtoReflect() protoreflect.Message {
mi := &file_waAdv_WAAdv_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 ADVSignedDeviceIdentity.ProtoReflect.Descriptor instead.
func (*ADVSignedDeviceIdentity) Descriptor() ([]byte, []int) {
return file_waAdv_WAAdv_proto_rawDescGZIP(), []int{3}
}
func (x *ADVSignedDeviceIdentity) GetDetails() []byte {
if x != nil {
return x.Details
}
return nil
}
func (x *ADVSignedDeviceIdentity) GetAccountSignatureKey() []byte {
if x != nil {
return x.AccountSignatureKey
}
return nil
}
func (x *ADVSignedDeviceIdentity) GetAccountSignature() []byte {
if x != nil {
return x.AccountSignature
}
return nil
}
func (x *ADVSignedDeviceIdentity) GetDeviceSignature() []byte {
if x != nil {
return x.DeviceSignature
}
return nil
}
type ADVSignedDeviceIdentityHMAC struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Details []byte `protobuf:"bytes,1,opt,name=details" json:"details,omitempty"`
HMAC []byte `protobuf:"bytes,2,opt,name=HMAC" json:"HMAC,omitempty"`
AccountType *ADVEncryptionType `protobuf:"varint,3,opt,name=accountType,enum=WAAdv.ADVEncryptionType" json:"accountType,omitempty"`
}
func (x *ADVSignedDeviceIdentityHMAC) Reset() {
*x = ADVSignedDeviceIdentityHMAC{}
if protoimpl.UnsafeEnabled {
mi := &file_waAdv_WAAdv_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ADVSignedDeviceIdentityHMAC) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ADVSignedDeviceIdentityHMAC) ProtoMessage() {}
func (x *ADVSignedDeviceIdentityHMAC) ProtoReflect() protoreflect.Message {
mi := &file_waAdv_WAAdv_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 ADVSignedDeviceIdentityHMAC.ProtoReflect.Descriptor instead.
func (*ADVSignedDeviceIdentityHMAC) Descriptor() ([]byte, []int) {
return file_waAdv_WAAdv_proto_rawDescGZIP(), []int{4}
}
func (x *ADVSignedDeviceIdentityHMAC) GetDetails() []byte {
if x != nil {
return x.Details
}
return nil
}
func (x *ADVSignedDeviceIdentityHMAC) GetHMAC() []byte {
if x != nil {
return x.HMAC
}
return nil
}
func (x *ADVSignedDeviceIdentityHMAC) GetAccountType() ADVEncryptionType {
if x != nil && x.AccountType != nil {
return *x.AccountType
}
return ADVEncryptionType_E2EE
}
var File_waAdv_WAAdv_proto protoreflect.FileDescriptor
//go:embed WAAdv.pb.raw
var file_waAdv_WAAdv_proto_rawDesc []byte
var (
file_waAdv_WAAdv_proto_rawDescOnce sync.Once
file_waAdv_WAAdv_proto_rawDescData = file_waAdv_WAAdv_proto_rawDesc
)
func file_waAdv_WAAdv_proto_rawDescGZIP() []byte {
file_waAdv_WAAdv_proto_rawDescOnce.Do(func() {
file_waAdv_WAAdv_proto_rawDescData = protoimpl.X.CompressGZIP(file_waAdv_WAAdv_proto_rawDescData)
})
return file_waAdv_WAAdv_proto_rawDescData
}
var file_waAdv_WAAdv_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_waAdv_WAAdv_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_waAdv_WAAdv_proto_goTypes = []interface{}{
(ADVEncryptionType)(0), // 0: WAAdv.ADVEncryptionType
(*ADVKeyIndexList)(nil), // 1: WAAdv.ADVKeyIndexList
(*ADVSignedKeyIndexList)(nil), // 2: WAAdv.ADVSignedKeyIndexList
(*ADVDeviceIdentity)(nil), // 3: WAAdv.ADVDeviceIdentity
(*ADVSignedDeviceIdentity)(nil), // 4: WAAdv.ADVSignedDeviceIdentity
(*ADVSignedDeviceIdentityHMAC)(nil), // 5: WAAdv.ADVSignedDeviceIdentityHMAC
}
var file_waAdv_WAAdv_proto_depIdxs = []int32{
0, // 0: WAAdv.ADVKeyIndexList.accountType:type_name -> WAAdv.ADVEncryptionType
0, // 1: WAAdv.ADVDeviceIdentity.accountType:type_name -> WAAdv.ADVEncryptionType
0, // 2: WAAdv.ADVDeviceIdentity.deviceType:type_name -> WAAdv.ADVEncryptionType
0, // 3: WAAdv.ADVSignedDeviceIdentityHMAC.accountType:type_name -> WAAdv.ADVEncryptionType
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_waAdv_WAAdv_proto_init() }
func file_waAdv_WAAdv_proto_init() {
if File_waAdv_WAAdv_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waAdv_WAAdv_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ADVKeyIndexList); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waAdv_WAAdv_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ADVSignedKeyIndexList); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waAdv_WAAdv_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ADVDeviceIdentity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waAdv_WAAdv_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ADVSignedDeviceIdentity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waAdv_WAAdv_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ADVSignedDeviceIdentityHMAC); 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_waAdv_WAAdv_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waAdv_WAAdv_proto_goTypes,
DependencyIndexes: file_waAdv_WAAdv_proto_depIdxs,
EnumInfos: file_waAdv_WAAdv_proto_enumTypes,
MessageInfos: file_waAdv_WAAdv_proto_msgTypes,
}.Build()
File_waAdv_WAAdv_proto = out.File
file_waAdv_WAAdv_proto_rawDesc = nil
file_waAdv_WAAdv_proto_goTypes = nil
file_waAdv_WAAdv_proto_depIdxs = nil
}

BIN
vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw generated vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,43 @@
syntax = "proto2";
package WAAdv;
option go_package = "go.mau.fi/whatsmeow/proto/waAdv";
enum ADVEncryptionType {
E2EE = 0;
HOSTED = 1;
}
message ADVKeyIndexList {
optional uint32 rawID = 1;
optional uint64 timestamp = 2;
optional uint32 currentIndex = 3;
repeated uint32 validIndexes = 4 [packed=true];
optional ADVEncryptionType accountType = 5;
}
message ADVSignedKeyIndexList {
optional bytes details = 1;
optional bytes accountSignature = 2;
optional bytes accountSignatureKey = 3;
}
message ADVDeviceIdentity {
optional uint32 rawID = 1;
optional uint64 timestamp = 2;
optional uint32 keyIndex = 3;
optional ADVEncryptionType accountType = 4;
optional ADVEncryptionType deviceType = 5;
}
message ADVSignedDeviceIdentity {
optional bytes details = 1;
optional bytes accountSignatureKey = 2;
optional bytes accountSignature = 3;
optional bytes deviceSignature = 4;
}
message ADVSignedDeviceIdentityHMAC {
optional bytes details = 1;
optional bytes HMAC = 2;
optional ADVEncryptionType accountType = 3;
}

View File

@@ -1,6 +1,6 @@
syntax = "proto3";
syntax = "proto2";
package WAArmadilloApplication;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waArmadilloApplication";
option go_package = "go.mau.fi/whatsmeow/proto/waArmadilloApplication";
import "waArmadilloXMA/WAArmadilloXMA.proto";
import "waCommon/WACommon.proto";
@@ -19,30 +19,29 @@ message Armadillo {
}
message SubProtocolPayload {
WACommon.FutureProofBehavior futureProof = 1;
optional WACommon.FutureProofBehavior futureProof = 1;
}
message Signal {
message EncryptedBackupsSecrets {
message Epoch {
enum EpochStatus {
EPOCHSTATUS_UNKNOWN = 0;
ES_OPEN = 1;
ES_CLOSE = 2;
}
uint64 ID = 1;
bytes anonID = 2;
bytes rootKey = 3;
EpochStatus status = 4;
optional uint64 ID = 1;
optional bytes anonID = 2;
optional bytes rootKey = 3;
optional EpochStatus status = 4;
}
uint64 backupID = 1;
uint64 serverDataID = 2;
optional uint64 backupID = 1;
optional uint64 serverDataID = 2;
repeated Epoch epoch = 3;
bytes tempOcmfClientState = 4;
bytes mailboxRootKey = 5;
bytes obliviousValidationToken = 6;
optional bytes tempOcmfClientState = 4;
optional bytes mailboxRootKey = 5;
optional bytes obliviousValidationToken = 6;
}
oneof signal {
@@ -52,9 +51,9 @@ message Armadillo {
message ApplicationData {
message AIBotResponseMessage {
string summonToken = 1;
string messageText = 2;
string serializedExtras = 3;
optional string summonToken = 1;
optional string messageText = 2;
optional string serializedExtras = 3;
}
message MetadataSyncAction {
@@ -66,22 +65,22 @@ message Armadillo {
ActionMessageDelete messageDelete = 101;
}
WACommon.MessageKey key = 1;
optional WACommon.MessageKey key = 1;
}
message SyncChatAction {
message ActionChatRead {
SyncActionMessageRange messageRange = 1;
bool read = 2;
optional SyncActionMessageRange messageRange = 1;
optional bool read = 2;
}
message ActionChatDelete {
SyncActionMessageRange messageRange = 1;
optional SyncActionMessageRange messageRange = 1;
}
message ActionChatArchive {
SyncActionMessageRange messageRange = 1;
bool archived = 2;
optional SyncActionMessageRange messageRange = 1;
optional bool archived = 2;
}
oneof action {
@@ -90,17 +89,17 @@ message Armadillo {
ActionChatRead chatRead = 103;
}
string chatID = 1;
optional string chatID = 1;
}
message SyncActionMessage {
WACommon.MessageKey key = 1;
int64 timestamp = 2;
optional WACommon.MessageKey key = 1;
optional int64 timestamp = 2;
}
message SyncActionMessageRange {
int64 lastMessageTimestamp = 1;
int64 lastSystemMessageTimestamp = 2;
optional int64 lastMessageTimestamp = 1;
optional int64 lastSystemMessageTimestamp = 2;
repeated SyncActionMessage messages = 3;
}
@@ -109,7 +108,7 @@ message Armadillo {
SyncMessageAction messageAction = 102;
}
int64 actionTimestamp = 1;
optional int64 actionTimestamp = 1;
}
message MetadataSyncNotification {
@@ -148,22 +147,27 @@ message Armadillo {
TRANSFER_UNAVAILABLE = 23;
}
uint64 transactionID = 1;
string amount = 2;
string currency = 3;
PaymentStatus paymentStatus = 4;
WAArmadilloXMA.ExtendedContentMessage extendedContentMessage = 5;
optional uint64 transactionID = 1;
optional string amount = 2;
optional string currency = 3;
optional PaymentStatus paymentStatus = 4;
optional WAArmadilloXMA.ExtendedContentMessage extendedContentMessage = 5;
}
message NoteReplyMessage {
string noteID = 1;
WACommon.MessageText noteText = 2;
int64 noteTimestampMS = 3;
WACommon.MessageText noteReplyText = 4;
oneof noteReplyContent {
WACommon.MessageText textContent = 4;
WACommon.SubProtocol stickerContent = 5;
WACommon.SubProtocol videoContent = 6;
}
optional string noteID = 1;
optional WACommon.MessageText noteText = 2;
optional int64 noteTimestampMS = 3;
}
message BumpExistingMessage {
WACommon.MessageKey key = 1;
optional WACommon.MessageKey key = 1;
}
message ImageGalleryMessage {
@@ -172,20 +176,19 @@ message Armadillo {
message ScreenshotAction {
enum ScreenshotType {
SCREENSHOTTYPE_UNKNOWN = 0;
SCREENSHOT_IMAGE = 1;
SCREEN_RECORDING = 2;
}
ScreenshotType screenshotType = 1;
optional ScreenshotType screenshotType = 1;
}
message ExtendedContentMessageWithSear {
string searID = 1;
bytes payload = 2;
string nativeURL = 3;
WACommon.SubProtocol searAssociatedMessage = 4;
string searSentWithMessageID = 5;
optional string searID = 1;
optional bytes payload = 2;
optional string nativeURL = 3;
optional WACommon.SubProtocol searAssociatedMessage = 4;
optional string searSentWithMessageID = 5;
}
message RavenActionNotifMessage {
@@ -195,9 +198,9 @@ message Armadillo {
FORCE_DISABLE = 2;
}
WACommon.MessageKey key = 1;
int64 actionTimestamp = 2;
ActionType actionType = 3;
optional WACommon.MessageKey key = 1;
optional int64 actionTimestamp = 2;
optional ActionType actionType = 3;
}
message RavenMessage {
@@ -212,18 +215,17 @@ message Armadillo {
WACommon.SubProtocol videoMessage = 3;
}
EphemeralType ephemeralType = 1;
optional EphemeralType ephemeralType = 1;
}
message CommonSticker {
enum StickerType {
STICKERTYPE_UNKNOWN = 0;
SMALL_LIKE = 1;
MEDIUM_LIKE = 2;
LARGE_LIKE = 3;
}
StickerType stickerType = 1;
optional StickerType stickerType = 1;
}
oneof content {
@@ -237,9 +239,10 @@ message Armadillo {
PaymentsTransactionMessage paymentsTransactionMessage = 10;
BumpExistingMessage bumpExistingMessage = 11;
NoteReplyMessage noteReplyMessage = 13;
RavenMessage ravenMessageMsgr = 14;
}
}
Payload payload = 1;
Metadata metadata = 2;
optional Payload payload = 1;
optional Metadata metadata = 2;
}

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.34.1
// protoc v3.21.12
// source: waArmadilloXMA/WAArmadilloXMA.proto
@@ -10,7 +10,7 @@ import (
reflect "reflect"
sync "sync"
waCommon "go.mau.fi/whatsmeow/binary/armadillo/waCommon"
waCommon "go.mau.fi/whatsmeow/proto/waCommon"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@@ -89,6 +89,16 @@ func (x ExtendedContentMessage_OverlayIconGlyph) Number() protoreflect.EnumNumbe
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *ExtendedContentMessage_OverlayIconGlyph) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = ExtendedContentMessage_OverlayIconGlyph(num)
return nil
}
// Deprecated: Use ExtendedContentMessage_OverlayIconGlyph.Descriptor instead.
func (ExtendedContentMessage_OverlayIconGlyph) EnumDescriptor() ([]byte, []int) {
return file_waArmadilloXMA_WAArmadilloXMA_proto_rawDescGZIP(), []int{0, 0}
@@ -97,19 +107,16 @@ func (ExtendedContentMessage_OverlayIconGlyph) EnumDescriptor() ([]byte, []int)
type ExtendedContentMessage_CtaButtonType int32
const (
ExtendedContentMessage_CTABUTTONTYPE_UNKNOWN ExtendedContentMessage_CtaButtonType = 0
ExtendedContentMessage_OPEN_NATIVE ExtendedContentMessage_CtaButtonType = 11
ExtendedContentMessage_OPEN_NATIVE ExtendedContentMessage_CtaButtonType = 11
)
// Enum value maps for ExtendedContentMessage_CtaButtonType.
var (
ExtendedContentMessage_CtaButtonType_name = map[int32]string{
0: "CTABUTTONTYPE_UNKNOWN",
11: "OPEN_NATIVE",
}
ExtendedContentMessage_CtaButtonType_value = map[string]int32{
"CTABUTTONTYPE_UNKNOWN": 0,
"OPEN_NATIVE": 11,
"OPEN_NATIVE": 11,
}
)
@@ -135,6 +142,16 @@ func (x ExtendedContentMessage_CtaButtonType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *ExtendedContentMessage_CtaButtonType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = ExtendedContentMessage_CtaButtonType(num)
return nil
}
// Deprecated: Use ExtendedContentMessage_CtaButtonType.Descriptor instead.
func (ExtendedContentMessage_CtaButtonType) EnumDescriptor() ([]byte, []int) {
return file_waArmadilloXMA_WAArmadilloXMA_proto_rawDescGZIP(), []int{0, 1}
@@ -144,24 +161,30 @@ type ExtendedContentMessage_XmaLayoutType int32
const (
ExtendedContentMessage_SINGLE ExtendedContentMessage_XmaLayoutType = 0
ExtendedContentMessage_HSCROLL ExtendedContentMessage_XmaLayoutType = 1
ExtendedContentMessage_PORTRAIT ExtendedContentMessage_XmaLayoutType = 3
ExtendedContentMessage_STANDARD_DXMA ExtendedContentMessage_XmaLayoutType = 12
ExtendedContentMessage_LIST_DXMA ExtendedContentMessage_XmaLayoutType = 15
ExtendedContentMessage_GRID ExtendedContentMessage_XmaLayoutType = 16
)
// Enum value maps for ExtendedContentMessage_XmaLayoutType.
var (
ExtendedContentMessage_XmaLayoutType_name = map[int32]string{
0: "SINGLE",
1: "HSCROLL",
3: "PORTRAIT",
12: "STANDARD_DXMA",
15: "LIST_DXMA",
16: "GRID",
}
ExtendedContentMessage_XmaLayoutType_value = map[string]int32{
"SINGLE": 0,
"HSCROLL": 1,
"PORTRAIT": 3,
"STANDARD_DXMA": 12,
"LIST_DXMA": 15,
"GRID": 16,
}
)
@@ -187,6 +210,16 @@ func (x ExtendedContentMessage_XmaLayoutType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *ExtendedContentMessage_XmaLayoutType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = ExtendedContentMessage_XmaLayoutType(num)
return nil
}
// Deprecated: Use ExtendedContentMessage_XmaLayoutType.Descriptor instead.
func (ExtendedContentMessage_XmaLayoutType) EnumDescriptor() ([]byte, []int) {
return file_waArmadilloXMA_WAArmadilloXMA_proto_rawDescGZIP(), []int{0, 2}
@@ -195,7 +228,6 @@ func (ExtendedContentMessage_XmaLayoutType) EnumDescriptor() ([]byte, []int) {
type ExtendedContentMessage_ExtendedContentType int32
const (
ExtendedContentMessage_EXTENDEDCONTENTTYPE_UNKNOWN ExtendedContentMessage_ExtendedContentType = 0
ExtendedContentMessage_IG_STORY_PHOTO_MENTION ExtendedContentMessage_ExtendedContentType = 4
ExtendedContentMessage_IG_SINGLE_IMAGE_POST_SHARE ExtendedContentMessage_ExtendedContentType = 9
ExtendedContentMessage_IG_MULTIPOST_SHARE ExtendedContentMessage_ExtendedContentType = 10
@@ -237,6 +269,12 @@ const (
ExtendedContentMessage_MSG_GEN_AI_SEARCH_PLUGIN_RESPONSE ExtendedContentMessage_ExtendedContentType = 2008
ExtendedContentMessage_MSG_REELS_LIST ExtendedContentMessage_ExtendedContentType = 2009
ExtendedContentMessage_MSG_CONTACT ExtendedContentMessage_ExtendedContentType = 2010
ExtendedContentMessage_MSG_THREADS_POST_SHARE ExtendedContentMessage_ExtendedContentType = 2011
ExtendedContentMessage_MSG_FILE ExtendedContentMessage_ExtendedContentType = 2012
ExtendedContentMessage_MSG_AVATAR_DETAILS ExtendedContentMessage_ExtendedContentType = 2013
ExtendedContentMessage_MSG_AI_CONTACT ExtendedContentMessage_ExtendedContentType = 2014
ExtendedContentMessage_MSG_MEMORIES_SHARE ExtendedContentMessage_ExtendedContentType = 2015
ExtendedContentMessage_MSG_SHARED_ALBUM_REPLY ExtendedContentMessage_ExtendedContentType = 2016
ExtendedContentMessage_RTC_AUDIO_CALL ExtendedContentMessage_ExtendedContentType = 3000
ExtendedContentMessage_RTC_VIDEO_CALL ExtendedContentMessage_ExtendedContentType = 3001
ExtendedContentMessage_RTC_MISSED_AUDIO_CALL ExtendedContentMessage_ExtendedContentType = 3002
@@ -251,7 +289,6 @@ const (
// Enum value maps for ExtendedContentMessage_ExtendedContentType.
var (
ExtendedContentMessage_ExtendedContentType_name = map[int32]string{
0: "EXTENDEDCONTENTTYPE_UNKNOWN",
4: "IG_STORY_PHOTO_MENTION",
9: "IG_SINGLE_IMAGE_POST_SHARE",
10: "IG_MULTIPOST_SHARE",
@@ -293,6 +330,12 @@ var (
2008: "MSG_GEN_AI_SEARCH_PLUGIN_RESPONSE",
2009: "MSG_REELS_LIST",
2010: "MSG_CONTACT",
2011: "MSG_THREADS_POST_SHARE",
2012: "MSG_FILE",
2013: "MSG_AVATAR_DETAILS",
2014: "MSG_AI_CONTACT",
2015: "MSG_MEMORIES_SHARE",
2016: "MSG_SHARED_ALBUM_REPLY",
3000: "RTC_AUDIO_CALL",
3001: "RTC_VIDEO_CALL",
3002: "RTC_MISSED_AUDIO_CALL",
@@ -304,7 +347,6 @@ var (
4000: "DATACLASS_SENDER_COPY",
}
ExtendedContentMessage_ExtendedContentType_value = map[string]int32{
"EXTENDEDCONTENTTYPE_UNKNOWN": 0,
"IG_STORY_PHOTO_MENTION": 4,
"IG_SINGLE_IMAGE_POST_SHARE": 9,
"IG_MULTIPOST_SHARE": 10,
@@ -346,6 +388,12 @@ var (
"MSG_GEN_AI_SEARCH_PLUGIN_RESPONSE": 2008,
"MSG_REELS_LIST": 2009,
"MSG_CONTACT": 2010,
"MSG_THREADS_POST_SHARE": 2011,
"MSG_FILE": 2012,
"MSG_AVATAR_DETAILS": 2013,
"MSG_AI_CONTACT": 2014,
"MSG_MEMORIES_SHARE": 2015,
"MSG_SHARED_ALBUM_REPLY": 2016,
"RTC_AUDIO_CALL": 3000,
"RTC_VIDEO_CALL": 3001,
"RTC_MISSED_AUDIO_CALL": 3002,
@@ -380,6 +428,16 @@ func (x ExtendedContentMessage_ExtendedContentType) Number() protoreflect.EnumNu
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *ExtendedContentMessage_ExtendedContentType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = ExtendedContentMessage_ExtendedContentType(num)
return nil
}
// Deprecated: Use ExtendedContentMessage_ExtendedContentType.Descriptor instead.
func (ExtendedContentMessage_ExtendedContentType) EnumDescriptor() ([]byte, []int) {
return file_waArmadilloXMA_WAArmadilloXMA_proto_rawDescGZIP(), []int{0, 3}
@@ -390,29 +448,29 @@ type ExtendedContentMessage struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AssociatedMessage *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=associatedMessage,proto3" json:"associatedMessage,omitempty"`
TargetType ExtendedContentMessage_ExtendedContentType `protobuf:"varint,2,opt,name=targetType,proto3,enum=WAArmadilloXMA.ExtendedContentMessage_ExtendedContentType" json:"targetType,omitempty"`
TargetUsername string `protobuf:"bytes,3,opt,name=targetUsername,proto3" json:"targetUsername,omitempty"`
TargetID string `protobuf:"bytes,4,opt,name=targetID,proto3" json:"targetID,omitempty"`
TargetExpiringAtSec int64 `protobuf:"varint,5,opt,name=targetExpiringAtSec,proto3" json:"targetExpiringAtSec,omitempty"`
XmaLayoutType ExtendedContentMessage_XmaLayoutType `protobuf:"varint,6,opt,name=xmaLayoutType,proto3,enum=WAArmadilloXMA.ExtendedContentMessage_XmaLayoutType" json:"xmaLayoutType,omitempty"`
Ctas []*ExtendedContentMessage_CTA `protobuf:"bytes,7,rep,name=ctas,proto3" json:"ctas,omitempty"`
Previews []*waCommon.SubProtocol `protobuf:"bytes,8,rep,name=previews,proto3" json:"previews,omitempty"`
TitleText string `protobuf:"bytes,9,opt,name=titleText,proto3" json:"titleText,omitempty"`
SubtitleText string `protobuf:"bytes,10,opt,name=subtitleText,proto3" json:"subtitleText,omitempty"`
MaxTitleNumOfLines uint32 `protobuf:"varint,11,opt,name=maxTitleNumOfLines,proto3" json:"maxTitleNumOfLines,omitempty"`
MaxSubtitleNumOfLines uint32 `protobuf:"varint,12,opt,name=maxSubtitleNumOfLines,proto3" json:"maxSubtitleNumOfLines,omitempty"`
Favicon *waCommon.SubProtocol `protobuf:"bytes,13,opt,name=favicon,proto3" json:"favicon,omitempty"`
HeaderImage *waCommon.SubProtocol `protobuf:"bytes,14,opt,name=headerImage,proto3" json:"headerImage,omitempty"`
HeaderTitle string `protobuf:"bytes,15,opt,name=headerTitle,proto3" json:"headerTitle,omitempty"`
OverlayIconGlyph ExtendedContentMessage_OverlayIconGlyph `protobuf:"varint,16,opt,name=overlayIconGlyph,proto3,enum=WAArmadilloXMA.ExtendedContentMessage_OverlayIconGlyph" json:"overlayIconGlyph,omitempty"`
OverlayTitle string `protobuf:"bytes,17,opt,name=overlayTitle,proto3" json:"overlayTitle,omitempty"`
OverlayDescription string `protobuf:"bytes,18,opt,name=overlayDescription,proto3" json:"overlayDescription,omitempty"`
SentWithMessageID string `protobuf:"bytes,19,opt,name=sentWithMessageID,proto3" json:"sentWithMessageID,omitempty"`
MessageText string `protobuf:"bytes,20,opt,name=messageText,proto3" json:"messageText,omitempty"`
HeaderSubtitle string `protobuf:"bytes,21,opt,name=headerSubtitle,proto3" json:"headerSubtitle,omitempty"`
XmaDataclass string `protobuf:"bytes,22,opt,name=xmaDataclass,proto3" json:"xmaDataclass,omitempty"`
ContentRef string `protobuf:"bytes,23,opt,name=contentRef,proto3" json:"contentRef,omitempty"`
AssociatedMessage *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=associatedMessage" json:"associatedMessage,omitempty"`
TargetType *ExtendedContentMessage_ExtendedContentType `protobuf:"varint,2,opt,name=targetType,enum=WAArmadilloXMA.ExtendedContentMessage_ExtendedContentType" json:"targetType,omitempty"`
TargetUsername *string `protobuf:"bytes,3,opt,name=targetUsername" json:"targetUsername,omitempty"`
TargetID *string `protobuf:"bytes,4,opt,name=targetID" json:"targetID,omitempty"`
TargetExpiringAtSec *int64 `protobuf:"varint,5,opt,name=targetExpiringAtSec" json:"targetExpiringAtSec,omitempty"`
XmaLayoutType *ExtendedContentMessage_XmaLayoutType `protobuf:"varint,6,opt,name=xmaLayoutType,enum=WAArmadilloXMA.ExtendedContentMessage_XmaLayoutType" json:"xmaLayoutType,omitempty"`
Ctas []*ExtendedContentMessage_CTA `protobuf:"bytes,7,rep,name=ctas" json:"ctas,omitempty"`
Previews []*waCommon.SubProtocol `protobuf:"bytes,8,rep,name=previews" json:"previews,omitempty"`
TitleText *string `protobuf:"bytes,9,opt,name=titleText" json:"titleText,omitempty"`
SubtitleText *string `protobuf:"bytes,10,opt,name=subtitleText" json:"subtitleText,omitempty"`
MaxTitleNumOfLines *uint32 `protobuf:"varint,11,opt,name=maxTitleNumOfLines" json:"maxTitleNumOfLines,omitempty"`
MaxSubtitleNumOfLines *uint32 `protobuf:"varint,12,opt,name=maxSubtitleNumOfLines" json:"maxSubtitleNumOfLines,omitempty"`
Favicon *waCommon.SubProtocol `protobuf:"bytes,13,opt,name=favicon" json:"favicon,omitempty"`
HeaderImage *waCommon.SubProtocol `protobuf:"bytes,14,opt,name=headerImage" json:"headerImage,omitempty"`
HeaderTitle *string `protobuf:"bytes,15,opt,name=headerTitle" json:"headerTitle,omitempty"`
OverlayIconGlyph *ExtendedContentMessage_OverlayIconGlyph `protobuf:"varint,16,opt,name=overlayIconGlyph,enum=WAArmadilloXMA.ExtendedContentMessage_OverlayIconGlyph" json:"overlayIconGlyph,omitempty"`
OverlayTitle *string `protobuf:"bytes,17,opt,name=overlayTitle" json:"overlayTitle,omitempty"`
OverlayDescription *string `protobuf:"bytes,18,opt,name=overlayDescription" json:"overlayDescription,omitempty"`
SentWithMessageID *string `protobuf:"bytes,19,opt,name=sentWithMessageID" json:"sentWithMessageID,omitempty"`
MessageText *string `protobuf:"bytes,20,opt,name=messageText" json:"messageText,omitempty"`
HeaderSubtitle *string `protobuf:"bytes,21,opt,name=headerSubtitle" json:"headerSubtitle,omitempty"`
XmaDataclass *string `protobuf:"bytes,22,opt,name=xmaDataclass" json:"xmaDataclass,omitempty"`
ContentRef *string `protobuf:"bytes,23,opt,name=contentRef" json:"contentRef,omitempty"`
}
func (x *ExtendedContentMessage) Reset() {
@@ -455,36 +513,36 @@ func (x *ExtendedContentMessage) GetAssociatedMessage() *waCommon.SubProtocol {
}
func (x *ExtendedContentMessage) GetTargetType() ExtendedContentMessage_ExtendedContentType {
if x != nil {
return x.TargetType
if x != nil && x.TargetType != nil {
return *x.TargetType
}
return ExtendedContentMessage_EXTENDEDCONTENTTYPE_UNKNOWN
return ExtendedContentMessage_IG_STORY_PHOTO_MENTION
}
func (x *ExtendedContentMessage) GetTargetUsername() string {
if x != nil {
return x.TargetUsername
if x != nil && x.TargetUsername != nil {
return *x.TargetUsername
}
return ""
}
func (x *ExtendedContentMessage) GetTargetID() string {
if x != nil {
return x.TargetID
if x != nil && x.TargetID != nil {
return *x.TargetID
}
return ""
}
func (x *ExtendedContentMessage) GetTargetExpiringAtSec() int64 {
if x != nil {
return x.TargetExpiringAtSec
if x != nil && x.TargetExpiringAtSec != nil {
return *x.TargetExpiringAtSec
}
return 0
}
func (x *ExtendedContentMessage) GetXmaLayoutType() ExtendedContentMessage_XmaLayoutType {
if x != nil {
return x.XmaLayoutType
if x != nil && x.XmaLayoutType != nil {
return *x.XmaLayoutType
}
return ExtendedContentMessage_SINGLE
}
@@ -504,29 +562,29 @@ func (x *ExtendedContentMessage) GetPreviews() []*waCommon.SubProtocol {
}
func (x *ExtendedContentMessage) GetTitleText() string {
if x != nil {
return x.TitleText
if x != nil && x.TitleText != nil {
return *x.TitleText
}
return ""
}
func (x *ExtendedContentMessage) GetSubtitleText() string {
if x != nil {
return x.SubtitleText
if x != nil && x.SubtitleText != nil {
return *x.SubtitleText
}
return ""
}
func (x *ExtendedContentMessage) GetMaxTitleNumOfLines() uint32 {
if x != nil {
return x.MaxTitleNumOfLines
if x != nil && x.MaxTitleNumOfLines != nil {
return *x.MaxTitleNumOfLines
}
return 0
}
func (x *ExtendedContentMessage) GetMaxSubtitleNumOfLines() uint32 {
if x != nil {
return x.MaxSubtitleNumOfLines
if x != nil && x.MaxSubtitleNumOfLines != nil {
return *x.MaxSubtitleNumOfLines
}
return 0
}
@@ -546,64 +604,64 @@ func (x *ExtendedContentMessage) GetHeaderImage() *waCommon.SubProtocol {
}
func (x *ExtendedContentMessage) GetHeaderTitle() string {
if x != nil {
return x.HeaderTitle
if x != nil && x.HeaderTitle != nil {
return *x.HeaderTitle
}
return ""
}
func (x *ExtendedContentMessage) GetOverlayIconGlyph() ExtendedContentMessage_OverlayIconGlyph {
if x != nil {
return x.OverlayIconGlyph
if x != nil && x.OverlayIconGlyph != nil {
return *x.OverlayIconGlyph
}
return ExtendedContentMessage_INFO
}
func (x *ExtendedContentMessage) GetOverlayTitle() string {
if x != nil {
return x.OverlayTitle
if x != nil && x.OverlayTitle != nil {
return *x.OverlayTitle
}
return ""
}
func (x *ExtendedContentMessage) GetOverlayDescription() string {
if x != nil {
return x.OverlayDescription
if x != nil && x.OverlayDescription != nil {
return *x.OverlayDescription
}
return ""
}
func (x *ExtendedContentMessage) GetSentWithMessageID() string {
if x != nil {
return x.SentWithMessageID
if x != nil && x.SentWithMessageID != nil {
return *x.SentWithMessageID
}
return ""
}
func (x *ExtendedContentMessage) GetMessageText() string {
if x != nil {
return x.MessageText
if x != nil && x.MessageText != nil {
return *x.MessageText
}
return ""
}
func (x *ExtendedContentMessage) GetHeaderSubtitle() string {
if x != nil {
return x.HeaderSubtitle
if x != nil && x.HeaderSubtitle != nil {
return *x.HeaderSubtitle
}
return ""
}
func (x *ExtendedContentMessage) GetXmaDataclass() string {
if x != nil {
return x.XmaDataclass
if x != nil && x.XmaDataclass != nil {
return *x.XmaDataclass
}
return ""
}
func (x *ExtendedContentMessage) GetContentRef() string {
if x != nil {
return x.ContentRef
if x != nil && x.ContentRef != nil {
return *x.ContentRef
}
return ""
}
@@ -613,11 +671,12 @@ type ExtendedContentMessage_CTA struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ButtonType ExtendedContentMessage_CtaButtonType `protobuf:"varint,1,opt,name=buttonType,proto3,enum=WAArmadilloXMA.ExtendedContentMessage_CtaButtonType" json:"buttonType,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
ActionURL string `protobuf:"bytes,3,opt,name=actionURL,proto3" json:"actionURL,omitempty"`
NativeURL string `protobuf:"bytes,4,opt,name=nativeURL,proto3" json:"nativeURL,omitempty"`
CtaType string `protobuf:"bytes,5,opt,name=ctaType,proto3" json:"ctaType,omitempty"`
ButtonType *ExtendedContentMessage_CtaButtonType `protobuf:"varint,1,opt,name=buttonType,enum=WAArmadilloXMA.ExtendedContentMessage_CtaButtonType" json:"buttonType,omitempty"`
Title *string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
ActionURL *string `protobuf:"bytes,3,opt,name=actionURL" json:"actionURL,omitempty"`
NativeURL *string `protobuf:"bytes,4,opt,name=nativeURL" json:"nativeURL,omitempty"`
CtaType *string `protobuf:"bytes,5,opt,name=ctaType" json:"ctaType,omitempty"`
ActionContentBlob *string `protobuf:"bytes,6,opt,name=actionContentBlob" json:"actionContentBlob,omitempty"`
}
func (x *ExtendedContentMessage_CTA) Reset() {
@@ -653,36 +712,43 @@ func (*ExtendedContentMessage_CTA) Descriptor() ([]byte, []int) {
}
func (x *ExtendedContentMessage_CTA) GetButtonType() ExtendedContentMessage_CtaButtonType {
if x != nil {
return x.ButtonType
if x != nil && x.ButtonType != nil {
return *x.ButtonType
}
return ExtendedContentMessage_CTABUTTONTYPE_UNKNOWN
return ExtendedContentMessage_OPEN_NATIVE
}
func (x *ExtendedContentMessage_CTA) GetTitle() string {
if x != nil {
return x.Title
if x != nil && x.Title != nil {
return *x.Title
}
return ""
}
func (x *ExtendedContentMessage_CTA) GetActionURL() string {
if x != nil {
return x.ActionURL
if x != nil && x.ActionURL != nil {
return *x.ActionURL
}
return ""
}
func (x *ExtendedContentMessage_CTA) GetNativeURL() string {
if x != nil {
return x.NativeURL
if x != nil && x.NativeURL != nil {
return *x.NativeURL
}
return ""
}
func (x *ExtendedContentMessage_CTA) GetCtaType() string {
if x != nil {
return x.CtaType
if x != nil && x.CtaType != nil {
return *x.CtaType
}
return ""
}
func (x *ExtendedContentMessage_CTA) GetActionContentBlob() string {
if x != nil && x.ActionContentBlob != nil {
return *x.ActionContentBlob
}
return ""
}

View File

@@ -1,6 +1,6 @@
syntax = "proto3";
syntax = "proto2";
package WAArmadilloXMA;
option go_package = "go.mau.fi/whatsmeow/binary/armadillo/waArmadilloXMA";
option go_package = "go.mau.fi/whatsmeow/proto/waArmadilloXMA";
import "waCommon/WACommon.proto";
@@ -19,19 +19,19 @@ message ExtendedContentMessage {
}
enum CtaButtonType {
CTABUTTONTYPE_UNKNOWN = 0;
OPEN_NATIVE = 11;
}
enum XmaLayoutType {
SINGLE = 0;
HSCROLL = 1;
PORTRAIT = 3;
STANDARD_DXMA = 12;
LIST_DXMA = 15;
GRID = 16;
}
enum ExtendedContentType {
EXTENDEDCONTENTTYPE_UNKNOWN = 0;
IG_STORY_PHOTO_MENTION = 4;
IG_SINGLE_IMAGE_POST_SHARE = 9;
IG_MULTIPOST_SHARE = 10;
@@ -73,6 +73,12 @@ message ExtendedContentMessage {
MSG_GEN_AI_SEARCH_PLUGIN_RESPONSE = 2008;
MSG_REELS_LIST = 2009;
MSG_CONTACT = 2010;
MSG_THREADS_POST_SHARE = 2011;
MSG_FILE = 2012;
MSG_AVATAR_DETAILS = 2013;
MSG_AI_CONTACT = 2014;
MSG_MEMORIES_SHARE = 2015;
MSG_SHARED_ALBUM_REPLY = 2016;
RTC_AUDIO_CALL = 3000;
RTC_VIDEO_CALL = 3001;
RTC_MISSED_AUDIO_CALL = 3002;
@@ -85,34 +91,35 @@ message ExtendedContentMessage {
}
message CTA {
CtaButtonType buttonType = 1;
string title = 2;
string actionURL = 3;
string nativeURL = 4;
string ctaType = 5;
optional CtaButtonType buttonType = 1;
optional string title = 2;
optional string actionURL = 3;
optional string nativeURL = 4;
optional string ctaType = 5;
optional string actionContentBlob = 6;
}
WACommon.SubProtocol associatedMessage = 1;
ExtendedContentType targetType = 2;
string targetUsername = 3;
string targetID = 4;
int64 targetExpiringAtSec = 5;
XmaLayoutType xmaLayoutType = 6;
optional WACommon.SubProtocol associatedMessage = 1;
optional ExtendedContentType targetType = 2;
optional string targetUsername = 3;
optional string targetID = 4;
optional int64 targetExpiringAtSec = 5;
optional XmaLayoutType xmaLayoutType = 6;
repeated CTA ctas = 7;
repeated WACommon.SubProtocol previews = 8;
string titleText = 9;
string subtitleText = 10;
uint32 maxTitleNumOfLines = 11;
uint32 maxSubtitleNumOfLines = 12;
WACommon.SubProtocol favicon = 13;
WACommon.SubProtocol headerImage = 14;
string headerTitle = 15;
OverlayIconGlyph overlayIconGlyph = 16;
string overlayTitle = 17;
string overlayDescription = 18;
string sentWithMessageID = 19;
string messageText = 20;
string headerSubtitle = 21;
string xmaDataclass = 22;
string contentRef = 23;
optional string titleText = 9;
optional string subtitleText = 10;
optional uint32 maxTitleNumOfLines = 11;
optional uint32 maxSubtitleNumOfLines = 12;
optional WACommon.SubProtocol favicon = 13;
optional WACommon.SubProtocol headerImage = 14;
optional string headerTitle = 15;
optional OverlayIconGlyph overlayIconGlyph = 16;
optional string overlayTitle = 17;
optional string overlayDescription = 18;
optional string sentWithMessageID = 19;
optional string messageText = 20;
optional string headerSubtitle = 21;
optional string xmaDataclass = 22;
optional string contentRef = 23;
}

469
vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go generated vendored Normal file
View File

@@ -0,0 +1,469 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc v3.21.12
// source: waCert/WACert.proto
package waCert
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 NoiseCertificate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Details []byte `protobuf:"bytes,1,opt,name=details" json:"details,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
}
func (x *NoiseCertificate) Reset() {
*x = NoiseCertificate{}
if protoimpl.UnsafeEnabled {
mi := &file_waCert_WACert_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NoiseCertificate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NoiseCertificate) ProtoMessage() {}
func (x *NoiseCertificate) ProtoReflect() protoreflect.Message {
mi := &file_waCert_WACert_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 NoiseCertificate.ProtoReflect.Descriptor instead.
func (*NoiseCertificate) Descriptor() ([]byte, []int) {
return file_waCert_WACert_proto_rawDescGZIP(), []int{0}
}
func (x *NoiseCertificate) GetDetails() []byte {
if x != nil {
return x.Details
}
return nil
}
func (x *NoiseCertificate) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type CertChain struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Leaf *CertChain_NoiseCertificate `protobuf:"bytes,1,opt,name=leaf" json:"leaf,omitempty"`
Intermediate *CertChain_NoiseCertificate `protobuf:"bytes,2,opt,name=intermediate" json:"intermediate,omitempty"`
}
func (x *CertChain) Reset() {
*x = CertChain{}
if protoimpl.UnsafeEnabled {
mi := &file_waCert_WACert_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CertChain) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CertChain) ProtoMessage() {}
func (x *CertChain) ProtoReflect() protoreflect.Message {
mi := &file_waCert_WACert_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 CertChain.ProtoReflect.Descriptor instead.
func (*CertChain) Descriptor() ([]byte, []int) {
return file_waCert_WACert_proto_rawDescGZIP(), []int{1}
}
func (x *CertChain) GetLeaf() *CertChain_NoiseCertificate {
if x != nil {
return x.Leaf
}
return nil
}
func (x *CertChain) GetIntermediate() *CertChain_NoiseCertificate {
if x != nil {
return x.Intermediate
}
return nil
}
type NoiseCertificate_Details struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Serial *uint32 `protobuf:"varint,1,opt,name=serial" json:"serial,omitempty"`
Issuer *string `protobuf:"bytes,2,opt,name=issuer" json:"issuer,omitempty"`
Expires *uint64 `protobuf:"varint,3,opt,name=expires" json:"expires,omitempty"`
Subject *string `protobuf:"bytes,4,opt,name=subject" json:"subject,omitempty"`
Key []byte `protobuf:"bytes,5,opt,name=key" json:"key,omitempty"`
}
func (x *NoiseCertificate_Details) Reset() {
*x = NoiseCertificate_Details{}
if protoimpl.UnsafeEnabled {
mi := &file_waCert_WACert_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NoiseCertificate_Details) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NoiseCertificate_Details) ProtoMessage() {}
func (x *NoiseCertificate_Details) ProtoReflect() protoreflect.Message {
mi := &file_waCert_WACert_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 NoiseCertificate_Details.ProtoReflect.Descriptor instead.
func (*NoiseCertificate_Details) Descriptor() ([]byte, []int) {
return file_waCert_WACert_proto_rawDescGZIP(), []int{0, 0}
}
func (x *NoiseCertificate_Details) GetSerial() uint32 {
if x != nil && x.Serial != nil {
return *x.Serial
}
return 0
}
func (x *NoiseCertificate_Details) GetIssuer() string {
if x != nil && x.Issuer != nil {
return *x.Issuer
}
return ""
}
func (x *NoiseCertificate_Details) GetExpires() uint64 {
if x != nil && x.Expires != nil {
return *x.Expires
}
return 0
}
func (x *NoiseCertificate_Details) GetSubject() string {
if x != nil && x.Subject != nil {
return *x.Subject
}
return ""
}
func (x *NoiseCertificate_Details) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
type CertChain_NoiseCertificate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Details []byte `protobuf:"bytes,1,opt,name=details" json:"details,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
}
func (x *CertChain_NoiseCertificate) Reset() {
*x = CertChain_NoiseCertificate{}
if protoimpl.UnsafeEnabled {
mi := &file_waCert_WACert_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CertChain_NoiseCertificate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CertChain_NoiseCertificate) ProtoMessage() {}
func (x *CertChain_NoiseCertificate) ProtoReflect() protoreflect.Message {
mi := &file_waCert_WACert_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 CertChain_NoiseCertificate.ProtoReflect.Descriptor instead.
func (*CertChain_NoiseCertificate) Descriptor() ([]byte, []int) {
return file_waCert_WACert_proto_rawDescGZIP(), []int{1, 0}
}
func (x *CertChain_NoiseCertificate) GetDetails() []byte {
if x != nil {
return x.Details
}
return nil
}
func (x *CertChain_NoiseCertificate) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type CertChain_NoiseCertificate_Details struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Serial *uint32 `protobuf:"varint,1,opt,name=serial" json:"serial,omitempty"`
IssuerSerial *uint32 `protobuf:"varint,2,opt,name=issuerSerial" json:"issuerSerial,omitempty"`
Key []byte `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
NotBefore *uint64 `protobuf:"varint,4,opt,name=notBefore" json:"notBefore,omitempty"`
NotAfter *uint64 `protobuf:"varint,5,opt,name=notAfter" json:"notAfter,omitempty"`
}
func (x *CertChain_NoiseCertificate_Details) Reset() {
*x = CertChain_NoiseCertificate_Details{}
if protoimpl.UnsafeEnabled {
mi := &file_waCert_WACert_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CertChain_NoiseCertificate_Details) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CertChain_NoiseCertificate_Details) ProtoMessage() {}
func (x *CertChain_NoiseCertificate_Details) ProtoReflect() protoreflect.Message {
mi := &file_waCert_WACert_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 CertChain_NoiseCertificate_Details.ProtoReflect.Descriptor instead.
func (*CertChain_NoiseCertificate_Details) Descriptor() ([]byte, []int) {
return file_waCert_WACert_proto_rawDescGZIP(), []int{1, 0, 0}
}
func (x *CertChain_NoiseCertificate_Details) GetSerial() uint32 {
if x != nil && x.Serial != nil {
return *x.Serial
}
return 0
}
func (x *CertChain_NoiseCertificate_Details) GetIssuerSerial() uint32 {
if x != nil && x.IssuerSerial != nil {
return *x.IssuerSerial
}
return 0
}
func (x *CertChain_NoiseCertificate_Details) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *CertChain_NoiseCertificate_Details) GetNotBefore() uint64 {
if x != nil && x.NotBefore != nil {
return *x.NotBefore
}
return 0
}
func (x *CertChain_NoiseCertificate_Details) GetNotAfter() uint64 {
if x != nil && x.NotAfter != nil {
return *x.NotAfter
}
return 0
}
var File_waCert_WACert_proto protoreflect.FileDescriptor
//go:embed WACert.pb.raw
var file_waCert_WACert_proto_rawDesc []byte
var (
file_waCert_WACert_proto_rawDescOnce sync.Once
file_waCert_WACert_proto_rawDescData = file_waCert_WACert_proto_rawDesc
)
func file_waCert_WACert_proto_rawDescGZIP() []byte {
file_waCert_WACert_proto_rawDescOnce.Do(func() {
file_waCert_WACert_proto_rawDescData = protoimpl.X.CompressGZIP(file_waCert_WACert_proto_rawDescData)
})
return file_waCert_WACert_proto_rawDescData
}
var file_waCert_WACert_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_waCert_WACert_proto_goTypes = []interface{}{
(*NoiseCertificate)(nil), // 0: WACert.NoiseCertificate
(*CertChain)(nil), // 1: WACert.CertChain
(*NoiseCertificate_Details)(nil), // 2: WACert.NoiseCertificate.Details
(*CertChain_NoiseCertificate)(nil), // 3: WACert.CertChain.NoiseCertificate
(*CertChain_NoiseCertificate_Details)(nil), // 4: WACert.CertChain.NoiseCertificate.Details
}
var file_waCert_WACert_proto_depIdxs = []int32{
3, // 0: WACert.CertChain.leaf:type_name -> WACert.CertChain.NoiseCertificate
3, // 1: WACert.CertChain.intermediate:type_name -> WACert.CertChain.NoiseCertificate
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_waCert_WACert_proto_init() }
func file_waCert_WACert_proto_init() {
if File_waCert_WACert_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waCert_WACert_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NoiseCertificate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCert_WACert_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertChain); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCert_WACert_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NoiseCertificate_Details); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCert_WACert_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertChain_NoiseCertificate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCert_WACert_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertChain_NoiseCertificate_Details); 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_waCert_WACert_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waCert_WACert_proto_goTypes,
DependencyIndexes: file_waCert_WACert_proto_depIdxs,
MessageInfos: file_waCert_WACert_proto_msgTypes,
}.Build()
File_waCert_WACert_proto = out.File
file_waCert_WACert_proto_rawDesc = nil
file_waCert_WACert_proto_goTypes = nil
file_waCert_WACert_proto_depIdxs = nil
}

23
vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw generated vendored Normal file
View File

@@ -0,0 +1,23 @@
waCert/WACert.protoWACert"Ë
NoiseCertificate
details ( Rdetails
signature ( R signature
Details
serial ( Rserial
issuer ( Rissuer
expires (Rexpires
subject ( Rsubject
key ( Rkey"ì
CertChain6
leaf ( 2".WACert.CertChain.NoiseCertificateRleafF
intermediate ( 2".WACert.CertChain.NoiseCertificateR intermediateÞ
NoiseCertificate
details ( Rdetails
signature ( R signature
Details
serial ( Rserial"
issuerSerial ( R issuerSerial
key ( Rkey
notBefore (R notBefore
notAfter (RnotAfterB"Z go.mau.fi/whatsmeow/proto/waCert

View File

@@ -0,0 +1,34 @@
syntax = "proto2";
package WACert;
option go_package = "go.mau.fi/whatsmeow/proto/waCert";
message NoiseCertificate {
message Details {
optional uint32 serial = 1;
optional string issuer = 2;
optional uint64 expires = 3;
optional string subject = 4;
optional bytes key = 5;
}
optional bytes details = 1;
optional bytes signature = 2;
}
message CertChain {
message NoiseCertificate {
message Details {
optional uint32 serial = 1;
optional uint32 issuerSerial = 2;
optional bytes key = 3;
optional uint64 notBefore = 4;
optional uint64 notAfter = 5;
}
optional bytes details = 1;
optional bytes signature = 2;
}
optional NoiseCertificate leaf = 1;
optional NoiseCertificate intermediate = 2;
}

View File

@@ -0,0 +1,150 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc v3.21.12
// source: waChatLockSettings/WAProtobufsChatLockSettings.proto
package waChatLockSettings
import (
reflect "reflect"
sync "sync"
waUserPassword "go.mau.fi/whatsmeow/proto/waUserPassword"
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 ChatLockSettings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HideLockedChats *bool `protobuf:"varint,1,opt,name=hideLockedChats" json:"hideLockedChats,omitempty"`
SecretCode *waUserPassword.UserPassword `protobuf:"bytes,2,opt,name=secretCode" json:"secretCode,omitempty"`
}
func (x *ChatLockSettings) Reset() {
*x = ChatLockSettings{}
if protoimpl.UnsafeEnabled {
mi := &file_waChatLockSettings_WAProtobufsChatLockSettings_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChatLockSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChatLockSettings) ProtoMessage() {}
func (x *ChatLockSettings) ProtoReflect() protoreflect.Message {
mi := &file_waChatLockSettings_WAProtobufsChatLockSettings_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 ChatLockSettings.ProtoReflect.Descriptor instead.
func (*ChatLockSettings) Descriptor() ([]byte, []int) {
return file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescGZIP(), []int{0}
}
func (x *ChatLockSettings) GetHideLockedChats() bool {
if x != nil && x.HideLockedChats != nil {
return *x.HideLockedChats
}
return false
}
func (x *ChatLockSettings) GetSecretCode() *waUserPassword.UserPassword {
if x != nil {
return x.SecretCode
}
return nil
}
var File_waChatLockSettings_WAProtobufsChatLockSettings_proto protoreflect.FileDescriptor
//go:embed WAProtobufsChatLockSettings.pb.raw
var file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDesc []byte
var (
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescOnce sync.Once
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescData = file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDesc
)
func file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescGZIP() []byte {
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescOnce.Do(func() {
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescData = protoimpl.X.CompressGZIP(file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescData)
})
return file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDescData
}
var file_waChatLockSettings_WAProtobufsChatLockSettings_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_waChatLockSettings_WAProtobufsChatLockSettings_proto_goTypes = []interface{}{
(*ChatLockSettings)(nil), // 0: WAProtobufsChatLockSettings.ChatLockSettings
(*waUserPassword.UserPassword)(nil), // 1: WAProtobufsUserPassword.UserPassword
}
var file_waChatLockSettings_WAProtobufsChatLockSettings_proto_depIdxs = []int32{
1, // 0: WAProtobufsChatLockSettings.ChatLockSettings.secretCode:type_name -> WAProtobufsUserPassword.UserPassword
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_waChatLockSettings_WAProtobufsChatLockSettings_proto_init() }
func file_waChatLockSettings_WAProtobufsChatLockSettings_proto_init() {
if File_waChatLockSettings_WAProtobufsChatLockSettings_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChatLockSettings); 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_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waChatLockSettings_WAProtobufsChatLockSettings_proto_goTypes,
DependencyIndexes: file_waChatLockSettings_WAProtobufsChatLockSettings_proto_depIdxs,
MessageInfos: file_waChatLockSettings_WAProtobufsChatLockSettings_proto_msgTypes,
}.Build()
File_waChatLockSettings_WAProtobufsChatLockSettings_proto = out.File
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_rawDesc = nil
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_goTypes = nil
file_waChatLockSettings_WAProtobufsChatLockSettings_proto_depIdxs = nil
}

View File

@@ -0,0 +1,7 @@
4waChatLockSettings/WAProtobufsChatLockSettings.protoWAProtobufsChatLockSettings,waUserPassword/WAProtobufsUserPassword.proto"ƒ
ChatLockSettings(
hideLockedChats (RhideLockedChatsE
secretCode ( 2%.WAProtobufsUserPassword.UserPasswordR
secretCodeB.Z,go.mau.fi/whatsmeow/proto/waChatLockSettings

View File

@@ -0,0 +1,10 @@
syntax = "proto2";
package WAProtobufsChatLockSettings;
option go_package = "go.mau.fi/whatsmeow/proto/waChatLockSettings";
import "waUserPassword/WAProtobufsUserPassword.proto";
message ChatLockSettings {
optional bool hideLockedChats = 1;
optional WAProtobufsUserPassword.UserPassword secretCode = 2;
}

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.34.1
// protoc v3.21.12
// source: waCommon/WACommon.proto
@@ -67,6 +67,16 @@ func (x FutureProofBehavior) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *FutureProofBehavior) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = FutureProofBehavior(num)
return nil
}
// Deprecated: Use FutureProofBehavior.Descriptor instead.
func (FutureProofBehavior) EnumDescriptor() ([]byte, []int) {
return file_waCommon_WACommon_proto_rawDescGZIP(), []int{0}
@@ -75,25 +85,25 @@ func (FutureProofBehavior) EnumDescriptor() ([]byte, []int) {
type Command_CommandType int32
const (
Command_COMMANDTYPE_UNKNOWN Command_CommandType = 0
Command_EVERYONE Command_CommandType = 1
Command_SILENT Command_CommandType = 2
Command_AI Command_CommandType = 3
Command_EVERYONE Command_CommandType = 1
Command_SILENT Command_CommandType = 2
Command_AI Command_CommandType = 3
Command_AI_IMAGINE Command_CommandType = 4
)
// Enum value maps for Command_CommandType.
var (
Command_CommandType_name = map[int32]string{
0: "COMMANDTYPE_UNKNOWN",
1: "EVERYONE",
2: "SILENT",
3: "AI",
4: "AI_IMAGINE",
}
Command_CommandType_value = map[string]int32{
"COMMANDTYPE_UNKNOWN": 0,
"EVERYONE": 1,
"SILENT": 2,
"AI": 3,
"EVERYONE": 1,
"SILENT": 2,
"AI": 3,
"AI_IMAGINE": 4,
}
)
@@ -119,6 +129,16 @@ func (x Command_CommandType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *Command_CommandType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = Command_CommandType(num)
return nil
}
// Deprecated: Use Command_CommandType.Descriptor instead.
func (Command_CommandType) EnumDescriptor() ([]byte, []int) {
return file_waCommon_WACommon_proto_rawDescGZIP(), []int{1, 0}
@@ -129,10 +149,10 @@ type MessageKey struct {
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"`
RemoteJID *string `protobuf:"bytes,1,opt,name=remoteJID" json:"remoteJID,omitempty"`
FromMe *bool `protobuf:"varint,2,opt,name=fromMe" json:"fromMe,omitempty"`
ID *string `protobuf:"bytes,3,opt,name=ID" json:"ID,omitempty"`
Participant *string `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"`
}
func (x *MessageKey) Reset() {
@@ -168,29 +188,29 @@ func (*MessageKey) Descriptor() ([]byte, []int) {
}
func (x *MessageKey) GetRemoteJID() string {
if x != nil {
return x.RemoteJID
if x != nil && x.RemoteJID != nil {
return *x.RemoteJID
}
return ""
}
func (x *MessageKey) GetFromMe() bool {
if x != nil {
return x.FromMe
if x != nil && x.FromMe != nil {
return *x.FromMe
}
return false
}
func (x *MessageKey) GetID() string {
if x != nil {
return x.ID
if x != nil && x.ID != nil {
return *x.ID
}
return ""
}
func (x *MessageKey) GetParticipant() string {
if x != nil {
return x.Participant
if x != nil && x.Participant != nil {
return *x.Participant
}
return ""
}
@@ -200,10 +220,10 @@ type Command struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CommandType Command_CommandType `protobuf:"varint,1,opt,name=commandType,proto3,enum=WACommon.Command_CommandType" json:"commandType,omitempty"`
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
Length uint32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"`
ValidationToken string `protobuf:"bytes,4,opt,name=validationToken,proto3" json:"validationToken,omitempty"`
CommandType *Command_CommandType `protobuf:"varint,1,opt,name=commandType,enum=WACommon.Command_CommandType" json:"commandType,omitempty"`
Offset *uint32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
Length *uint32 `protobuf:"varint,3,opt,name=length" json:"length,omitempty"`
ValidationToken *string `protobuf:"bytes,4,opt,name=validationToken" json:"validationToken,omitempty"`
}
func (x *Command) Reset() {
@@ -239,29 +259,29 @@ func (*Command) Descriptor() ([]byte, []int) {
}
func (x *Command) GetCommandType() Command_CommandType {
if x != nil {
return x.CommandType
if x != nil && x.CommandType != nil {
return *x.CommandType
}
return Command_COMMANDTYPE_UNKNOWN
return Command_EVERYONE
}
func (x *Command) GetOffset() uint32 {
if x != nil {
return x.Offset
if x != nil && x.Offset != nil {
return *x.Offset
}
return 0
}
func (x *Command) GetLength() uint32 {
if x != nil {
return x.Length
if x != nil && x.Length != nil {
return *x.Length
}
return 0
}
func (x *Command) GetValidationToken() string {
if x != nil {
return x.ValidationToken
if x != nil && x.ValidationToken != nil {
return *x.ValidationToken
}
return ""
}
@@ -271,9 +291,9 @@ type MessageText struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
MentionedJID []string `protobuf:"bytes,2,rep,name=mentionedJID,proto3" json:"mentionedJID,omitempty"`
Commands []*Command `protobuf:"bytes,3,rep,name=commands,proto3" json:"commands,omitempty"`
Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
MentionedJID []string `protobuf:"bytes,2,rep,name=mentionedJID" json:"mentionedJID,omitempty"`
Commands []*Command `protobuf:"bytes,3,rep,name=commands" json:"commands,omitempty"`
}
func (x *MessageText) Reset() {
@@ -309,8 +329,8 @@ func (*MessageText) Descriptor() ([]byte, []int) {
}
func (x *MessageText) GetText() string {
if x != nil {
return x.Text
if x != nil && x.Text != nil {
return *x.Text
}
return ""
}
@@ -334,8 +354,8 @@ type SubProtocol struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
Payload []byte `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
Version *int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"`
}
func (x *SubProtocol) Reset() {
@@ -378,8 +398,8 @@ func (x *SubProtocol) GetPayload() []byte {
}
func (x *SubProtocol) GetVersion() int32 {
if x != nil {
return x.Version
if x != nil && x.Version != nil {
return *x.Version
}
return 0
}

View File

@@ -0,0 +1,41 @@
syntax = "proto2";
package WACommon;
option go_package = "go.mau.fi/whatsmeow/proto/waCommon";
enum FutureProofBehavior {
PLACEHOLDER = 0;
NO_PLACEHOLDER = 1;
IGNORE = 2;
}
message MessageKey {
optional string remoteJID = 1;
optional bool fromMe = 2;
optional string ID = 3;
optional string participant = 4;
}
message Command {
enum CommandType {
EVERYONE = 1;
SILENT = 2;
AI = 3;
AI_IMAGINE = 4;
}
optional CommandType commandType = 1;
optional uint32 offset = 2;
optional uint32 length = 3;
optional string validationToken = 4;
}
message MessageText {
optional string text = 1;
repeated string mentionedJID = 2;
repeated Command commands = 3;
}
message SubProtocol {
optional bytes payload = 1;
optional int32 version = 2;
}

View File

@@ -0,0 +1,11 @@
package waCommon
// Deprecated: Use GetID
func (x *MessageKey) GetId() string {
return x.GetID()
}
// Deprecated: Use GetRemoteJID
func (x *MessageKey) GetRemoteJid() string {
return x.GetRemoteJID()
}

View File

@@ -0,0 +1,744 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc v3.21.12
// source: waCompanionReg/WAWebProtobufsCompanionReg.proto
package waCompanionReg
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 DeviceProps_PlatformType int32
const (
DeviceProps_UNKNOWN DeviceProps_PlatformType = 0
DeviceProps_CHROME DeviceProps_PlatformType = 1
DeviceProps_FIREFOX DeviceProps_PlatformType = 2
DeviceProps_IE DeviceProps_PlatformType = 3
DeviceProps_OPERA DeviceProps_PlatformType = 4
DeviceProps_SAFARI DeviceProps_PlatformType = 5
DeviceProps_EDGE DeviceProps_PlatformType = 6
DeviceProps_DESKTOP DeviceProps_PlatformType = 7
DeviceProps_IPAD DeviceProps_PlatformType = 8
DeviceProps_ANDROID_TABLET DeviceProps_PlatformType = 9
DeviceProps_OHANA DeviceProps_PlatformType = 10
DeviceProps_ALOHA DeviceProps_PlatformType = 11
DeviceProps_CATALINA DeviceProps_PlatformType = 12
DeviceProps_TCL_TV DeviceProps_PlatformType = 13
DeviceProps_IOS_PHONE DeviceProps_PlatformType = 14
DeviceProps_IOS_CATALYST DeviceProps_PlatformType = 15
DeviceProps_ANDROID_PHONE DeviceProps_PlatformType = 16
DeviceProps_ANDROID_AMBIGUOUS DeviceProps_PlatformType = 17
DeviceProps_WEAR_OS DeviceProps_PlatformType = 18
DeviceProps_AR_WRIST DeviceProps_PlatformType = 19
DeviceProps_AR_DEVICE DeviceProps_PlatformType = 20
DeviceProps_UWP DeviceProps_PlatformType = 21
DeviceProps_VR DeviceProps_PlatformType = 22
DeviceProps_CLOUD_API DeviceProps_PlatformType = 23
)
// Enum value maps for DeviceProps_PlatformType.
var (
DeviceProps_PlatformType_name = map[int32]string{
0: "UNKNOWN",
1: "CHROME",
2: "FIREFOX",
3: "IE",
4: "OPERA",
5: "SAFARI",
6: "EDGE",
7: "DESKTOP",
8: "IPAD",
9: "ANDROID_TABLET",
10: "OHANA",
11: "ALOHA",
12: "CATALINA",
13: "TCL_TV",
14: "IOS_PHONE",
15: "IOS_CATALYST",
16: "ANDROID_PHONE",
17: "ANDROID_AMBIGUOUS",
18: "WEAR_OS",
19: "AR_WRIST",
20: "AR_DEVICE",
21: "UWP",
22: "VR",
23: "CLOUD_API",
}
DeviceProps_PlatformType_value = map[string]int32{
"UNKNOWN": 0,
"CHROME": 1,
"FIREFOX": 2,
"IE": 3,
"OPERA": 4,
"SAFARI": 5,
"EDGE": 6,
"DESKTOP": 7,
"IPAD": 8,
"ANDROID_TABLET": 9,
"OHANA": 10,
"ALOHA": 11,
"CATALINA": 12,
"TCL_TV": 13,
"IOS_PHONE": 14,
"IOS_CATALYST": 15,
"ANDROID_PHONE": 16,
"ANDROID_AMBIGUOUS": 17,
"WEAR_OS": 18,
"AR_WRIST": 19,
"AR_DEVICE": 20,
"UWP": 21,
"VR": 22,
"CLOUD_API": 23,
}
)
func (x DeviceProps_PlatformType) Enum() *DeviceProps_PlatformType {
p := new(DeviceProps_PlatformType)
*p = x
return p
}
func (x DeviceProps_PlatformType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DeviceProps_PlatformType) Descriptor() protoreflect.EnumDescriptor {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_enumTypes[0].Descriptor()
}
func (DeviceProps_PlatformType) Type() protoreflect.EnumType {
return &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_enumTypes[0]
}
func (x DeviceProps_PlatformType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *DeviceProps_PlatformType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = DeviceProps_PlatformType(num)
return nil
}
// Deprecated: Use DeviceProps_PlatformType.Descriptor instead.
func (DeviceProps_PlatformType) EnumDescriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{0, 0}
}
type DeviceProps struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Os *string `protobuf:"bytes,1,opt,name=os" json:"os,omitempty"`
Version *DeviceProps_AppVersion `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
PlatformType *DeviceProps_PlatformType `protobuf:"varint,3,opt,name=platformType,enum=WAWebProtobufsCompanionReg.DeviceProps_PlatformType" json:"platformType,omitempty"`
RequireFullSync *bool `protobuf:"varint,4,opt,name=requireFullSync" json:"requireFullSync,omitempty"`
HistorySyncConfig *DeviceProps_HistorySyncConfig `protobuf:"bytes,5,opt,name=historySyncConfig" json:"historySyncConfig,omitempty"`
}
func (x *DeviceProps) Reset() {
*x = DeviceProps{}
if protoimpl.UnsafeEnabled {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeviceProps) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceProps) ProtoMessage() {}
func (x *DeviceProps) ProtoReflect() protoreflect.Message {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_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 DeviceProps.ProtoReflect.Descriptor instead.
func (*DeviceProps) Descriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceProps) GetOs() string {
if x != nil && x.Os != nil {
return *x.Os
}
return ""
}
func (x *DeviceProps) GetVersion() *DeviceProps_AppVersion {
if x != nil {
return x.Version
}
return nil
}
func (x *DeviceProps) GetPlatformType() DeviceProps_PlatformType {
if x != nil && x.PlatformType != nil {
return *x.PlatformType
}
return DeviceProps_UNKNOWN
}
func (x *DeviceProps) GetRequireFullSync() bool {
if x != nil && x.RequireFullSync != nil {
return *x.RequireFullSync
}
return false
}
func (x *DeviceProps) GetHistorySyncConfig() *DeviceProps_HistorySyncConfig {
if x != nil {
return x.HistorySyncConfig
}
return nil
}
type CompanionEphemeralIdentity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PublicKey []byte `protobuf:"bytes,1,opt,name=publicKey" json:"publicKey,omitempty"`
DeviceType *DeviceProps_PlatformType `protobuf:"varint,2,opt,name=deviceType,enum=WAWebProtobufsCompanionReg.DeviceProps_PlatformType" json:"deviceType,omitempty"`
Ref *string `protobuf:"bytes,3,opt,name=ref" json:"ref,omitempty"`
}
func (x *CompanionEphemeralIdentity) Reset() {
*x = CompanionEphemeralIdentity{}
if protoimpl.UnsafeEnabled {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CompanionEphemeralIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CompanionEphemeralIdentity) ProtoMessage() {}
func (x *CompanionEphemeralIdentity) ProtoReflect() protoreflect.Message {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_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 CompanionEphemeralIdentity.ProtoReflect.Descriptor instead.
func (*CompanionEphemeralIdentity) Descriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{1}
}
func (x *CompanionEphemeralIdentity) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
func (x *CompanionEphemeralIdentity) GetDeviceType() DeviceProps_PlatformType {
if x != nil && x.DeviceType != nil {
return *x.DeviceType
}
return DeviceProps_UNKNOWN
}
func (x *CompanionEphemeralIdentity) GetRef() string {
if x != nil && x.Ref != nil {
return *x.Ref
}
return ""
}
type PrimaryEphemeralIdentity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PublicKey []byte `protobuf:"bytes,1,opt,name=publicKey" json:"publicKey,omitempty"`
}
func (x *PrimaryEphemeralIdentity) Reset() {
*x = PrimaryEphemeralIdentity{}
if protoimpl.UnsafeEnabled {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PrimaryEphemeralIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PrimaryEphemeralIdentity) ProtoMessage() {}
func (x *PrimaryEphemeralIdentity) ProtoReflect() protoreflect.Message {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_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 PrimaryEphemeralIdentity.ProtoReflect.Descriptor instead.
func (*PrimaryEphemeralIdentity) Descriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{2}
}
func (x *PrimaryEphemeralIdentity) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
type EncryptedPairingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EncryptedPayload []byte `protobuf:"bytes,1,opt,name=encryptedPayload" json:"encryptedPayload,omitempty"`
IV []byte `protobuf:"bytes,2,opt,name=IV" json:"IV,omitempty"`
}
func (x *EncryptedPairingRequest) Reset() {
*x = EncryptedPairingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EncryptedPairingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EncryptedPairingRequest) ProtoMessage() {}
func (x *EncryptedPairingRequest) ProtoReflect() protoreflect.Message {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_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 EncryptedPairingRequest.ProtoReflect.Descriptor instead.
func (*EncryptedPairingRequest) Descriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{3}
}
func (x *EncryptedPairingRequest) GetEncryptedPayload() []byte {
if x != nil {
return x.EncryptedPayload
}
return nil
}
func (x *EncryptedPairingRequest) GetIV() []byte {
if x != nil {
return x.IV
}
return nil
}
type DeviceProps_HistorySyncConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FullSyncDaysLimit *uint32 `protobuf:"varint,1,opt,name=fullSyncDaysLimit" json:"fullSyncDaysLimit,omitempty"`
FullSyncSizeMbLimit *uint32 `protobuf:"varint,2,opt,name=fullSyncSizeMbLimit" json:"fullSyncSizeMbLimit,omitempty"`
StorageQuotaMb *uint32 `protobuf:"varint,3,opt,name=storageQuotaMb" json:"storageQuotaMb,omitempty"`
InlineInitialPayloadInE2EeMsg *bool `protobuf:"varint,4,opt,name=inlineInitialPayloadInE2EeMsg" json:"inlineInitialPayloadInE2EeMsg,omitempty"`
RecentSyncDaysLimit *uint32 `protobuf:"varint,5,opt,name=recentSyncDaysLimit" json:"recentSyncDaysLimit,omitempty"`
SupportCallLogHistory *bool `protobuf:"varint,6,opt,name=supportCallLogHistory" json:"supportCallLogHistory,omitempty"`
SupportBotUserAgentChatHistory *bool `protobuf:"varint,7,opt,name=supportBotUserAgentChatHistory" json:"supportBotUserAgentChatHistory,omitempty"`
SupportCagReactionsAndPolls *bool `protobuf:"varint,8,opt,name=supportCagReactionsAndPolls" json:"supportCagReactionsAndPolls,omitempty"`
SupportBizHostedMsg *bool `protobuf:"varint,9,opt,name=supportBizHostedMsg" json:"supportBizHostedMsg,omitempty"`
SupportRecentSyncChunkMessageCountTuning *bool `protobuf:"varint,10,opt,name=supportRecentSyncChunkMessageCountTuning" json:"supportRecentSyncChunkMessageCountTuning,omitempty"`
SupportHostedGroupMsg *bool `protobuf:"varint,11,opt,name=supportHostedGroupMsg" json:"supportHostedGroupMsg,omitempty"`
SupportFbidBotChatHistory *bool `protobuf:"varint,12,opt,name=supportFbidBotChatHistory" json:"supportFbidBotChatHistory,omitempty"`
}
func (x *DeviceProps_HistorySyncConfig) Reset() {
*x = DeviceProps_HistorySyncConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeviceProps_HistorySyncConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceProps_HistorySyncConfig) ProtoMessage() {}
func (x *DeviceProps_HistorySyncConfig) ProtoReflect() protoreflect.Message {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_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 DeviceProps_HistorySyncConfig.ProtoReflect.Descriptor instead.
func (*DeviceProps_HistorySyncConfig) Descriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{0, 0}
}
func (x *DeviceProps_HistorySyncConfig) GetFullSyncDaysLimit() uint32 {
if x != nil && x.FullSyncDaysLimit != nil {
return *x.FullSyncDaysLimit
}
return 0
}
func (x *DeviceProps_HistorySyncConfig) GetFullSyncSizeMbLimit() uint32 {
if x != nil && x.FullSyncSizeMbLimit != nil {
return *x.FullSyncSizeMbLimit
}
return 0
}
func (x *DeviceProps_HistorySyncConfig) GetStorageQuotaMb() uint32 {
if x != nil && x.StorageQuotaMb != nil {
return *x.StorageQuotaMb
}
return 0
}
func (x *DeviceProps_HistorySyncConfig) GetInlineInitialPayloadInE2EeMsg() bool {
if x != nil && x.InlineInitialPayloadInE2EeMsg != nil {
return *x.InlineInitialPayloadInE2EeMsg
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetRecentSyncDaysLimit() uint32 {
if x != nil && x.RecentSyncDaysLimit != nil {
return *x.RecentSyncDaysLimit
}
return 0
}
func (x *DeviceProps_HistorySyncConfig) GetSupportCallLogHistory() bool {
if x != nil && x.SupportCallLogHistory != nil {
return *x.SupportCallLogHistory
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetSupportBotUserAgentChatHistory() bool {
if x != nil && x.SupportBotUserAgentChatHistory != nil {
return *x.SupportBotUserAgentChatHistory
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetSupportCagReactionsAndPolls() bool {
if x != nil && x.SupportCagReactionsAndPolls != nil {
return *x.SupportCagReactionsAndPolls
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetSupportBizHostedMsg() bool {
if x != nil && x.SupportBizHostedMsg != nil {
return *x.SupportBizHostedMsg
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetSupportRecentSyncChunkMessageCountTuning() bool {
if x != nil && x.SupportRecentSyncChunkMessageCountTuning != nil {
return *x.SupportRecentSyncChunkMessageCountTuning
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetSupportHostedGroupMsg() bool {
if x != nil && x.SupportHostedGroupMsg != nil {
return *x.SupportHostedGroupMsg
}
return false
}
func (x *DeviceProps_HistorySyncConfig) GetSupportFbidBotChatHistory() bool {
if x != nil && x.SupportFbidBotChatHistory != nil {
return *x.SupportFbidBotChatHistory
}
return false
}
type DeviceProps_AppVersion struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Primary *uint32 `protobuf:"varint,1,opt,name=primary" json:"primary,omitempty"`
Secondary *uint32 `protobuf:"varint,2,opt,name=secondary" json:"secondary,omitempty"`
Tertiary *uint32 `protobuf:"varint,3,opt,name=tertiary" json:"tertiary,omitempty"`
Quaternary *uint32 `protobuf:"varint,4,opt,name=quaternary" json:"quaternary,omitempty"`
Quinary *uint32 `protobuf:"varint,5,opt,name=quinary" json:"quinary,omitempty"`
}
func (x *DeviceProps_AppVersion) Reset() {
*x = DeviceProps_AppVersion{}
if protoimpl.UnsafeEnabled {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeviceProps_AppVersion) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceProps_AppVersion) ProtoMessage() {}
func (x *DeviceProps_AppVersion) ProtoReflect() protoreflect.Message {
mi := &file_waCompanionReg_WAWebProtobufsCompanionReg_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 DeviceProps_AppVersion.ProtoReflect.Descriptor instead.
func (*DeviceProps_AppVersion) Descriptor() ([]byte, []int) {
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP(), []int{0, 1}
}
func (x *DeviceProps_AppVersion) GetPrimary() uint32 {
if x != nil && x.Primary != nil {
return *x.Primary
}
return 0
}
func (x *DeviceProps_AppVersion) GetSecondary() uint32 {
if x != nil && x.Secondary != nil {
return *x.Secondary
}
return 0
}
func (x *DeviceProps_AppVersion) GetTertiary() uint32 {
if x != nil && x.Tertiary != nil {
return *x.Tertiary
}
return 0
}
func (x *DeviceProps_AppVersion) GetQuaternary() uint32 {
if x != nil && x.Quaternary != nil {
return *x.Quaternary
}
return 0
}
func (x *DeviceProps_AppVersion) GetQuinary() uint32 {
if x != nil && x.Quinary != nil {
return *x.Quinary
}
return 0
}
var File_waCompanionReg_WAWebProtobufsCompanionReg_proto protoreflect.FileDescriptor
//go:embed WAWebProtobufsCompanionReg.pb.raw
var file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDesc []byte
var (
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescOnce sync.Once
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescData = file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDesc
)
func file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescGZIP() []byte {
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescOnce.Do(func() {
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescData = protoimpl.X.CompressGZIP(file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescData)
})
return file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDescData
}
var file_waCompanionReg_WAWebProtobufsCompanionReg_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_waCompanionReg_WAWebProtobufsCompanionReg_proto_goTypes = []interface{}{
(DeviceProps_PlatformType)(0), // 0: WAWebProtobufsCompanionReg.DeviceProps.PlatformType
(*DeviceProps)(nil), // 1: WAWebProtobufsCompanionReg.DeviceProps
(*CompanionEphemeralIdentity)(nil), // 2: WAWebProtobufsCompanionReg.CompanionEphemeralIdentity
(*PrimaryEphemeralIdentity)(nil), // 3: WAWebProtobufsCompanionReg.PrimaryEphemeralIdentity
(*EncryptedPairingRequest)(nil), // 4: WAWebProtobufsCompanionReg.EncryptedPairingRequest
(*DeviceProps_HistorySyncConfig)(nil), // 5: WAWebProtobufsCompanionReg.DeviceProps.HistorySyncConfig
(*DeviceProps_AppVersion)(nil), // 6: WAWebProtobufsCompanionReg.DeviceProps.AppVersion
}
var file_waCompanionReg_WAWebProtobufsCompanionReg_proto_depIdxs = []int32{
6, // 0: WAWebProtobufsCompanionReg.DeviceProps.version:type_name -> WAWebProtobufsCompanionReg.DeviceProps.AppVersion
0, // 1: WAWebProtobufsCompanionReg.DeviceProps.platformType:type_name -> WAWebProtobufsCompanionReg.DeviceProps.PlatformType
5, // 2: WAWebProtobufsCompanionReg.DeviceProps.historySyncConfig:type_name -> WAWebProtobufsCompanionReg.DeviceProps.HistorySyncConfig
0, // 3: WAWebProtobufsCompanionReg.CompanionEphemeralIdentity.deviceType:type_name -> WAWebProtobufsCompanionReg.DeviceProps.PlatformType
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_waCompanionReg_WAWebProtobufsCompanionReg_proto_init() }
func file_waCompanionReg_WAWebProtobufsCompanionReg_proto_init() {
if File_waCompanionReg_WAWebProtobufsCompanionReg_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeviceProps); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CompanionEphemeralIdentity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PrimaryEphemeralIdentity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EncryptedPairingRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeviceProps_HistorySyncConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeviceProps_AppVersion); 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_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_waCompanionReg_WAWebProtobufsCompanionReg_proto_goTypes,
DependencyIndexes: file_waCompanionReg_WAWebProtobufsCompanionReg_proto_depIdxs,
EnumInfos: file_waCompanionReg_WAWebProtobufsCompanionReg_proto_enumTypes,
MessageInfos: file_waCompanionReg_WAWebProtobufsCompanionReg_proto_msgTypes,
}.Build()
File_waCompanionReg_WAWebProtobufsCompanionReg_proto = out.File
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_rawDesc = nil
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_goTypes = nil
file_waCompanionReg_WAWebProtobufsCompanionReg_proto_depIdxs = nil
}

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More