Bump go.mau.fi/whatsmeow v0.0.0-20240625083845-6acab596dd8c
This commit is contained in:
2
vendor/filippo.io/edwards25519/README.md
generated
vendored
2
vendor/filippo.io/edwards25519/README.md
generated
vendored
@@ -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.
|
||||
|
||||
4
vendor/filippo.io/edwards25519/doc.go
generated
vendored
4
vendor/filippo.io/edwards25519/doc.go
generated
vendored
@@ -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
|
||||
|
||||
13
vendor/filippo.io/edwards25519/edwards25519.go
generated
vendored
13
vendor/filippo.io/edwards25519/edwards25519.go
generated
vendored
@@ -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 {
|
||||
|
||||
10
vendor/filippo.io/edwards25519/extra.go
generated
vendored
10
vendor/filippo.io/edwards25519/extra.go
generated
vendored
@@ -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:
|
||||
|
||||
3
vendor/filippo.io/edwards25519/field/fe_amd64.go
generated
vendored
3
vendor/filippo.io/edwards25519/field/fe_amd64.go
generated
vendored
@@ -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)
|
||||
|
||||
1
vendor/filippo.io/edwards25519/field/fe_amd64.s
generated
vendored
1
vendor/filippo.io/edwards25519/field/fe_amd64.s
generated
vendored
@@ -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"
|
||||
|
||||
2
vendor/filippo.io/edwards25519/field/fe_arm64.s
generated
vendored
2
vendor/filippo.io/edwards25519/field/fe_arm64.s
generated
vendored
@@ -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"
|
||||
|
||||
|
||||
2
vendor/filippo.io/edwards25519/field/fe_extra.go
generated
vendored
2
vendor/filippo.io/edwards25519/field/fe_extra.go
generated
vendored
@@ -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,
|
||||
|
||||
4
vendor/filippo.io/edwards25519/field/fe_generic.go
generated
vendored
4
vendor/filippo.io/edwards25519/field/fe_generic.go
generated
vendored
@@ -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
|
||||
|
||||
949
vendor/filippo.io/edwards25519/scalar.go
generated
vendored
949
vendor/filippo.io/edwards25519/scalar.go
generated
vendored
File diff suppressed because it is too large
Load Diff
1147
vendor/filippo.io/edwards25519/scalar_fiat.go
generated
vendored
Normal file
1147
vendor/filippo.io/edwards25519/scalar_fiat.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
vendor/filippo.io/edwards25519/tables.go
generated
vendored
6
vendor/filippo.io/edwards25519/tables.go
generated
vendored
@@ -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])))
|
||||
}
|
||||
}
|
||||
|
||||
20
vendor/github.com/gorilla/websocket/.editorconfig
generated
vendored
20
vendor/github.com/gorilla/websocket/.editorconfig
generated
vendored
@@ -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
|
||||
26
vendor/github.com/gorilla/websocket/.gitignore
generated
vendored
26
vendor/github.com/gorilla/websocket/.gitignore
generated
vendored
@@ -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
|
||||
|
||||
3
vendor/github.com/gorilla/websocket/.golangci.yml
generated
vendored
3
vendor/github.com/gorilla/websocket/.golangci.yml
generated
vendored
@@ -1,3 +0,0 @@
|
||||
run:
|
||||
skip-dirs:
|
||||
- examples/*.go
|
||||
9
vendor/github.com/gorilla/websocket/AUTHORS
generated
vendored
Normal file
9
vendor/github.com/gorilla/websocket/AUTHORS
generated
vendored
Normal 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>
|
||||
|
||||
39
vendor/github.com/gorilla/websocket/LICENSE
generated
vendored
39
vendor/github.com/gorilla/websocket/LICENSE
generated
vendored
@@ -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.
|
||||
|
||||
34
vendor/github.com/gorilla/websocket/Makefile
generated
vendored
34
vendor/github.com/gorilla/websocket/Makefile
generated
vendored
@@ -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 ./...
|
||||
15
vendor/github.com/gorilla/websocket/README.md
generated
vendored
15
vendor/github.com/gorilla/websocket/README.md
generated
vendored
@@ -1,13 +1,10 @@
|
||||
# gorilla/websocket
|
||||
# Gorilla WebSocket
|
||||
|
||||

|
||||
[](https://codecov.io/github/gorilla/websocket)
|
||||
[](https://godoc.org/github.com/gorilla/websocket)
|
||||
[](https://sourcegraph.com/github.com/gorilla/websocket?badge)
|
||||
[](https://godoc.org/github.com/gorilla/websocket)
|
||||
[](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 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).
|
||||
|
||||
|
||||
26
vendor/github.com/gorilla/websocket/client.go
generated
vendored
26
vendor/github.com/gorilla/websocket/client.go
generated
vendored
@@ -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()
|
||||
}
|
||||
|
||||
9
vendor/github.com/gorilla/websocket/compression.go
generated
vendored
9
vendor/github.com/gorilla/websocket/compression.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
75
vendor/github.com/gorilla/websocket/conn.go
generated
vendored
75
vendor/github.com/gorilla/websocket/conn.go
generated
vendored
@@ -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
|
||||
|
||||
4
vendor/github.com/gorilla/websocket/mask.go
generated
vendored
4
vendor/github.com/gorilla/websocket/mask.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
||||
17
vendor/github.com/gorilla/websocket/proxy.go
generated
vendored
17
vendor/github.com/gorilla/websocket/proxy.go
generated
vendored
@@ -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])
|
||||
}
|
||||
|
||||
38
vendor/github.com/gorilla/websocket/server.go
generated
vendored
38
vendor/github.com/gorilla/websocket/server.go
generated
vendored
@@ -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)
|
||||
|
||||
|
||||
3
vendor/github.com/gorilla/websocket/tls_handshake.go
generated
vendored
3
vendor/github.com/gorilla/websocket/tls_handshake.go
generated
vendored
@@ -1,3 +1,6 @@
|
||||
//go:build go1.17
|
||||
// +build go1.17
|
||||
|
||||
package websocket
|
||||
|
||||
import (
|
||||
|
||||
21
vendor/github.com/gorilla/websocket/tls_handshake_116.go
generated
vendored
Normal file
21
vendor/github.com/gorilla/websocket/tls_handshake_116.go
generated
vendored
Normal 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
|
||||
}
|
||||
4
vendor/github.com/gorilla/websocket/util.go
generated
vendored
4
vendor/github.com/gorilla/websocket/util.go
generated
vendored
@@ -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
473
vendor/github.com/gorilla/websocket/x_net_proxy.go
generated
vendored
Normal 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
|
||||
}
|
||||
18
vendor/github.com/rs/zerolog/README.md
generated
vendored
18
vendor/github.com/rs/zerolog/README.md
generated
vendored
@@ -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
|
||||
|
||||
|
||||
6
vendor/github.com/rs/zerolog/array.go
generated
vendored
6
vendor/github.com/rs/zerolog/array.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
||||
91
vendor/github.com/rs/zerolog/console.go
generated
vendored
91
vendor/github.com/rs/zerolog/console.go
generated
vendored
@@ -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 ConsoleWriter’s 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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
vendor/github.com/rs/zerolog/context.go
generated
vendored
22
vendor/github.com/rs/zerolog/context.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
12
vendor/github.com/rs/zerolog/encoder.go
generated
vendored
12
vendor/github.com/rs/zerolog/encoder.go
generated
vendored
@@ -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
|
||||
|
||||
14
vendor/github.com/rs/zerolog/event.go
generated
vendored
14
vendor/github.com/rs/zerolog/event.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
||||
18
vendor/github.com/rs/zerolog/fields.go
generated
vendored
18
vendor/github.com/rs/zerolog/fields.go
generated
vendored
@@ -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:
|
||||
|
||||
24
vendor/github.com/rs/zerolog/globals.go
generated
vendored
24
vendor/github.com/rs/zerolog/globals.go
generated
vendored
@@ -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 (
|
||||
|
||||
2
vendor/github.com/rs/zerolog/internal/cbor/decode_stream.go
generated
vendored
2
vendor/github.com/rs/zerolog/internal/cbor/decode_stream.go
generated
vendored
@@ -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)
|
||||
|
||||
10
vendor/github.com/rs/zerolog/internal/cbor/time.go
generated
vendored
10
vendor/github.com/rs/zerolog/internal/cbor/time.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
12
vendor/github.com/rs/zerolog/internal/cbor/types.go
generated
vendored
12
vendor/github.com/rs/zerolog/internal/cbor/types.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
10
vendor/github.com/rs/zerolog/internal/json/time.go
generated
vendored
10
vendor/github.com/rs/zerolog/internal/json/time.go
generated
vendored
@@ -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, ']')
|
||||
|
||||
45
vendor/github.com/rs/zerolog/internal/json/types.go
generated
vendored
45
vendor/github.com/rs/zerolog/internal/json/types.go
generated
vendored
@@ -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, ']')
|
||||
|
||||
2
vendor/github.com/rs/zerolog/log.go
generated
vendored
2
vendor/github.com/rs/zerolog/log.go
generated
vendored
@@ -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"}
|
||||
//
|
||||
|
||||
2
vendor/github.com/rs/zerolog/sampler.go
generated
vendored
2
vendor/github.com/rs/zerolog/sampler.go
generated
vendored
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
4
vendor/go.mau.fi/whatsmeow/appstate.go
vendored
4
vendor/go.mau.fi/whatsmeow/appstate.go
vendored
@@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
e2ee.js
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
34280
vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go
generated
vendored
34280
vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
BIN
vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw
generated
vendored
BIN
vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw
generated
vendored
Binary file not shown.
3175
vendor/go.mau.fi/whatsmeow/binary/proto/def.proto
vendored
3175
vendor/go.mau.fi/whatsmeow/binary/proto/def.proto
vendored
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
69
vendor/go.mau.fi/whatsmeow/binary/proto/generatelegacy.py
vendored
Normal file
69
vendor/go.mau.fi/whatsmeow/binary/proto/generatelegacy.py
vendored
Normal 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(")")
|
||||
4
vendor/go.mau.fi/whatsmeow/binary/proto/generatelegacy.sh
vendored
Normal file
4
vendor/go.mau.fi/whatsmeow/binary/proto/generatelegacy.sh
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd $(dirname $0)
|
||||
python3 generatelegacy.py > legacy.go
|
||||
goimports -w legacy.go
|
||||
1084
vendor/go.mau.fi/whatsmeow/binary/proto/legacy.go
vendored
Normal file
1084
vendor/go.mau.fi/whatsmeow/binary/proto/legacy.go
vendored
Normal file
File diff suppressed because it is too large
Load Diff
631
vendor/go.mau.fi/whatsmeow/binary/proto/old-enums.txt
vendored
Normal file
631
vendor/go.mau.fi/whatsmeow/binary/proto/old-enums.txt
vendored
Normal 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
|
||||
421
vendor/go.mau.fi/whatsmeow/binary/proto/old-types.txt
vendored
Normal file
421
vendor/go.mau.fi/whatsmeow/binary/proto/old-types.txt
vendored
Normal 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
|
||||
@@ -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":
|
||||
|
||||
24
vendor/go.mau.fi/whatsmeow/download.go
vendored
24
vendor/go.mau.fi/whatsmeow/download.go
vendored
@@ -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
|
||||
|
||||
2
vendor/go.mau.fi/whatsmeow/mediaretry.go
vendored
2
vendor/go.mau.fi/whatsmeow/mediaretry.go
vendored
@@ -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)
|
||||
|
||||
12
vendor/go.mau.fi/whatsmeow/msgsecret.go
vendored
12
vendor/go.mau.fi/whatsmeow/msgsecret.go
vendored
@@ -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
|
||||
}
|
||||
|
||||
2
vendor/go.mau.fi/whatsmeow/pair.go
vendored
2
vendor/go.mau.fi/whatsmeow/pair.go
vendored
@@ -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
|
||||
|
||||
1
vendor/go.mau.fi/whatsmeow/proto/.gitignore
vendored
Normal file
1
vendor/go.mau.fi/whatsmeow/proto/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
protos.js
|
||||
@@ -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
|
||||
}
|
||||
@@ -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 {
|
||||
@@ -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
|
||||
@@ -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
562
vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go
generated
vendored
Normal 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
BIN
vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw
generated
vendored
Normal file
Binary file not shown.
43
vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.proto
vendored
Normal file
43
vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.proto
vendored
Normal 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;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -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;
|
||||
}
|
||||
@@ -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 ""
|
||||
}
|
||||
Binary file not shown.
@@ -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
469
vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go
generated
vendored
Normal 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
23
vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw
generated
vendored
Normal 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.NoiseCertificateRintermediateÞ
|
||||
NoiseCertificate
|
||||
details (Rdetails
|
||||
signature (R signature‘
|
||||
Details
|
||||
serial (
Rserial"
|
||||
issuerSerial (
RissuerSerial
|
||||
key (Rkey
|
||||
notBefore (R notBefore
|
||||
notAfter (RnotAfterB"Z go.mau.fi/whatsmeow/proto/waCert
|
||||
34
vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.proto
vendored
Normal file
34
vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.proto
vendored
Normal 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;
|
||||
}
|
||||
150
vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go
generated
vendored
Normal file
150
vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go
generated
vendored
Normal 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
|
||||
}
|
||||
7
vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw
generated
vendored
Normal file
7
vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw
generated
vendored
Normal 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
|
||||
10
vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.proto
vendored
Normal file
10
vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.proto
vendored
Normal 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;
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Binary file not shown.
41
vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto
vendored
Normal file
41
vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto
vendored
Normal 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;
|
||||
}
|
||||
11
vendor/go.mau.fi/whatsmeow/proto/waCommon/legacy.go
vendored
Normal file
11
vendor/go.mau.fi/whatsmeow/proto/waCommon/legacy.go
vendored
Normal 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()
|
||||
}
|
||||
744
vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.go
generated
vendored
Normal file
744
vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.go
generated
vendored
Normal 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
|
||||
}
|
||||
BIN
vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw
generated
vendored
Normal file
BIN
vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw
generated
vendored
Normal file
Binary file not shown.
76
vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.proto
vendored
Normal file
76
vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.proto
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
syntax = "proto2";
|
||||
package WAWebProtobufsCompanionReg;
|
||||
option go_package = "go.mau.fi/whatsmeow/proto/waCompanionReg";
|
||||
|
||||
message DeviceProps {
|
||||
enum PlatformType {
|
||||
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;
|
||||
}
|
||||
|
||||
message HistorySyncConfig {
|
||||
optional uint32 fullSyncDaysLimit = 1;
|
||||
optional uint32 fullSyncSizeMbLimit = 2;
|
||||
optional uint32 storageQuotaMb = 3;
|
||||
optional bool inlineInitialPayloadInE2EeMsg = 4;
|
||||
optional uint32 recentSyncDaysLimit = 5;
|
||||
optional bool supportCallLogHistory = 6;
|
||||
optional bool supportBotUserAgentChatHistory = 7;
|
||||
optional bool supportCagReactionsAndPolls = 8;
|
||||
optional bool supportBizHostedMsg = 9;
|
||||
optional bool supportRecentSyncChunkMessageCountTuning = 10;
|
||||
optional bool supportHostedGroupMsg = 11;
|
||||
optional bool supportFbidBotChatHistory = 12;
|
||||
}
|
||||
|
||||
message AppVersion {
|
||||
optional uint32 primary = 1;
|
||||
optional uint32 secondary = 2;
|
||||
optional uint32 tertiary = 3;
|
||||
optional uint32 quaternary = 4;
|
||||
optional uint32 quinary = 5;
|
||||
}
|
||||
|
||||
optional string os = 1;
|
||||
optional AppVersion version = 2;
|
||||
optional PlatformType platformType = 3;
|
||||
optional bool requireFullSync = 4;
|
||||
optional HistorySyncConfig historySyncConfig = 5;
|
||||
}
|
||||
|
||||
message CompanionEphemeralIdentity {
|
||||
optional bytes publicKey = 1;
|
||||
optional DeviceProps.PlatformType deviceType = 2;
|
||||
optional string ref = 3;
|
||||
}
|
||||
|
||||
message PrimaryEphemeralIdentity {
|
||||
optional bytes publicKey = 1;
|
||||
}
|
||||
|
||||
message EncryptedPairingRequest {
|
||||
optional bytes encryptedPayload = 1;
|
||||
optional bytes IV = 2;
|
||||
}
|
||||
@@ -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: waConsumerApplication/WAConsumerApplication.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"
|
||||
|
||||
@@ -27,25 +27,22 @@ const (
|
||||
type ConsumerApplication_Metadata_SpecialTextSize int32
|
||||
|
||||
const (
|
||||
ConsumerApplication_Metadata_SPECIALTEXTSIZE_UNKNOWN ConsumerApplication_Metadata_SpecialTextSize = 0
|
||||
ConsumerApplication_Metadata_SMALL ConsumerApplication_Metadata_SpecialTextSize = 1
|
||||
ConsumerApplication_Metadata_MEDIUM ConsumerApplication_Metadata_SpecialTextSize = 2
|
||||
ConsumerApplication_Metadata_LARGE ConsumerApplication_Metadata_SpecialTextSize = 3
|
||||
ConsumerApplication_Metadata_SMALL ConsumerApplication_Metadata_SpecialTextSize = 1
|
||||
ConsumerApplication_Metadata_MEDIUM ConsumerApplication_Metadata_SpecialTextSize = 2
|
||||
ConsumerApplication_Metadata_LARGE ConsumerApplication_Metadata_SpecialTextSize = 3
|
||||
)
|
||||
|
||||
// Enum value maps for ConsumerApplication_Metadata_SpecialTextSize.
|
||||
var (
|
||||
ConsumerApplication_Metadata_SpecialTextSize_name = map[int32]string{
|
||||
0: "SPECIALTEXTSIZE_UNKNOWN",
|
||||
1: "SMALL",
|
||||
2: "MEDIUM",
|
||||
3: "LARGE",
|
||||
}
|
||||
ConsumerApplication_Metadata_SpecialTextSize_value = map[string]int32{
|
||||
"SPECIALTEXTSIZE_UNKNOWN": 0,
|
||||
"SMALL": 1,
|
||||
"MEDIUM": 2,
|
||||
"LARGE": 3,
|
||||
"SMALL": 1,
|
||||
"MEDIUM": 2,
|
||||
"LARGE": 3,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -71,6 +68,16 @@ func (x ConsumerApplication_Metadata_SpecialTextSize) Number() protoreflect.Enum
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *ConsumerApplication_Metadata_SpecialTextSize) UnmarshalJSON(b []byte) error {
|
||||
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = ConsumerApplication_Metadata_SpecialTextSize(num)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Use ConsumerApplication_Metadata_SpecialTextSize.Descriptor instead.
|
||||
func (ConsumerApplication_Metadata_SpecialTextSize) EnumDescriptor() ([]byte, []int) {
|
||||
return file_waConsumerApplication_WAConsumerApplication_proto_rawDescGZIP(), []int{0, 2, 0}
|
||||
@@ -129,6 +136,16 @@ func (x ConsumerApplication_StatusTextMesage_FontType) Number() protoreflect.Enu
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *ConsumerApplication_StatusTextMesage_FontType) UnmarshalJSON(b []byte) error {
|
||||
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = ConsumerApplication_StatusTextMesage_FontType(num)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Use ConsumerApplication_StatusTextMesage_FontType.Descriptor instead.
|
||||
func (ConsumerApplication_StatusTextMesage_FontType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_waConsumerApplication_WAConsumerApplication_proto_rawDescGZIP(), []int{0, 20, 0}
|
||||
@@ -175,6 +192,16 @@ func (x ConsumerApplication_ExtendedTextMessage_PreviewType) Number() protorefle
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *ConsumerApplication_ExtendedTextMessage_PreviewType) UnmarshalJSON(b []byte) error {
|
||||
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = ConsumerApplication_ExtendedTextMessage_PreviewType(num)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Use ConsumerApplication_ExtendedTextMessage_PreviewType.Descriptor instead.
|
||||
func (ConsumerApplication_ExtendedTextMessage_PreviewType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_waConsumerApplication_WAConsumerApplication_proto_rawDescGZIP(), []int{0, 21, 0}
|
||||
@@ -185,8 +212,8 @@ type ConsumerApplication struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Payload *ConsumerApplication_Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
Metadata *ConsumerApplication_Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
Payload *ConsumerApplication_Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
|
||||
Metadata *ConsumerApplication_Metadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication) Reset() {
|
||||
@@ -321,19 +348,19 @@ type isConsumerApplication_Payload_Payload interface {
|
||||
}
|
||||
|
||||
type ConsumerApplication_Payload_Content struct {
|
||||
Content *ConsumerApplication_Content `protobuf:"bytes,1,opt,name=content,proto3,oneof"`
|
||||
Content *ConsumerApplication_Content `protobuf:"bytes,1,opt,name=content,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Payload_ApplicationData struct {
|
||||
ApplicationData *ConsumerApplication_ApplicationData `protobuf:"bytes,2,opt,name=applicationData,proto3,oneof"`
|
||||
ApplicationData *ConsumerApplication_ApplicationData `protobuf:"bytes,2,opt,name=applicationData,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Payload_Signal struct {
|
||||
Signal *ConsumerApplication_Signal `protobuf:"bytes,3,opt,name=signal,proto3,oneof"`
|
||||
Signal *ConsumerApplication_Signal `protobuf:"bytes,3,opt,name=signal,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Payload_SubProtocol struct {
|
||||
SubProtocol *ConsumerApplication_SubProtocolPayload `protobuf:"bytes,4,opt,name=subProtocol,proto3,oneof"`
|
||||
SubProtocol *ConsumerApplication_SubProtocolPayload `protobuf:"bytes,4,opt,name=subProtocol,oneof"`
|
||||
}
|
||||
|
||||
func (*ConsumerApplication_Payload_Content) isConsumerApplication_Payload_Payload() {}
|
||||
@@ -349,7 +376,7 @@ type ConsumerApplication_SubProtocolPayload struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FutureProof waCommon.FutureProofBehavior `protobuf:"varint,1,opt,name=futureProof,proto3,enum=WACommon.FutureProofBehavior" json:"futureProof,omitempty"`
|
||||
FutureProof *waCommon.FutureProofBehavior `protobuf:"varint,1,opt,name=futureProof,enum=WACommon.FutureProofBehavior" json:"futureProof,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_SubProtocolPayload) Reset() {
|
||||
@@ -385,8 +412,8 @@ func (*ConsumerApplication_SubProtocolPayload) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_SubProtocolPayload) GetFutureProof() waCommon.FutureProofBehavior {
|
||||
if x != nil {
|
||||
return x.FutureProof
|
||||
if x != nil && x.FutureProof != nil {
|
||||
return *x.FutureProof
|
||||
}
|
||||
return waCommon.FutureProofBehavior(0)
|
||||
}
|
||||
@@ -396,7 +423,7 @@ type ConsumerApplication_Metadata struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SpecialTextSize ConsumerApplication_Metadata_SpecialTextSize `protobuf:"varint,1,opt,name=specialTextSize,proto3,enum=WAConsumerApplication.ConsumerApplication_Metadata_SpecialTextSize" json:"specialTextSize,omitempty"`
|
||||
SpecialTextSize *ConsumerApplication_Metadata_SpecialTextSize `protobuf:"varint,1,opt,name=specialTextSize,enum=WAConsumerApplication.ConsumerApplication_Metadata_SpecialTextSize" json:"specialTextSize,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Metadata) Reset() {
|
||||
@@ -432,10 +459,10 @@ func (*ConsumerApplication_Metadata) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Metadata) GetSpecialTextSize() ConsumerApplication_Metadata_SpecialTextSize {
|
||||
if x != nil {
|
||||
return x.SpecialTextSize
|
||||
if x != nil && x.SpecialTextSize != nil {
|
||||
return *x.SpecialTextSize
|
||||
}
|
||||
return ConsumerApplication_Metadata_SPECIALTEXTSIZE_UNKNOWN
|
||||
return ConsumerApplication_Metadata_SMALL
|
||||
}
|
||||
|
||||
type ConsumerApplication_Signal struct {
|
||||
@@ -538,7 +565,7 @@ type isConsumerApplication_ApplicationData_ApplicationContent interface {
|
||||
}
|
||||
|
||||
type ConsumerApplication_ApplicationData_Revoke struct {
|
||||
Revoke *ConsumerApplication_RevokeMessage `protobuf:"bytes,1,opt,name=revoke,proto3,oneof"`
|
||||
Revoke *ConsumerApplication_RevokeMessage `protobuf:"bytes,1,opt,name=revoke,oneof"`
|
||||
}
|
||||
|
||||
func (*ConsumerApplication_ApplicationData_Revoke) isConsumerApplication_ApplicationData_ApplicationContent() {
|
||||
@@ -742,75 +769,75 @@ type isConsumerApplication_Content_Content interface {
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_MessageText struct {
|
||||
MessageText *waCommon.MessageText `protobuf:"bytes,1,opt,name=messageText,proto3,oneof"`
|
||||
MessageText *waCommon.MessageText `protobuf:"bytes,1,opt,name=messageText,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_ImageMessage struct {
|
||||
ImageMessage *ConsumerApplication_ImageMessage `protobuf:"bytes,2,opt,name=imageMessage,proto3,oneof"`
|
||||
ImageMessage *ConsumerApplication_ImageMessage `protobuf:"bytes,2,opt,name=imageMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_ContactMessage struct {
|
||||
ContactMessage *ConsumerApplication_ContactMessage `protobuf:"bytes,3,opt,name=contactMessage,proto3,oneof"`
|
||||
ContactMessage *ConsumerApplication_ContactMessage `protobuf:"bytes,3,opt,name=contactMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_LocationMessage struct {
|
||||
LocationMessage *ConsumerApplication_LocationMessage `protobuf:"bytes,4,opt,name=locationMessage,proto3,oneof"`
|
||||
LocationMessage *ConsumerApplication_LocationMessage `protobuf:"bytes,4,opt,name=locationMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_ExtendedTextMessage struct {
|
||||
ExtendedTextMessage *ConsumerApplication_ExtendedTextMessage `protobuf:"bytes,5,opt,name=extendedTextMessage,proto3,oneof"`
|
||||
ExtendedTextMessage *ConsumerApplication_ExtendedTextMessage `protobuf:"bytes,5,opt,name=extendedTextMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_StatusTextMessage struct {
|
||||
StatusTextMessage *ConsumerApplication_StatusTextMesage `protobuf:"bytes,6,opt,name=statusTextMessage,proto3,oneof"`
|
||||
StatusTextMessage *ConsumerApplication_StatusTextMesage `protobuf:"bytes,6,opt,name=statusTextMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_DocumentMessage struct {
|
||||
DocumentMessage *ConsumerApplication_DocumentMessage `protobuf:"bytes,7,opt,name=documentMessage,proto3,oneof"`
|
||||
DocumentMessage *ConsumerApplication_DocumentMessage `protobuf:"bytes,7,opt,name=documentMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_AudioMessage struct {
|
||||
AudioMessage *ConsumerApplication_AudioMessage `protobuf:"bytes,8,opt,name=audioMessage,proto3,oneof"`
|
||||
AudioMessage *ConsumerApplication_AudioMessage `protobuf:"bytes,8,opt,name=audioMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_VideoMessage struct {
|
||||
VideoMessage *ConsumerApplication_VideoMessage `protobuf:"bytes,9,opt,name=videoMessage,proto3,oneof"`
|
||||
VideoMessage *ConsumerApplication_VideoMessage `protobuf:"bytes,9,opt,name=videoMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_ContactsArrayMessage struct {
|
||||
ContactsArrayMessage *ConsumerApplication_ContactsArrayMessage `protobuf:"bytes,10,opt,name=contactsArrayMessage,proto3,oneof"`
|
||||
ContactsArrayMessage *ConsumerApplication_ContactsArrayMessage `protobuf:"bytes,10,opt,name=contactsArrayMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_LiveLocationMessage struct {
|
||||
LiveLocationMessage *ConsumerApplication_LiveLocationMessage `protobuf:"bytes,11,opt,name=liveLocationMessage,proto3,oneof"`
|
||||
LiveLocationMessage *ConsumerApplication_LiveLocationMessage `protobuf:"bytes,11,opt,name=liveLocationMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_StickerMessage struct {
|
||||
StickerMessage *ConsumerApplication_StickerMessage `protobuf:"bytes,12,opt,name=stickerMessage,proto3,oneof"`
|
||||
StickerMessage *ConsumerApplication_StickerMessage `protobuf:"bytes,12,opt,name=stickerMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_GroupInviteMessage struct {
|
||||
GroupInviteMessage *ConsumerApplication_GroupInviteMessage `protobuf:"bytes,13,opt,name=groupInviteMessage,proto3,oneof"`
|
||||
GroupInviteMessage *ConsumerApplication_GroupInviteMessage `protobuf:"bytes,13,opt,name=groupInviteMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_ViewOnceMessage struct {
|
||||
ViewOnceMessage *ConsumerApplication_ViewOnceMessage `protobuf:"bytes,14,opt,name=viewOnceMessage,proto3,oneof"`
|
||||
ViewOnceMessage *ConsumerApplication_ViewOnceMessage `protobuf:"bytes,14,opt,name=viewOnceMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_ReactionMessage struct {
|
||||
ReactionMessage *ConsumerApplication_ReactionMessage `protobuf:"bytes,16,opt,name=reactionMessage,proto3,oneof"`
|
||||
ReactionMessage *ConsumerApplication_ReactionMessage `protobuf:"bytes,16,opt,name=reactionMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_PollCreationMessage struct {
|
||||
PollCreationMessage *ConsumerApplication_PollCreationMessage `protobuf:"bytes,17,opt,name=pollCreationMessage,proto3,oneof"`
|
||||
PollCreationMessage *ConsumerApplication_PollCreationMessage `protobuf:"bytes,17,opt,name=pollCreationMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_PollUpdateMessage struct {
|
||||
PollUpdateMessage *ConsumerApplication_PollUpdateMessage `protobuf:"bytes,18,opt,name=pollUpdateMessage,proto3,oneof"`
|
||||
PollUpdateMessage *ConsumerApplication_PollUpdateMessage `protobuf:"bytes,18,opt,name=pollUpdateMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_Content_EditMessage struct {
|
||||
EditMessage *ConsumerApplication_EditMessage `protobuf:"bytes,19,opt,name=editMessage,proto3,oneof"`
|
||||
EditMessage *ConsumerApplication_EditMessage `protobuf:"bytes,19,opt,name=editMessage,oneof"`
|
||||
}
|
||||
|
||||
func (*ConsumerApplication_Content_MessageText) isConsumerApplication_Content_Content() {}
|
||||
@@ -854,9 +881,9 @@ type ConsumerApplication_EditMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key *waCommon.MessageKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Message *waCommon.MessageText `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
TimestampMS int64 `protobuf:"varint,3,opt,name=timestampMS,proto3" json:"timestampMS,omitempty"`
|
||||
Key *waCommon.MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
|
||||
Message *waCommon.MessageText `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
|
||||
TimestampMS *int64 `protobuf:"varint,3,opt,name=timestampMS" json:"timestampMS,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_EditMessage) Reset() {
|
||||
@@ -906,8 +933,8 @@ func (x *ConsumerApplication_EditMessage) GetMessage() *waCommon.MessageText {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_EditMessage) GetTimestampMS() int64 {
|
||||
if x != nil {
|
||||
return x.TimestampMS
|
||||
if x != nil && x.TimestampMS != nil {
|
||||
return *x.TimestampMS
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -917,7 +944,7 @@ type ConsumerApplication_PollAddOptionMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PollOption []*ConsumerApplication_Option `protobuf:"bytes,1,rep,name=pollOption,proto3" json:"pollOption,omitempty"`
|
||||
PollOption []*ConsumerApplication_Option `protobuf:"bytes,1,rep,name=pollOption" json:"pollOption,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollAddOptionMessage) Reset() {
|
||||
@@ -964,8 +991,8 @@ type ConsumerApplication_PollVoteMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SelectedOptions [][]byte `protobuf:"bytes,1,rep,name=selectedOptions,proto3" json:"selectedOptions,omitempty"`
|
||||
SenderTimestampMS int64 `protobuf:"varint,2,opt,name=senderTimestampMS,proto3" json:"senderTimestampMS,omitempty"`
|
||||
SelectedOptions [][]byte `protobuf:"bytes,1,rep,name=selectedOptions" json:"selectedOptions,omitempty"`
|
||||
SenderTimestampMS *int64 `protobuf:"varint,2,opt,name=senderTimestampMS" json:"senderTimestampMS,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollVoteMessage) Reset() {
|
||||
@@ -1008,8 +1035,8 @@ func (x *ConsumerApplication_PollVoteMessage) GetSelectedOptions() [][]byte {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollVoteMessage) GetSenderTimestampMS() int64 {
|
||||
if x != nil {
|
||||
return x.SenderTimestampMS
|
||||
if x != nil && x.SenderTimestampMS != nil {
|
||||
return *x.SenderTimestampMS
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1019,8 +1046,8 @@ type ConsumerApplication_PollEncValue struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
EncPayload []byte `protobuf:"bytes,1,opt,name=encPayload,proto3" json:"encPayload,omitempty"`
|
||||
EncIV []byte `protobuf:"bytes,2,opt,name=encIV,proto3" json:"encIV,omitempty"`
|
||||
EncPayload []byte `protobuf:"bytes,1,opt,name=encPayload" json:"encPayload,omitempty"`
|
||||
EncIV []byte `protobuf:"bytes,2,opt,name=encIV" json:"encIV,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollEncValue) Reset() {
|
||||
@@ -1074,9 +1101,9 @@ type ConsumerApplication_PollUpdateMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PollCreationMessageKey *waCommon.MessageKey `protobuf:"bytes,1,opt,name=pollCreationMessageKey,proto3" json:"pollCreationMessageKey,omitempty"`
|
||||
Vote *ConsumerApplication_PollEncValue `protobuf:"bytes,2,opt,name=vote,proto3" json:"vote,omitempty"`
|
||||
AddOption *ConsumerApplication_PollEncValue `protobuf:"bytes,3,opt,name=addOption,proto3" json:"addOption,omitempty"`
|
||||
PollCreationMessageKey *waCommon.MessageKey `protobuf:"bytes,1,opt,name=pollCreationMessageKey" json:"pollCreationMessageKey,omitempty"`
|
||||
Vote *ConsumerApplication_PollEncValue `protobuf:"bytes,2,opt,name=vote" json:"vote,omitempty"`
|
||||
AddOption *ConsumerApplication_PollEncValue `protobuf:"bytes,3,opt,name=addOption" json:"addOption,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollUpdateMessage) Reset() {
|
||||
@@ -1137,10 +1164,10 @@ type ConsumerApplication_PollCreationMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
EncKey []byte `protobuf:"bytes,1,opt,name=encKey,proto3" json:"encKey,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Options []*ConsumerApplication_Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
|
||||
SelectableOptionsCount uint32 `protobuf:"varint,4,opt,name=selectableOptionsCount,proto3" json:"selectableOptionsCount,omitempty"`
|
||||
EncKey []byte `protobuf:"bytes,1,opt,name=encKey" json:"encKey,omitempty"`
|
||||
Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
|
||||
Options []*ConsumerApplication_Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
|
||||
SelectableOptionsCount *uint32 `protobuf:"varint,4,opt,name=selectableOptionsCount" json:"selectableOptionsCount,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollCreationMessage) Reset() {
|
||||
@@ -1183,8 +1210,8 @@ func (x *ConsumerApplication_PollCreationMessage) GetEncKey() []byte {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollCreationMessage) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
if x != nil && x.Name != nil {
|
||||
return *x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1197,8 +1224,8 @@ func (x *ConsumerApplication_PollCreationMessage) GetOptions() []*ConsumerApplic
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_PollCreationMessage) GetSelectableOptionsCount() uint32 {
|
||||
if x != nil {
|
||||
return x.SelectableOptionsCount
|
||||
if x != nil && x.SelectableOptionsCount != nil {
|
||||
return *x.SelectableOptionsCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1208,7 +1235,7 @@ type ConsumerApplication_Option struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
OptionName string `protobuf:"bytes,1,opt,name=optionName,proto3" json:"optionName,omitempty"`
|
||||
OptionName *string `protobuf:"bytes,1,opt,name=optionName" json:"optionName,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Option) Reset() {
|
||||
@@ -1244,8 +1271,8 @@ func (*ConsumerApplication_Option) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Option) GetOptionName() string {
|
||||
if x != nil {
|
||||
return x.OptionName
|
||||
if x != nil && x.OptionName != nil {
|
||||
return *x.OptionName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1255,12 +1282,12 @@ type ConsumerApplication_ReactionMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key *waCommon.MessageKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
|
||||
GroupingKey string `protobuf:"bytes,3,opt,name=groupingKey,proto3" json:"groupingKey,omitempty"`
|
||||
SenderTimestampMS int64 `protobuf:"varint,4,opt,name=senderTimestampMS,proto3" json:"senderTimestampMS,omitempty"`
|
||||
ReactionMetadataDataclassData string `protobuf:"bytes,5,opt,name=reactionMetadataDataclassData,proto3" json:"reactionMetadataDataclassData,omitempty"`
|
||||
Style int32 `protobuf:"varint,6,opt,name=style,proto3" json:"style,omitempty"`
|
||||
Key *waCommon.MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
|
||||
Text *string `protobuf:"bytes,2,opt,name=text" json:"text,omitempty"`
|
||||
GroupingKey *string `protobuf:"bytes,3,opt,name=groupingKey" json:"groupingKey,omitempty"`
|
||||
SenderTimestampMS *int64 `protobuf:"varint,4,opt,name=senderTimestampMS" json:"senderTimestampMS,omitempty"`
|
||||
ReactionMetadataDataclassData *string `protobuf:"bytes,5,opt,name=reactionMetadataDataclassData" json:"reactionMetadataDataclassData,omitempty"`
|
||||
Style *int32 `protobuf:"varint,6,opt,name=style" json:"style,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ReactionMessage) Reset() {
|
||||
@@ -1303,36 +1330,36 @@ func (x *ConsumerApplication_ReactionMessage) GetKey() *waCommon.MessageKey {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ReactionMessage) GetText() string {
|
||||
if x != nil {
|
||||
return x.Text
|
||||
if x != nil && x.Text != nil {
|
||||
return *x.Text
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ReactionMessage) GetGroupingKey() string {
|
||||
if x != nil {
|
||||
return x.GroupingKey
|
||||
if x != nil && x.GroupingKey != nil {
|
||||
return *x.GroupingKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ReactionMessage) GetSenderTimestampMS() int64 {
|
||||
if x != nil {
|
||||
return x.SenderTimestampMS
|
||||
if x != nil && x.SenderTimestampMS != nil {
|
||||
return *x.SenderTimestampMS
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ReactionMessage) GetReactionMetadataDataclassData() string {
|
||||
if x != nil {
|
||||
return x.ReactionMetadataDataclassData
|
||||
if x != nil && x.ReactionMetadataDataclassData != nil {
|
||||
return *x.ReactionMetadataDataclassData
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ReactionMessage) GetStyle() int32 {
|
||||
if x != nil {
|
||||
return x.Style
|
||||
if x != nil && x.Style != nil {
|
||||
return *x.Style
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1342,7 +1369,7 @@ type ConsumerApplication_RevokeMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key *waCommon.MessageKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Key *waCommon.MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_RevokeMessage) Reset() {
|
||||
@@ -1454,11 +1481,11 @@ type isConsumerApplication_ViewOnceMessage_ViewOnceContent interface {
|
||||
}
|
||||
|
||||
type ConsumerApplication_ViewOnceMessage_ImageMessage struct {
|
||||
ImageMessage *ConsumerApplication_ImageMessage `protobuf:"bytes,1,opt,name=imageMessage,proto3,oneof"`
|
||||
ImageMessage *ConsumerApplication_ImageMessage `protobuf:"bytes,1,opt,name=imageMessage,oneof"`
|
||||
}
|
||||
|
||||
type ConsumerApplication_ViewOnceMessage_VideoMessage struct {
|
||||
VideoMessage *ConsumerApplication_VideoMessage `protobuf:"bytes,2,opt,name=videoMessage,proto3,oneof"`
|
||||
VideoMessage *ConsumerApplication_VideoMessage `protobuf:"bytes,2,opt,name=videoMessage,oneof"`
|
||||
}
|
||||
|
||||
func (*ConsumerApplication_ViewOnceMessage_ImageMessage) isConsumerApplication_ViewOnceMessage_ViewOnceContent() {
|
||||
@@ -1472,12 +1499,12 @@ type ConsumerApplication_GroupInviteMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
GroupJID string `protobuf:"bytes,1,opt,name=groupJID,proto3" json:"groupJID,omitempty"`
|
||||
InviteCode string `protobuf:"bytes,2,opt,name=inviteCode,proto3" json:"inviteCode,omitempty"`
|
||||
InviteExpiration int64 `protobuf:"varint,3,opt,name=inviteExpiration,proto3" json:"inviteExpiration,omitempty"`
|
||||
GroupName string `protobuf:"bytes,4,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
JPEGThumbnail []byte `protobuf:"bytes,5,opt,name=JPEGThumbnail,proto3" json:"JPEGThumbnail,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,6,opt,name=caption,proto3" json:"caption,omitempty"`
|
||||
GroupJID *string `protobuf:"bytes,1,opt,name=groupJID" json:"groupJID,omitempty"`
|
||||
InviteCode *string `protobuf:"bytes,2,opt,name=inviteCode" json:"inviteCode,omitempty"`
|
||||
InviteExpiration *int64 `protobuf:"varint,3,opt,name=inviteExpiration" json:"inviteExpiration,omitempty"`
|
||||
GroupName *string `protobuf:"bytes,4,opt,name=groupName" json:"groupName,omitempty"`
|
||||
JPEGThumbnail []byte `protobuf:"bytes,5,opt,name=JPEGThumbnail" json:"JPEGThumbnail,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,6,opt,name=caption" json:"caption,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_GroupInviteMessage) Reset() {
|
||||
@@ -1513,29 +1540,29 @@ func (*ConsumerApplication_GroupInviteMessage) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_GroupInviteMessage) GetGroupJID() string {
|
||||
if x != nil {
|
||||
return x.GroupJID
|
||||
if x != nil && x.GroupJID != nil {
|
||||
return *x.GroupJID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_GroupInviteMessage) GetInviteCode() string {
|
||||
if x != nil {
|
||||
return x.InviteCode
|
||||
if x != nil && x.InviteCode != nil {
|
||||
return *x.InviteCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_GroupInviteMessage) GetInviteExpiration() int64 {
|
||||
if x != nil {
|
||||
return x.InviteExpiration
|
||||
if x != nil && x.InviteExpiration != nil {
|
||||
return *x.InviteExpiration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_GroupInviteMessage) GetGroupName() string {
|
||||
if x != nil {
|
||||
return x.GroupName
|
||||
if x != nil && x.GroupName != nil {
|
||||
return *x.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1559,13 +1586,13 @@ type ConsumerApplication_LiveLocationMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Location *ConsumerApplication_Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
|
||||
AccuracyInMeters uint32 `protobuf:"varint,2,opt,name=accuracyInMeters,proto3" json:"accuracyInMeters,omitempty"`
|
||||
SpeedInMps float32 `protobuf:"fixed32,3,opt,name=speedInMps,proto3" json:"speedInMps,omitempty"`
|
||||
DegreesClockwiseFromMagneticNorth uint32 `protobuf:"varint,4,opt,name=degreesClockwiseFromMagneticNorth,proto3" json:"degreesClockwiseFromMagneticNorth,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,5,opt,name=caption,proto3" json:"caption,omitempty"`
|
||||
SequenceNumber int64 `protobuf:"varint,6,opt,name=sequenceNumber,proto3" json:"sequenceNumber,omitempty"`
|
||||
TimeOffset uint32 `protobuf:"varint,7,opt,name=timeOffset,proto3" json:"timeOffset,omitempty"`
|
||||
Location *ConsumerApplication_Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
|
||||
AccuracyInMeters *uint32 `protobuf:"varint,2,opt,name=accuracyInMeters" json:"accuracyInMeters,omitempty"`
|
||||
SpeedInMps *float32 `protobuf:"fixed32,3,opt,name=speedInMps" json:"speedInMps,omitempty"`
|
||||
DegreesClockwiseFromMagneticNorth *uint32 `protobuf:"varint,4,opt,name=degreesClockwiseFromMagneticNorth" json:"degreesClockwiseFromMagneticNorth,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,5,opt,name=caption" json:"caption,omitempty"`
|
||||
SequenceNumber *int64 `protobuf:"varint,6,opt,name=sequenceNumber" json:"sequenceNumber,omitempty"`
|
||||
TimeOffset *uint32 `protobuf:"varint,7,opt,name=timeOffset" json:"timeOffset,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LiveLocationMessage) Reset() {
|
||||
@@ -1608,22 +1635,22 @@ func (x *ConsumerApplication_LiveLocationMessage) GetLocation() *ConsumerApplica
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LiveLocationMessage) GetAccuracyInMeters() uint32 {
|
||||
if x != nil {
|
||||
return x.AccuracyInMeters
|
||||
if x != nil && x.AccuracyInMeters != nil {
|
||||
return *x.AccuracyInMeters
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LiveLocationMessage) GetSpeedInMps() float32 {
|
||||
if x != nil {
|
||||
return x.SpeedInMps
|
||||
if x != nil && x.SpeedInMps != nil {
|
||||
return *x.SpeedInMps
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LiveLocationMessage) GetDegreesClockwiseFromMagneticNorth() uint32 {
|
||||
if x != nil {
|
||||
return x.DegreesClockwiseFromMagneticNorth
|
||||
if x != nil && x.DegreesClockwiseFromMagneticNorth != nil {
|
||||
return *x.DegreesClockwiseFromMagneticNorth
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1636,15 +1663,15 @@ func (x *ConsumerApplication_LiveLocationMessage) GetCaption() *waCommon.Message
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LiveLocationMessage) GetSequenceNumber() int64 {
|
||||
if x != nil {
|
||||
return x.SequenceNumber
|
||||
if x != nil && x.SequenceNumber != nil {
|
||||
return *x.SequenceNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LiveLocationMessage) GetTimeOffset() uint32 {
|
||||
if x != nil {
|
||||
return x.TimeOffset
|
||||
if x != nil && x.TimeOffset != nil {
|
||||
return *x.TimeOffset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1654,8 +1681,8 @@ type ConsumerApplication_ContactsArrayMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
DisplayName string `protobuf:"bytes,1,opt,name=displayName,proto3" json:"displayName,omitempty"`
|
||||
Contacts []*ConsumerApplication_ContactMessage `protobuf:"bytes,2,rep,name=contacts,proto3" json:"contacts,omitempty"`
|
||||
DisplayName *string `protobuf:"bytes,1,opt,name=displayName" json:"displayName,omitempty"`
|
||||
Contacts []*ConsumerApplication_ContactMessage `protobuf:"bytes,2,rep,name=contacts" json:"contacts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ContactsArrayMessage) Reset() {
|
||||
@@ -1691,8 +1718,8 @@ func (*ConsumerApplication_ContactsArrayMessage) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ContactsArrayMessage) GetDisplayName() string {
|
||||
if x != nil {
|
||||
return x.DisplayName
|
||||
if x != nil && x.DisplayName != nil {
|
||||
return *x.DisplayName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1709,7 +1736,7 @@ type ConsumerApplication_ContactMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Contact *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=contact,proto3" json:"contact,omitempty"`
|
||||
Contact *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=contact" json:"contact,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ContactMessage) Reset() {
|
||||
@@ -1756,10 +1783,10 @@ type ConsumerApplication_StatusTextMesage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Text *ConsumerApplication_ExtendedTextMessage `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
|
||||
TextArgb uint32 `protobuf:"fixed32,6,opt,name=textArgb,proto3" json:"textArgb,omitempty"`
|
||||
BackgroundArgb uint32 `protobuf:"fixed32,7,opt,name=backgroundArgb,proto3" json:"backgroundArgb,omitempty"`
|
||||
Font ConsumerApplication_StatusTextMesage_FontType `protobuf:"varint,8,opt,name=font,proto3,enum=WAConsumerApplication.ConsumerApplication_StatusTextMesage_FontType" json:"font,omitempty"`
|
||||
Text *ConsumerApplication_ExtendedTextMessage `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
|
||||
TextArgb *uint32 `protobuf:"fixed32,6,opt,name=textArgb" json:"textArgb,omitempty"`
|
||||
BackgroundArgb *uint32 `protobuf:"fixed32,7,opt,name=backgroundArgb" json:"backgroundArgb,omitempty"`
|
||||
Font *ConsumerApplication_StatusTextMesage_FontType `protobuf:"varint,8,opt,name=font,enum=WAConsumerApplication.ConsumerApplication_StatusTextMesage_FontType" json:"font,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_StatusTextMesage) Reset() {
|
||||
@@ -1802,22 +1829,22 @@ func (x *ConsumerApplication_StatusTextMesage) GetText() *ConsumerApplication_Ex
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_StatusTextMesage) GetTextArgb() uint32 {
|
||||
if x != nil {
|
||||
return x.TextArgb
|
||||
if x != nil && x.TextArgb != nil {
|
||||
return *x.TextArgb
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_StatusTextMesage) GetBackgroundArgb() uint32 {
|
||||
if x != nil {
|
||||
return x.BackgroundArgb
|
||||
if x != nil && x.BackgroundArgb != nil {
|
||||
return *x.BackgroundArgb
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_StatusTextMesage) GetFont() ConsumerApplication_StatusTextMesage_FontType {
|
||||
if x != nil {
|
||||
return x.Font
|
||||
if x != nil && x.Font != nil {
|
||||
return *x.Font
|
||||
}
|
||||
return ConsumerApplication_StatusTextMesage_SANS_SERIF
|
||||
}
|
||||
@@ -1827,13 +1854,13 @@ type ConsumerApplication_ExtendedTextMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Text *waCommon.MessageText `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
|
||||
MatchedText string `protobuf:"bytes,2,opt,name=matchedText,proto3" json:"matchedText,omitempty"`
|
||||
CanonicalURL string `protobuf:"bytes,3,opt,name=canonicalURL,proto3" json:"canonicalURL,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Thumbnail *waCommon.SubProtocol `protobuf:"bytes,6,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"`
|
||||
PreviewType ConsumerApplication_ExtendedTextMessage_PreviewType `protobuf:"varint,7,opt,name=previewType,proto3,enum=WAConsumerApplication.ConsumerApplication_ExtendedTextMessage_PreviewType" json:"previewType,omitempty"`
|
||||
Text *waCommon.MessageText `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
|
||||
MatchedText *string `protobuf:"bytes,2,opt,name=matchedText" json:"matchedText,omitempty"`
|
||||
CanonicalURL *string `protobuf:"bytes,3,opt,name=canonicalURL" json:"canonicalURL,omitempty"`
|
||||
Description *string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
|
||||
Title *string `protobuf:"bytes,5,opt,name=title" json:"title,omitempty"`
|
||||
Thumbnail *waCommon.SubProtocol `protobuf:"bytes,6,opt,name=thumbnail" json:"thumbnail,omitempty"`
|
||||
PreviewType *ConsumerApplication_ExtendedTextMessage_PreviewType `protobuf:"varint,7,opt,name=previewType,enum=WAConsumerApplication.ConsumerApplication_ExtendedTextMessage_PreviewType" json:"previewType,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ExtendedTextMessage) Reset() {
|
||||
@@ -1876,29 +1903,29 @@ func (x *ConsumerApplication_ExtendedTextMessage) GetText() *waCommon.MessageTex
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ExtendedTextMessage) GetMatchedText() string {
|
||||
if x != nil {
|
||||
return x.MatchedText
|
||||
if x != nil && x.MatchedText != nil {
|
||||
return *x.MatchedText
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ExtendedTextMessage) GetCanonicalURL() string {
|
||||
if x != nil {
|
||||
return x.CanonicalURL
|
||||
if x != nil && x.CanonicalURL != nil {
|
||||
return *x.CanonicalURL
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ExtendedTextMessage) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ExtendedTextMessage) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
if x != nil && x.Title != nil {
|
||||
return *x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1911,8 +1938,8 @@ func (x *ConsumerApplication_ExtendedTextMessage) GetThumbnail() *waCommon.SubPr
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ExtendedTextMessage) GetPreviewType() ConsumerApplication_ExtendedTextMessage_PreviewType {
|
||||
if x != nil {
|
||||
return x.PreviewType
|
||||
if x != nil && x.PreviewType != nil {
|
||||
return *x.PreviewType
|
||||
}
|
||||
return ConsumerApplication_ExtendedTextMessage_NONE
|
||||
}
|
||||
@@ -1922,8 +1949,8 @@ type ConsumerApplication_LocationMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Location *ConsumerApplication_Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
Location *ConsumerApplication_Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
|
||||
Address *string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LocationMessage) Reset() {
|
||||
@@ -1966,8 +1993,8 @@ func (x *ConsumerApplication_LocationMessage) GetLocation() *ConsumerApplication
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_LocationMessage) GetAddress() string {
|
||||
if x != nil {
|
||||
return x.Address
|
||||
if x != nil && x.Address != nil {
|
||||
return *x.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1977,7 +2004,7 @@ type ConsumerApplication_StickerMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Sticker *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=sticker,proto3" json:"sticker,omitempty"`
|
||||
Sticker *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=sticker" json:"sticker,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_StickerMessage) Reset() {
|
||||
@@ -2024,8 +2051,8 @@ type ConsumerApplication_DocumentMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Document *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
|
||||
FileName string `protobuf:"bytes,2,opt,name=fileName,proto3" json:"fileName,omitempty"`
|
||||
Document *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=document" json:"document,omitempty"`
|
||||
FileName *string `protobuf:"bytes,2,opt,name=fileName" json:"fileName,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_DocumentMessage) Reset() {
|
||||
@@ -2068,8 +2095,8 @@ func (x *ConsumerApplication_DocumentMessage) GetDocument() *waCommon.SubProtoco
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_DocumentMessage) GetFileName() string {
|
||||
if x != nil {
|
||||
return x.FileName
|
||||
if x != nil && x.FileName != nil {
|
||||
return *x.FileName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -2079,8 +2106,8 @@ type ConsumerApplication_VideoMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Video *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,2,opt,name=caption,proto3" json:"caption,omitempty"`
|
||||
Video *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=video" json:"video,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,2,opt,name=caption" json:"caption,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_VideoMessage) Reset() {
|
||||
@@ -2134,8 +2161,8 @@ type ConsumerApplication_AudioMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Audio *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=audio,proto3" json:"audio,omitempty"`
|
||||
PTT bool `protobuf:"varint,2,opt,name=PTT,proto3" json:"PTT,omitempty"`
|
||||
Audio *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=audio" json:"audio,omitempty"`
|
||||
PTT *bool `protobuf:"varint,2,opt,name=PTT" json:"PTT,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_AudioMessage) Reset() {
|
||||
@@ -2178,8 +2205,8 @@ func (x *ConsumerApplication_AudioMessage) GetAudio() *waCommon.SubProtocol {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_AudioMessage) GetPTT() bool {
|
||||
if x != nil {
|
||||
return x.PTT
|
||||
if x != nil && x.PTT != nil {
|
||||
return *x.PTT
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -2189,8 +2216,8 @@ type ConsumerApplication_ImageMessage struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Image *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,2,opt,name=caption,proto3" json:"caption,omitempty"`
|
||||
Image *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
|
||||
Caption *waCommon.MessageText `protobuf:"bytes,2,opt,name=caption" json:"caption,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_ImageMessage) Reset() {
|
||||
@@ -2248,7 +2275,7 @@ type ConsumerApplication_InteractiveAnnotation struct {
|
||||
//
|
||||
// *ConsumerApplication_InteractiveAnnotation_Location
|
||||
Action isConsumerApplication_InteractiveAnnotation_Action `protobuf_oneof:"action"`
|
||||
PolygonVertices []*ConsumerApplication_Point `protobuf:"bytes,1,rep,name=polygonVertices,proto3" json:"polygonVertices,omitempty"`
|
||||
PolygonVertices []*ConsumerApplication_Point `protobuf:"bytes,1,rep,name=polygonVertices" json:"polygonVertices,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_InteractiveAnnotation) Reset() {
|
||||
@@ -2309,7 +2336,7 @@ type isConsumerApplication_InteractiveAnnotation_Action interface {
|
||||
}
|
||||
|
||||
type ConsumerApplication_InteractiveAnnotation_Location struct {
|
||||
Location *ConsumerApplication_Location `protobuf:"bytes,2,opt,name=location,proto3,oneof"`
|
||||
Location *ConsumerApplication_Location `protobuf:"bytes,2,opt,name=location,oneof"`
|
||||
}
|
||||
|
||||
func (*ConsumerApplication_InteractiveAnnotation_Location) isConsumerApplication_InteractiveAnnotation_Action() {
|
||||
@@ -2320,8 +2347,8 @@ type ConsumerApplication_Point struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
X float64 `protobuf:"fixed64,1,opt,name=x,proto3" json:"x,omitempty"`
|
||||
Y float64 `protobuf:"fixed64,2,opt,name=y,proto3" json:"y,omitempty"`
|
||||
X *float64 `protobuf:"fixed64,1,opt,name=x" json:"x,omitempty"`
|
||||
Y *float64 `protobuf:"fixed64,2,opt,name=y" json:"y,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Point) Reset() {
|
||||
@@ -2357,15 +2384,15 @@ func (*ConsumerApplication_Point) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Point) GetX() float64 {
|
||||
if x != nil {
|
||||
return x.X
|
||||
if x != nil && x.X != nil {
|
||||
return *x.X
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Point) GetY() float64 {
|
||||
if x != nil {
|
||||
return x.Y
|
||||
if x != nil && x.Y != nil {
|
||||
return *x.Y
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -2375,9 +2402,9 @@ type ConsumerApplication_Location struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
DegreesLatitude float64 `protobuf:"fixed64,1,opt,name=degreesLatitude,proto3" json:"degreesLatitude,omitempty"`
|
||||
DegreesLongitude float64 `protobuf:"fixed64,2,opt,name=degreesLongitude,proto3" json:"degreesLongitude,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
DegreesLatitude *float64 `protobuf:"fixed64,1,opt,name=degreesLatitude" json:"degreesLatitude,omitempty"`
|
||||
DegreesLongitude *float64 `protobuf:"fixed64,2,opt,name=degreesLongitude" json:"degreesLongitude,omitempty"`
|
||||
Name *string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Location) Reset() {
|
||||
@@ -2413,22 +2440,22 @@ func (*ConsumerApplication_Location) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Location) GetDegreesLatitude() float64 {
|
||||
if x != nil {
|
||||
return x.DegreesLatitude
|
||||
if x != nil && x.DegreesLatitude != nil {
|
||||
return *x.DegreesLatitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Location) GetDegreesLongitude() float64 {
|
||||
if x != nil {
|
||||
return x.DegreesLongitude
|
||||
if x != nil && x.DegreesLongitude != nil {
|
||||
return *x.DegreesLongitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_Location) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
if x != nil && x.Name != nil {
|
||||
return *x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -2438,7 +2465,7 @@ type ConsumerApplication_MediaPayload struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Protocol *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
|
||||
Protocol *waCommon.SubProtocol `protobuf:"bytes,1,opt,name=protocol" json:"protocol,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ConsumerApplication_MediaPayload) Reset() {
|
||||
Binary file not shown.
233
vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.proto
vendored
Normal file
233
vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.proto
vendored
Normal file
@@ -0,0 +1,233 @@
|
||||
syntax = "proto2";
|
||||
package WAConsumerApplication;
|
||||
option go_package = "go.mau.fi/whatsmeow/proto/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 {
|
||||
optional WACommon.FutureProofBehavior futureProof = 1;
|
||||
}
|
||||
|
||||
message Metadata {
|
||||
enum SpecialTextSize {
|
||||
SMALL = 1;
|
||||
MEDIUM = 2;
|
||||
LARGE = 3;
|
||||
}
|
||||
|
||||
optional 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 {
|
||||
optional WACommon.MessageKey key = 1;
|
||||
optional WACommon.MessageText message = 2;
|
||||
optional int64 timestampMS = 3;
|
||||
}
|
||||
|
||||
message PollAddOptionMessage {
|
||||
repeated Option pollOption = 1;
|
||||
}
|
||||
|
||||
message PollVoteMessage {
|
||||
repeated bytes selectedOptions = 1;
|
||||
optional int64 senderTimestampMS = 2;
|
||||
}
|
||||
|
||||
message PollEncValue {
|
||||
optional bytes encPayload = 1;
|
||||
optional bytes encIV = 2;
|
||||
}
|
||||
|
||||
message PollUpdateMessage {
|
||||
optional WACommon.MessageKey pollCreationMessageKey = 1;
|
||||
optional PollEncValue vote = 2;
|
||||
optional PollEncValue addOption = 3;
|
||||
}
|
||||
|
||||
message PollCreationMessage {
|
||||
optional bytes encKey = 1;
|
||||
optional string name = 2;
|
||||
repeated Option options = 3;
|
||||
optional uint32 selectableOptionsCount = 4;
|
||||
}
|
||||
|
||||
message Option {
|
||||
optional string optionName = 1;
|
||||
}
|
||||
|
||||
message ReactionMessage {
|
||||
optional WACommon.MessageKey key = 1;
|
||||
optional string text = 2;
|
||||
optional string groupingKey = 3;
|
||||
optional int64 senderTimestampMS = 4;
|
||||
optional string reactionMetadataDataclassData = 5;
|
||||
optional int32 style = 6;
|
||||
}
|
||||
|
||||
message RevokeMessage {
|
||||
optional WACommon.MessageKey key = 1;
|
||||
}
|
||||
|
||||
message ViewOnceMessage {
|
||||
oneof viewOnceContent {
|
||||
ImageMessage imageMessage = 1;
|
||||
VideoMessage videoMessage = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message GroupInviteMessage {
|
||||
optional string groupJID = 1;
|
||||
optional string inviteCode = 2;
|
||||
optional int64 inviteExpiration = 3;
|
||||
optional string groupName = 4;
|
||||
optional bytes JPEGThumbnail = 5;
|
||||
optional WACommon.MessageText caption = 6;
|
||||
}
|
||||
|
||||
message LiveLocationMessage {
|
||||
optional Location location = 1;
|
||||
optional uint32 accuracyInMeters = 2;
|
||||
optional float speedInMps = 3;
|
||||
optional uint32 degreesClockwiseFromMagneticNorth = 4;
|
||||
optional WACommon.MessageText caption = 5;
|
||||
optional int64 sequenceNumber = 6;
|
||||
optional uint32 timeOffset = 7;
|
||||
}
|
||||
|
||||
message ContactsArrayMessage {
|
||||
optional string displayName = 1;
|
||||
repeated ContactMessage contacts = 2;
|
||||
}
|
||||
|
||||
message ContactMessage {
|
||||
optional 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;
|
||||
}
|
||||
|
||||
optional ExtendedTextMessage text = 1;
|
||||
optional fixed32 textArgb = 6;
|
||||
optional fixed32 backgroundArgb = 7;
|
||||
optional FontType font = 8;
|
||||
}
|
||||
|
||||
message ExtendedTextMessage {
|
||||
enum PreviewType {
|
||||
NONE = 0;
|
||||
VIDEO = 1;
|
||||
}
|
||||
|
||||
optional WACommon.MessageText text = 1;
|
||||
optional string matchedText = 2;
|
||||
optional string canonicalURL = 3;
|
||||
optional string description = 4;
|
||||
optional string title = 5;
|
||||
optional WACommon.SubProtocol thumbnail = 6;
|
||||
optional PreviewType previewType = 7;
|
||||
}
|
||||
|
||||
message LocationMessage {
|
||||
optional Location location = 1;
|
||||
optional string address = 2;
|
||||
}
|
||||
|
||||
message StickerMessage {
|
||||
optional WACommon.SubProtocol sticker = 1;
|
||||
}
|
||||
|
||||
message DocumentMessage {
|
||||
optional WACommon.SubProtocol document = 1;
|
||||
optional string fileName = 2;
|
||||
}
|
||||
|
||||
message VideoMessage {
|
||||
optional WACommon.SubProtocol video = 1;
|
||||
optional WACommon.MessageText caption = 2;
|
||||
}
|
||||
|
||||
message AudioMessage {
|
||||
optional WACommon.SubProtocol audio = 1;
|
||||
optional bool PTT = 2;
|
||||
}
|
||||
|
||||
message ImageMessage {
|
||||
optional WACommon.SubProtocol image = 1;
|
||||
optional WACommon.MessageText caption = 2;
|
||||
}
|
||||
|
||||
message InteractiveAnnotation {
|
||||
oneof action {
|
||||
Location location = 2;
|
||||
}
|
||||
|
||||
repeated Point polygonVertices = 1;
|
||||
}
|
||||
|
||||
message Point {
|
||||
optional double x = 1;
|
||||
optional double y = 2;
|
||||
}
|
||||
|
||||
message Location {
|
||||
optional double degreesLatitude = 1;
|
||||
optional double degreesLongitude = 2;
|
||||
optional string name = 3;
|
||||
}
|
||||
|
||||
message MediaPayload {
|
||||
optional WACommon.SubProtocol protocol = 1;
|
||||
}
|
||||
|
||||
optional Payload payload = 1;
|
||||
optional Metadata metadata = 2;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package waConsumerApplication
|
||||
|
||||
import (
|
||||
"go.mau.fi/whatsmeow/binary/armadillo/armadilloutil"
|
||||
"go.mau.fi/whatsmeow/binary/armadillo/waMediaTransport"
|
||||
"go.mau.fi/whatsmeow/proto/armadilloutil"
|
||||
"go.mau.fi/whatsmeow/proto/waMediaTransport"
|
||||
)
|
||||
|
||||
type ConsumerApplication_Content_Content = isConsumerApplication_Content_Content
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user