summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-01-31 00:27:37 +0100
committerWim <wim@42.be>2022-03-20 14:57:48 +0100
commite3cafeaf9292f67459ff1d186f68283bfaedf2ae (patch)
treeb69c39620aa91dba695b3b935c6651c0fb37ce75 /vendor/go.mau.fi
parente7b193788a56ee7cdb02a87a9db0ad6724ef66d5 (diff)
downloadmatterbridge-msglm-e3cafeaf9292f67459ff1d186f68283bfaedf2ae.tar.gz
matterbridge-msglm-e3cafeaf9292f67459ff1d186f68283bfaedf2ae.tar.bz2
matterbridge-msglm-e3cafeaf9292f67459ff1d186f68283bfaedf2ae.zip
Add dependencies/vendor (whatsapp)
Diffstat (limited to 'vendor/go.mau.fi')
-rw-r--r--vendor/go.mau.fi/libsignal/LICENSE674
-rw-r--r--vendor/go.mau.fi/libsignal/cipher/Cbc.go101
-rw-r--r--vendor/go.mau.fi/libsignal/cipher/Cipher.go105
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/Curve.go109
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/DjbECPublicKey.go29
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/DkbECPrivateKey.go29
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/Doc.go3
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/ECKeyPair.go27
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/ECPrivateKey.go7
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/ECPublicKey.go11
-rw-r--r--vendor/go.mau.fi/libsignal/ecc/SignCurve25519.go97
-rw-r--r--vendor/go.mau.fi/libsignal/groups/GroupCipher.go141
-rw-r--r--vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go84
-rw-r--r--vendor/go.mau.fi/libsignal/groups/ratchet/Doc.go3
-rw-r--r--vendor/go.mau.fi/libsignal/groups/ratchet/SenderChainKey.go68
-rw-r--r--vendor/go.mau.fi/libsignal/groups/ratchet/SenderMessageKey.go89
-rw-r--r--vendor/go.mau.fi/libsignal/groups/state/record/Doc.go2
-rw-r--r--vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyRecord.go149
-rw-r--r--vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyState.go186
-rw-r--r--vendor/go.mau.fi/libsignal/groups/state/store/Doc.go3
-rw-r--r--vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go11
-rw-r--r--vendor/go.mau.fi/libsignal/kdf/HKDF.go47
-rw-r--r--vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go127
-rw-r--r--vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go47
-rw-r--r--vendor/go.mau.fi/libsignal/keys/identity/IdentityKeyPair.go39
-rw-r--r--vendor/go.mau.fi/libsignal/keys/message/MessageKey.go91
-rw-r--r--vendor/go.mau.fi/libsignal/keys/prekey/PreKeyBundle.go86
-rw-r--r--vendor/go.mau.fi/libsignal/keys/root/RootKey.go66
-rw-r--r--vendor/go.mau.fi/libsignal/keys/session/DerivedSecrets.go29
-rw-r--r--vendor/go.mau.fi/libsignal/keys/session/Pair.go43
-rw-r--r--vendor/go.mau.fi/libsignal/logger/DefaultLogger.go85
-rw-r--r--vendor/go.mau.fi/libsignal/logger/Logger.go89
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/CiphertextMessage.go19
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/Doc.go3
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/PreKeySignalMessage.go152
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/SenderKeyDistributionMessage.go147
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/SenderKeyMessage.go168
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/SenderKeyName.go25
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/SignalMessage.go226
-rw-r--r--vendor/go.mau.fi/libsignal/protocol/SignalProtocolAddress.go38
-rw-r--r--vendor/go.mau.fi/libsignal/ratchet/Ratchet.go197
-rw-r--r--vendor/go.mau.fi/libsignal/ratchet/ReceiverParameters.go106
-rw-r--r--vendor/go.mau.fi/libsignal/ratchet/SenderParameters.go106
-rw-r--r--vendor/go.mau.fi/libsignal/ratchet/SymmetricParameters.go18
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go245
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.proto14
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/JSONSerializer.go303
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go1500
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.proto114
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/ProtoBufferSerializer.go262
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/Serializer.go31
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go640
-rw-r--r--vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.proto45
-rw-r--r--vendor/go.mau.fi/libsignal/session/Session.go272
-rw-r--r--vendor/go.mau.fi/libsignal/session/SessionCipher.go366
-rw-r--r--vendor/go.mau.fi/libsignal/signalerror/errors.go37
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/ChainState.go157
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/Doc.go3
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/PendingKeyExchangeState.go91
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/PendingPreKeyState.go62
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/PreKeyRecord.go90
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/SessionRecord.go197
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/SessionState.go531
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/SignedPreKeyRecord.go112
-rw-r--r--vendor/go.mau.fi/libsignal/state/record/UnacknowledgedPreKey.go69
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/Doc.go3
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go29
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go21
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go21
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/SessionStore.go17
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/SignalProtocolStore.go15
-rw-r--r--vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go24
-rw-r--r--vendor/go.mau.fi/libsignal/util/bytehelper/ByteHelper.go97
-rw-r--r--vendor/go.mau.fi/libsignal/util/errorhelper/ErrorHelper.go40
-rw-r--r--vendor/go.mau.fi/libsignal/util/keyhelper/KeyHelper.go95
-rw-r--r--vendor/go.mau.fi/libsignal/util/medium/Medium.go4
-rw-r--r--vendor/go.mau.fi/libsignal/util/optional/Integer.go17
-rw-r--r--vendor/go.mau.fi/whatsmeow/LICENSE374
-rw-r--r--vendor/go.mau.fi/whatsmeow/README.md39
-rw-r--r--vendor/go.mau.fi/whatsmeow/appstate.go193
-rw-r--r--vendor/go.mau.fi/whatsmeow/appstate/decode.go310
-rw-r--r--vendor/go.mau.fi/whatsmeow/appstate/errors.go19
-rw-r--r--vendor/go.mau.fi/whatsmeow/appstate/hash.go96
-rw-r--r--vendor/go.mau.fi/whatsmeow/appstate/keys.go85
-rw-r--r--vendor/go.mau.fi/whatsmeow/appstate/lthash/lthash.go58
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/attrs.go177
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/decoder.go353
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/encoder.go293
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/errors.go12
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/node.go83
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go21520
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.rawbin0 -> 57190 bytes
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/proto/def.proto2011
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/proto/doc.go2
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/token/token.go88
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/unpack.go31
-rw-r--r--vendor/go.mau.fi/whatsmeow/binary/xml.go108
-rw-r--r--vendor/go.mau.fi/whatsmeow/call.go73
-rw-r--r--vendor/go.mau.fi/whatsmeow/client.go459
-rw-r--r--vendor/go.mau.fi/whatsmeow/connectionevents.go141
-rw-r--r--vendor/go.mau.fi/whatsmeow/download.go213
-rw-r--r--vendor/go.mau.fi/whatsmeow/errors.go157
-rw-r--r--vendor/go.mau.fi/whatsmeow/group.go566
-rw-r--r--vendor/go.mau.fi/whatsmeow/handshake.go131
-rw-r--r--vendor/go.mau.fi/whatsmeow/keepalive.go62
-rw-r--r--vendor/go.mau.fi/whatsmeow/mediaconn.go93
-rw-r--r--vendor/go.mau.fi/whatsmeow/message.go383
-rw-r--r--vendor/go.mau.fi/whatsmeow/notification.go205
-rw-r--r--vendor/go.mau.fi/whatsmeow/pair.go244
-rw-r--r--vendor/go.mau.fi/whatsmeow/prekeys.go235
-rw-r--r--vendor/go.mau.fi/whatsmeow/presence.go101
-rw-r--r--vendor/go.mau.fi/whatsmeow/privacysettings.go93
-rw-r--r--vendor/go.mau.fi/whatsmeow/qrchan.go168
-rw-r--r--vendor/go.mau.fi/whatsmeow/receipt.go148
-rw-r--r--vendor/go.mau.fi/whatsmeow/request.go141
-rw-r--r--vendor/go.mau.fi/whatsmeow/retry.go264
-rw-r--r--vendor/go.mau.fi/whatsmeow/send.go357
-rw-r--r--vendor/go.mau.fi/whatsmeow/socket/constants.go40
-rw-r--r--vendor/go.mau.fi/whatsmeow/socket/framesocket.go228
-rw-r--r--vendor/go.mau.fi/whatsmeow/socket/noisehandshake.go135
-rw-r--r--vendor/go.mau.fi/whatsmeow/socket/noisesocket.go104
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/clientpayload.go118
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/signal.go168
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go245
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go610
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go214
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/store.go132
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/call.go21
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/events/appstate.go103
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/events/call.go57
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/events/events.go263
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/group.go67
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/jid.go193
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/message.go58
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/presence.go22
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/user.go96
-rw-r--r--vendor/go.mau.fi/whatsmeow/upload.go107
-rw-r--r--vendor/go.mau.fi/whatsmeow/user.go368
-rw-r--r--vendor/go.mau.fi/whatsmeow/util/cbcutil/cbc.go101
-rw-r--r--vendor/go.mau.fi/whatsmeow/util/hkdfutil/hkdf.go28
-rw-r--r--vendor/go.mau.fi/whatsmeow/util/keys/keypair.go75
-rw-r--r--vendor/go.mau.fi/whatsmeow/util/log/log.go83
142 files changed, 43128 insertions, 0 deletions
diff --git a/vendor/go.mau.fi/libsignal/LICENSE b/vendor/go.mau.fi/libsignal/LICENSE
new file mode 100644
index 00000000..eecbf2cf
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ libsignal-protocol-go
+ Copyright (C) 2017 RadicalApp LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ libsignal-protocol-go Copyright (C) 2017 RadicalApp LLC
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/vendor/go.mau.fi/libsignal/cipher/Cbc.go b/vendor/go.mau.fi/libsignal/cipher/Cbc.go
new file mode 100644
index 00000000..6a6db5df
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/cipher/Cbc.go
@@ -0,0 +1,101 @@
+/*
+CBC describes a block cipher mode. In cryptography, a block cipher mode of operation is an algorithm that uses a
+block cipher to provide an information service such as confidentiality or authenticity. A block cipher by itself
+is only suitable for the secure cryptographic transformation (encryption or decryption) of one fixed-length group of
+bits called a block. A mode of operation describes how to repeatedly apply a cipher's single-block operation to
+securely transform amounts of data larger than a block.
+
+This package simplifies the usage of AES-256-CBC.
+*/
+package cipher
+
+/*
+Some code is provided by the GitHub user locked (github.com/locked):
+https://gist.github.com/locked/b066aa1ddeb2b28e855e
+Thanks!
+*/
+import (
+ "bytes"
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/rand"
+ "fmt"
+ "io"
+)
+
+/*
+Decrypt is a function that decrypts a given cipher text with a provided key and initialization vector(iv).
+*/
+func DecryptCbc(iv, key, ciphertext []byte) ([]byte, error) {
+ block, err := aes.NewCipher(key)
+
+ if err != nil {
+ return nil, err
+ }
+
+ if len(ciphertext) < aes.BlockSize {
+ return nil, fmt.Errorf("ciphertext is shorter then block size: %d / %d", len(ciphertext), aes.BlockSize)
+ }
+
+ if iv == nil {
+ iv = ciphertext[:aes.BlockSize]
+ ciphertext = ciphertext[aes.BlockSize:]
+ }
+
+ cbc := cipher.NewCBCDecrypter(block, iv)
+ cbc.CryptBlocks(ciphertext, ciphertext)
+
+ return unpad(ciphertext)
+}
+
+/*
+Encrypt is a function that encrypts plaintext with a given key and an optional initialization vector(iv).
+*/
+func EncryptCbc(iv, key, plaintext []byte) ([]byte, error) {
+ plaintext = pad(plaintext, aes.BlockSize)
+
+ if len(plaintext)%aes.BlockSize != 0 {
+ return nil, fmt.Errorf("plaintext is not a multiple of the block size: %d / %d", len(plaintext), aes.BlockSize)
+ }
+
+ block, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+
+ var ciphertext []byte
+ if iv == nil {
+ ciphertext = make([]byte, aes.BlockSize+len(plaintext))
+ iv := ciphertext[:aes.BlockSize]
+ if _, err := io.ReadFull(rand.Reader, iv); err != nil {
+ return nil, err
+ }
+
+ cbc := cipher.NewCBCEncrypter(block, iv)
+ cbc.CryptBlocks(ciphertext[aes.BlockSize:], plaintext)
+ } else {
+ ciphertext = make([]byte, len(plaintext))
+
+ cbc := cipher.NewCBCEncrypter(block, iv)
+ cbc.CryptBlocks(ciphertext, plaintext)
+ }
+
+ return ciphertext, nil
+}
+
+func pad(ciphertext []byte, blockSize int) []byte {
+ padding := blockSize - len(ciphertext)%blockSize
+ padtext := bytes.Repeat([]byte{byte(padding)}, padding)
+ return append(ciphertext, padtext...)
+}
+
+func unpad(src []byte) ([]byte, error) {
+ length := len(src)
+ padLen := int(src[length-1])
+
+ if padLen > length {
+ return nil, fmt.Errorf("padding is greater then the length: %d / %d", padLen, length)
+ }
+
+ return src[:(length - padLen)], nil
+}
diff --git a/vendor/go.mau.fi/libsignal/cipher/Cipher.go b/vendor/go.mau.fi/libsignal/cipher/Cipher.go
new file mode 100644
index 00000000..edfb428f
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/cipher/Cipher.go
@@ -0,0 +1,105 @@
+// Package cipher is a package for common encrypt/decrypt of symmetric key messages.
+package cipher
+
+import (
+ "bytes"
+ "crypto/aes"
+ "crypto/cipher"
+ "errors"
+)
+
+// Decrypt will use the given key, iv, and ciphertext and return
+// the plaintext bytes.
+func Decrypt(iv, key, ciphertext []byte) ([]byte, error) {
+ block, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ if len(ciphertext) < aes.BlockSize {
+ return nil, errors.New("ciphertext too short")
+ }
+ cbc := cipher.NewCBCDecrypter(block, iv)
+ cbc.CryptBlocks(ciphertext, ciphertext)
+
+ unpaddedText, err := pkcs7Unpad(ciphertext, aes.BlockSize)
+ if err != nil {
+ return nil, err
+ }
+
+ return unpaddedText, nil
+}
+
+// Encrypt will use the given iv, key, and plaintext bytes
+// and return ciphertext bytes.
+func Encrypt(iv, key, plaintext []byte) ([]byte, error) {
+ block, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ paddedText, err := pkcs7Pad(plaintext, block.BlockSize())
+ if err != nil {
+ return nil, err
+ }
+ ciphertext := make([]byte, len(paddedText))
+ mode := cipher.NewCBCEncrypter(block, iv)
+ mode.CryptBlocks(ciphertext, paddedText)
+
+ return ciphertext, nil
+}
+
+// PKCS7 padding.
+
+// PKCS7 errors.
+var (
+ // ErrInvalidBlockSize indicates hash blocksize <= 0.
+ ErrInvalidBlockSize = errors.New("invalid blocksize")
+
+ // ErrInvalidPKCS7Data indicates bad input to PKCS7 pad or unpad.
+ ErrInvalidPKCS7Data = errors.New("invalid PKCS7 data (empty or not padded)")
+
+ // ErrInvalidPKCS7Padding indicates PKCS7 unpad fails to bad input.
+ ErrInvalidPKCS7Padding = errors.New("invalid padding on input")
+)
+
+// pkcs7Pad right-pads the given byte slice with 1 to n bytes, where
+// n is the block size. The size of the result is x times n, where x
+// is at least 1.
+func pkcs7Pad(b []byte, blocksize int) ([]byte, error) {
+ if blocksize <= 0 {
+ return nil, ErrInvalidBlockSize
+ }
+ if b == nil || len(b) == 0 {
+ return nil, ErrInvalidPKCS7Data
+ }
+ n := blocksize - (len(b) % blocksize)
+ pb := make([]byte, len(b)+n)
+ copy(pb, b)
+ copy(pb[len(b):], bytes.Repeat([]byte{byte(n)}, n))
+ return pb, nil
+}
+
+// pkcs7Unpad validates and unpads data from the given bytes slice.
+// The returned value will be 1 to n bytes smaller depending on the
+// amount of padding, where n is the block size.
+func pkcs7Unpad(b []byte, blocksize int) ([]byte, error) {
+ if blocksize <= 0 {
+ return nil, ErrInvalidBlockSize
+ }
+ if b == nil || len(b) == 0 {
+ return nil, ErrInvalidPKCS7Data
+ }
+ if len(b)%blocksize != 0 {
+ return nil, ErrInvalidPKCS7Padding
+ }
+ c := b[len(b)-1]
+ n := int(c)
+ if n == 0 || n > len(b) {
+ return nil, ErrInvalidPKCS7Padding
+ }
+ for i := 0; i < n; i++ {
+ if b[len(b)-n+i] != c {
+ return nil, ErrInvalidPKCS7Padding
+ }
+ }
+ return b[:len(b)-n], nil
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/Curve.go b/vendor/go.mau.fi/libsignal/ecc/Curve.go
new file mode 100644
index 00000000..f93cc39a
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/Curve.go
@@ -0,0 +1,109 @@
+package ecc
+
+import (
+ "crypto/rand"
+ "errors"
+ "fmt"
+ "io"
+
+ "golang.org/x/crypto/curve25519"
+
+ "go.mau.fi/libsignal/logger"
+)
+
+// DjbType is the Diffie-Hellman curve type (curve25519) created by D. J. Bernstein.
+const DjbType = 0x05
+
+var ErrBadKeyType = errors.New("bad key type")
+
+// DecodePoint will take the given bytes and offset and return an ECPublicKeyable object.
+// This is used to check the byte at the given offset in the byte array for a special
+// "type" byte that will determine the key type. Currently only DJB EC keys are supported.
+func DecodePoint(bytes []byte, offset int) (ECPublicKeyable, error) {
+ keyType := bytes[offset] & 0xFF
+
+ switch keyType {
+ case DjbType:
+ keyBytes := [32]byte{}
+ copy(keyBytes[:], bytes[offset+1:])
+ return NewDjbECPublicKey(keyBytes), nil
+ default:
+ return nil, fmt.Errorf("%w %d", ErrBadKeyType, keyType)
+ }
+}
+
+func CreateKeyPair(privateKey []byte) *ECKeyPair {
+ var private, public [32]byte
+ copy(private[:], privateKey)
+
+ private[0] &= 248
+ private[31] &= 127
+ private[31] |= 64
+
+ curve25519.ScalarBaseMult(&public, &private)
+
+ // Put data into our keypair struct
+ djbECPub := NewDjbECPublicKey(public)
+ djbECPriv := NewDjbECPrivateKey(private)
+ keypair := NewECKeyPair(djbECPub, djbECPriv)
+
+ logger.Debug("Returning keypair: ", keypair)
+ return keypair
+}
+
+// GenerateKeyPair returns an EC Key Pair.
+func GenerateKeyPair() (*ECKeyPair, error) {
+ // logger.Debug("Generating EC Key Pair...")
+ // Get cryptographically secure random numbers.
+ random := rand.Reader
+
+ // Create a byte array for our public and private keys.
+ var private, public [32]byte
+
+ // Generate some random data
+ _, err := io.ReadFull(random, private[:])
+ if err != nil {
+ return nil, err
+ }
+
+ // Documented at: http://cr.yp.to/ecdh.html
+ private[0] &= 248
+ private[31] &= 127
+ private[31] |= 64
+
+ curve25519.ScalarBaseMult(&public, &private)
+
+ // Put data into our keypair struct
+ djbECPub := NewDjbECPublicKey(public)
+ djbECPriv := NewDjbECPrivateKey(private)
+ keypair := NewECKeyPair(djbECPub, djbECPriv)
+
+ // logger.Debug("Returning keypair: ", keypair)
+
+ return keypair, nil
+}
+
+// VerifySignature verifies that the message was signed with the given key.
+func VerifySignature(signingKey ECPublicKeyable, message []byte, signature [64]byte) bool {
+ logger.Debug("Verifying signature of bytes: ", message)
+ publicKey := signingKey.PublicKey()
+ valid := verify(publicKey, message, &signature)
+ logger.Debug("Signature valid: ", valid)
+ return valid
+}
+
+// CalculateSignature signs a message with the given private key.
+func CalculateSignature(signingKey ECPrivateKeyable, message []byte) [64]byte {
+ logger.Debug("Signing bytes with signing key")
+ // Get cryptographically secure random numbers.
+ var random [64]byte
+ r := rand.Reader
+ io.ReadFull(r, random[:])
+
+ // Get the private key.
+ privateKey := signingKey.Serialize()
+
+ // Sign the message.
+ signature := sign(&privateKey, message, random)
+ return *signature
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/DjbECPublicKey.go b/vendor/go.mau.fi/libsignal/ecc/DjbECPublicKey.go
new file mode 100644
index 00000000..11757fb4
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/DjbECPublicKey.go
@@ -0,0 +1,29 @@
+package ecc
+
+// NewDjbECPublicKey creates a new Curve25519 public key with the given bytes.
+func NewDjbECPublicKey(publicKey [32]byte) *DjbECPublicKey {
+ key := DjbECPublicKey{
+ publicKey: publicKey,
+ }
+ return &key
+}
+
+// DjbECPublicKey implements the ECPublicKey interface and uses Curve25519.
+type DjbECPublicKey struct {
+ publicKey [32]byte
+}
+
+// PublicKey returns the EC public key as a byte array.
+func (d *DjbECPublicKey) PublicKey() [32]byte {
+ return d.publicKey
+}
+
+// Serialize returns the public key prepended by the DjbType value.
+func (d *DjbECPublicKey) Serialize() []byte {
+ return append([]byte{DjbType}, d.publicKey[:]...)
+}
+
+// Type returns the DjbType value.
+func (d *DjbECPublicKey) Type() int {
+ return DjbType
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/DkbECPrivateKey.go b/vendor/go.mau.fi/libsignal/ecc/DkbECPrivateKey.go
new file mode 100644
index 00000000..055692ca
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/DkbECPrivateKey.go
@@ -0,0 +1,29 @@
+package ecc
+
+// NewDjbECPrivateKey returns a new EC private key with the given bytes.
+func NewDjbECPrivateKey(key [32]byte) *DjbECPrivateKey {
+ private := DjbECPrivateKey{
+ privateKey: key,
+ }
+ return &private
+}
+
+// DjbECPrivateKey implements the ECPrivateKey interface and uses Curve25519.
+type DjbECPrivateKey struct {
+ privateKey [32]byte
+}
+
+// PrivateKey returns the private key as a byte-array.
+func (d *DjbECPrivateKey) PrivateKey() [32]byte {
+ return d.privateKey
+}
+
+// Serialize returns the private key as a byte-array.
+func (d *DjbECPrivateKey) Serialize() [32]byte {
+ return d.privateKey
+}
+
+// Type returns the EC type value.
+func (d *DjbECPrivateKey) Type() int {
+ return DjbType
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/Doc.go b/vendor/go.mau.fi/libsignal/ecc/Doc.go
new file mode 100644
index 00000000..06e2cac7
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/Doc.go
@@ -0,0 +1,3 @@
+// Package ecc provides a way to generate, sign, and use Elliptic-Curve
+// X25519 Cryptography keys.
+package ecc
diff --git a/vendor/go.mau.fi/libsignal/ecc/ECKeyPair.go b/vendor/go.mau.fi/libsignal/ecc/ECKeyPair.go
new file mode 100644
index 00000000..11103447
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/ECKeyPair.go
@@ -0,0 +1,27 @@
+package ecc
+
+// NewECKeyPair returns a new elliptic curve keypair given the specified public and private keys.
+func NewECKeyPair(publicKey ECPublicKeyable, privateKey ECPrivateKeyable) *ECKeyPair {
+ keypair := ECKeyPair{
+ publicKey: publicKey,
+ privateKey: privateKey,
+ }
+
+ return &keypair
+}
+
+// ECKeyPair is a combination of both public and private elliptic curve keys.
+type ECKeyPair struct {
+ publicKey ECPublicKeyable
+ privateKey ECPrivateKeyable
+}
+
+// PublicKey returns the public key from the key pair.
+func (e *ECKeyPair) PublicKey() ECPublicKeyable {
+ return e.publicKey
+}
+
+// PrivateKey returns the private key from the key pair.
+func (e *ECKeyPair) PrivateKey() ECPrivateKeyable {
+ return e.privateKey
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/ECPrivateKey.go b/vendor/go.mau.fi/libsignal/ecc/ECPrivateKey.go
new file mode 100644
index 00000000..be3ddae5
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/ECPrivateKey.go
@@ -0,0 +1,7 @@
+package ecc
+
+// ECPrivateKeyable is an interface for all elliptic curve private keys.
+type ECPrivateKeyable interface {
+ Serialize() [32]byte
+ Type() int
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/ECPublicKey.go b/vendor/go.mau.fi/libsignal/ecc/ECPublicKey.go
new file mode 100644
index 00000000..9b71f050
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/ECPublicKey.go
@@ -0,0 +1,11 @@
+package ecc
+
+// KeySize is the size of EC keys (32) with the EC type byte prepended to it.
+const KeySize int = 33
+
+// ECPublicKeyable is an interface for all elliptic curve public keys.
+type ECPublicKeyable interface {
+ Serialize() []byte
+ Type() int
+ PublicKey() [32]byte
+}
diff --git a/vendor/go.mau.fi/libsignal/ecc/SignCurve25519.go b/vendor/go.mau.fi/libsignal/ecc/SignCurve25519.go
new file mode 100644
index 00000000..a9bd7b48
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ecc/SignCurve25519.go
@@ -0,0 +1,97 @@
+package ecc
+
+// Package curve25519sign implements a signature scheme based on Curve25519 keys.
+// See https://moderncrypto.org/mail-archive/curves/2014/000205.html for details.
+
+import (
+ "crypto/ed25519"
+ "crypto/sha512"
+
+ "filippo.io/edwards25519"
+ "filippo.io/edwards25519/field"
+)
+
+// sign signs the message with privateKey and returns a signature as a byte slice.
+func sign(privateKey *[32]byte, message []byte, random [64]byte) *[64]byte {
+
+ // Calculate Ed25519 public key from Curve25519 private key
+ var A edwards25519.Point
+ privateKeyScalar, _ := edwards25519.NewScalar().SetBytesWithClamping(privateKey[:])
+ A.ScalarBaseMult(privateKeyScalar)
+ publicKey := *(*[32]byte)(A.Bytes())
+
+ // Calculate r
+ diversifier := [32]byte{
+ 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
+
+ var r [64]byte
+ hash := sha512.New()
+ hash.Write(diversifier[:])
+ hash.Write(privateKey[:])
+ hash.Write(message)
+ hash.Write(random[:])
+ hash.Sum(r[:0])
+
+ // Calculate R
+ var rReduced *edwards25519.Scalar
+ rReduced, _ = edwards25519.NewScalar().SetUniformBytes(r[:])
+ var R edwards25519.Point
+ R.ScalarBaseMult(rReduced)
+
+ var encodedR [32]byte
+ encodedR = *(*[32]byte)(R.Bytes())
+
+ // Calculate S = r + SHA2-512(R || A_ed || msg) * a (mod L)
+ var hramDigest [64]byte
+ hash.Reset()
+ hash.Write(encodedR[:])
+ hash.Write(publicKey[:])
+ hash.Write(message)
+ hash.Sum(hramDigest[:0])
+ hramDigestReduced, _ := edwards25519.NewScalar().SetUniformBytes(hramDigest[:])
+
+ sScalar := edwards25519.NewScalar().MultiplyAdd(hramDigestReduced, privateKeyScalar, rReduced)
+ s := *(*[32]byte)(sScalar.Bytes())
+
+ signature := new([64]byte)
+ copy(signature[:], encodedR[:])
+ copy(signature[32:], s[:])
+ signature[63] |= publicKey[31] & 0x80
+
+ return signature
+}
+
+// verify checks whether the message has a valid signature.
+func verify(publicKey [32]byte, message []byte, signature *[64]byte) bool {
+
+ publicKey[31] &= 0x7F
+
+ /* Convert the Curve25519 public key into an Ed25519 public key. In
+ particular, convert Curve25519's "montgomery" x-coordinate into an
+ Ed25519 "edwards" y-coordinate:
+
+ ed_y = (mont_x - 1) / (mont_x + 1)
+
+ NOTE: mont_x=-1 is converted to ed_y=0 since fe_invert is mod-exp
+
+ Then move the sign bit into the pubkey from the signature.
+ */
+
+ var edY, one, montX, montXMinusOne, montXPlusOne field.Element
+ _, _ = montX.SetBytes(publicKey[:])
+ _ = one.One()
+ montXMinusOne.Subtract(&montX, &one)
+ montXPlusOne.Add(&montX, &one)
+ montXPlusOne.Invert(&montXPlusOne)
+ edY.Multiply(&montXMinusOne, &montXPlusOne)
+
+ A_ed := *(*[32]byte)(edY.Bytes())
+
+ A_ed[31] |= signature[63] & 0x80
+ signature[63] &= 0x7F
+
+ return ed25519.Verify(A_ed[:], message, signature[:])
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/GroupCipher.go b/vendor/go.mau.fi/libsignal/groups/GroupCipher.go
new file mode 100644
index 00000000..b821f3c3
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/GroupCipher.go
@@ -0,0 +1,141 @@
+package groups
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/cipher"
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/groups/ratchet"
+ "go.mau.fi/libsignal/groups/state/record"
+ "go.mau.fi/libsignal/groups/state/store"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/signalerror"
+)
+
+// NewGroupCipher will return a new group message cipher that can be used for
+// encrypt/decrypt operations.
+func NewGroupCipher(builder *SessionBuilder, senderKeyID *protocol.SenderKeyName,
+ senderKeyStore store.SenderKey) *GroupCipher {
+
+ return &GroupCipher{
+ senderKeyID: senderKeyID,
+ senderKeyStore: senderKeyStore,
+ sessionBuilder: builder,
+ }
+}
+
+// GroupCipher is the main entry point for group encrypt/decrypt operations.
+// Once a session has been established, this can be used for
+// all encrypt/decrypt operations within that session.
+type GroupCipher struct {
+ senderKeyID *protocol.SenderKeyName
+ senderKeyStore store.SenderKey
+ sessionBuilder *SessionBuilder
+}
+
+// Encrypt will take the given message in bytes and return encrypted bytes.
+func (c *GroupCipher) Encrypt(plaintext []byte) (protocol.GroupCiphertextMessage, error) {
+ // Load the sender key based on id from our store.
+ keyRecord := c.senderKeyStore.LoadSenderKey(c.senderKeyID)
+ senderKeyState, err := keyRecord.SenderKeyState()
+ if err != nil {
+ return nil, err
+ }
+
+ // Get the message key from the senderkey state.
+ senderKey, err := senderKeyState.SenderChainKey().SenderMessageKey()
+ if err != nil {
+ return nil, err
+ }
+
+ // Encrypt the plaintext.
+ ciphertext, err := cipher.EncryptCbc(senderKey.Iv(), senderKey.CipherKey(), plaintext)
+ if err != nil {
+ return nil, err
+ }
+
+ senderKeyMessage := protocol.NewSenderKeyMessage(
+ senderKeyState.KeyID(),
+ senderKey.Iteration(),
+ ciphertext,
+ senderKeyState.SigningKey().PrivateKey(),
+ c.sessionBuilder.serializer.SenderKeyMessage,
+ )
+
+ senderKeyState.SetSenderChainKey(senderKeyState.SenderChainKey().Next())
+ c.senderKeyStore.StoreSenderKey(c.senderKeyID, keyRecord)
+
+ return senderKeyMessage, nil
+}
+
+// Decrypt decrypts the given message using an existing session that
+// is stored in the senderKey store.
+func (c *GroupCipher) Decrypt(senderKeyMessage *protocol.SenderKeyMessage) ([]byte, error) {
+ keyRecord := c.senderKeyStore.LoadSenderKey(c.senderKeyID)
+
+ if keyRecord.IsEmpty() {
+ return nil, fmt.Errorf("%w for %s in %s", signalerror.ErrNoSenderKeyForUser, c.senderKeyID.Sender().String(), c.senderKeyID.GroupID())
+ }
+
+ // Get the senderkey state by id.
+ senderKeyState, err := keyRecord.GetSenderKeyStateByID(senderKeyMessage.KeyID())
+ if err != nil {
+ return nil, err
+ }
+
+ // Verify the signature of the senderkey message.
+ verified := c.verifySignature(senderKeyState.SigningKey().PublicKey(), senderKeyMessage)
+ if !verified {
+ return nil, signalerror.ErrSenderKeyStateVerificationFailed
+ }
+
+ senderKey, err := c.getSenderKey(senderKeyState, senderKeyMessage.Iteration())
+ if err != nil {
+ return nil, err
+ }
+
+ // Decrypt the message ciphertext.
+ plaintext, err := cipher.DecryptCbc(senderKey.Iv(), senderKey.CipherKey(), senderKeyMessage.Ciphertext())
+ if err != nil {
+ return nil, err
+ }
+
+ // Store the sender key by id.
+ c.senderKeyStore.StoreSenderKey(c.senderKeyID, keyRecord)
+
+ return plaintext, nil
+}
+
+// verifySignature will verify the signature of the senderkey message with
+// the given public key.
+func (c *GroupCipher) verifySignature(signingPubKey ecc.ECPublicKeyable,
+ senderKeyMessage *protocol.SenderKeyMessage) bool {
+
+ return ecc.VerifySignature(signingPubKey, senderKeyMessage.Serialize(), senderKeyMessage.Signature())
+}
+
+func (c *GroupCipher) getSenderKey(senderKeyState *record.SenderKeyState, iteration uint32) (*ratchet.SenderMessageKey, error) {
+ senderChainKey := senderKeyState.SenderChainKey()
+ if senderChainKey.Iteration() > iteration {
+ if senderKeyState.HasSenderMessageKey(iteration) {
+ return senderKeyState.RemoveSenderMessageKey(iteration), nil
+ }
+ return nil, fmt.Errorf("%w (current: %d, received: %d)", signalerror.ErrOldCounter, senderChainKey.Iteration(), iteration)
+ }
+
+ if iteration-senderChainKey.Iteration() > 2000 {
+ return nil, signalerror.ErrTooFarIntoFuture
+ }
+
+ for senderChainKey.Iteration() < iteration {
+ senderMessageKey, err := senderChainKey.SenderMessageKey()
+ if err != nil {
+ return nil, err
+ }
+ senderKeyState.AddSenderMessageKey(senderMessageKey)
+ senderChainKey = senderChainKey.Next()
+ }
+
+ senderKeyState.SetSenderChainKey(senderChainKey.Next())
+ return senderChainKey.SenderMessageKey()
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go b/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go
new file mode 100644
index 00000000..2a5569b7
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go
@@ -0,0 +1,84 @@
+// Package groups is responsible for setting up group SenderKey encrypted sessions.
+// Once a session has been established, GroupCipher can be used to encrypt/decrypt
+// messages in that session.
+//
+// The built sessions are unidirectional: they can be used either for sending or
+// for receiving, but not both. Sessions are constructed per (groupId + senderId +
+// deviceId) tuple. Remote logical users are identified by their senderId, and each
+// logical recipientId can have multiple physical devices.
+package groups
+
+import (
+ "go.mau.fi/libsignal/groups/state/record"
+ "go.mau.fi/libsignal/groups/state/store"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/serialize"
+ "go.mau.fi/libsignal/util/keyhelper"
+)
+
+// NewGroupSessionBuilder will return a new group session builder.
+func NewGroupSessionBuilder(senderKeyStore store.SenderKey,
+ serializer *serialize.Serializer) *SessionBuilder {
+
+ return &SessionBuilder{
+ senderKeyStore: senderKeyStore,
+ serializer: serializer,
+ }
+}
+
+// SessionBuilder is a structure for building group sessions.
+type SessionBuilder struct {
+ senderKeyStore store.SenderKey
+ serializer *serialize.Serializer
+}
+
+// Process will process an incoming group message and set up the corresponding
+// session for it.
+func (b *SessionBuilder) Process(senderKeyName *protocol.SenderKeyName,
+ msg *protocol.SenderKeyDistributionMessage) {
+
+ senderKeyRecord := b.senderKeyStore.LoadSenderKey(senderKeyName)
+ if senderKeyRecord == nil {
+ senderKeyRecord = record.NewSenderKey(b.serializer.SenderKeyRecord, b.serializer.SenderKeyState)
+ }
+ senderKeyRecord.AddSenderKeyState(msg.ID(), msg.Iteration(), msg.ChainKey(), msg.SignatureKey())
+ b.senderKeyStore.StoreSenderKey(senderKeyName, senderKeyRecord)
+}
+
+// Create will create a new group session for the given name.
+func (b *SessionBuilder) Create(senderKeyName *protocol.SenderKeyName) (*protocol.SenderKeyDistributionMessage, error) {
+ // Load the senderkey by name
+ senderKeyRecord := b.senderKeyStore.LoadSenderKey(senderKeyName)
+
+ // If the record is empty, generate new keys.
+ if senderKeyRecord == nil || senderKeyRecord.IsEmpty() {
+ senderKeyRecord = record.NewSenderKey(b.serializer.SenderKeyRecord, b.serializer.SenderKeyState)
+ signingKey, err := keyhelper.GenerateSenderSigningKey()
+ if err != nil {
+ return nil, err
+ }
+ senderKeyRecord.SetSenderKeyState(
+ keyhelper.GenerateSenderKeyID(), 0,
+ keyhelper.GenerateSenderKey(),
+ signingKey,
+ )
+ b.senderKeyStore.StoreSenderKey(senderKeyName, senderKeyRecord)
+ }
+
+ // Get the senderkey state.
+ state, err := senderKeyRecord.SenderKeyState()
+ if err != nil {
+ return nil, err
+ }
+
+ // Create the group message to return.
+ senderKeyDistributionMessage := protocol.NewSenderKeyDistributionMessage(
+ state.KeyID(),
+ state.SenderChainKey().Iteration(),
+ state.SenderChainKey().Seed(),
+ state.SigningKey().PublicKey(),
+ b.serializer.SenderKeyDistributionMessage,
+ )
+
+ return senderKeyDistributionMessage, nil
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/ratchet/Doc.go b/vendor/go.mau.fi/libsignal/groups/ratchet/Doc.go
new file mode 100644
index 00000000..6d374465
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/ratchet/Doc.go
@@ -0,0 +1,3 @@
+// Package ratchet provides the methods necessary to establish a ratchet
+// session for group messaging.
+package ratchet
diff --git a/vendor/go.mau.fi/libsignal/groups/ratchet/SenderChainKey.go b/vendor/go.mau.fi/libsignal/groups/ratchet/SenderChainKey.go
new file mode 100644
index 00000000..a9530143
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/ratchet/SenderChainKey.go
@@ -0,0 +1,68 @@
+package ratchet
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+)
+
+var messageKeySeed = []byte{0x01}
+var chainKeySeed = []byte{0x02}
+
+// NewSenderChainKey will return a new SenderChainKey.
+func NewSenderChainKey(iteration uint32, chainKey []byte) *SenderChainKey {
+ return &SenderChainKey{
+ iteration: iteration,
+ chainKey: chainKey,
+ }
+}
+
+// NewSenderChainKeyFromStruct will return a new chain key object from the
+// given serializeable structure.
+func NewSenderChainKeyFromStruct(structure *SenderChainKeyStructure) *SenderChainKey {
+ return &SenderChainKey{
+ iteration: structure.Iteration,
+ chainKey: structure.ChainKey,
+ }
+}
+
+// NewStructFromSenderChainKeys returns a serializeable structure of chain keys.
+func NewStructFromSenderChainKey(key *SenderChainKey) *SenderChainKeyStructure {
+ return &SenderChainKeyStructure{
+ Iteration: key.iteration,
+ ChainKey: key.chainKey,
+ }
+}
+
+// SenderChainKeyStructure is a serializeable structure of SenderChainKeys.
+type SenderChainKeyStructure struct {
+ Iteration uint32
+ ChainKey []byte
+}
+
+type SenderChainKey struct {
+ iteration uint32
+ chainKey []byte
+}
+
+func (k *SenderChainKey) Iteration() uint32 {
+ return k.iteration
+}
+
+func (k *SenderChainKey) SenderMessageKey() (*SenderMessageKey, error) {
+ return NewSenderMessageKey(k.iteration, k.getDerivative(messageKeySeed, k.chainKey))
+}
+
+func (k *SenderChainKey) Next() *SenderChainKey {
+ return NewSenderChainKey(k.iteration+1, k.getDerivative(chainKeySeed, k.chainKey))
+}
+
+func (k *SenderChainKey) Seed() []byte {
+ return k.chainKey
+}
+
+func (k *SenderChainKey) getDerivative(seed []byte, key []byte) []byte {
+ mac := hmac.New(sha256.New, key[:])
+ mac.Write(seed)
+
+ return mac.Sum(nil)
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/ratchet/SenderMessageKey.go b/vendor/go.mau.fi/libsignal/groups/ratchet/SenderMessageKey.go
new file mode 100644
index 00000000..724059f2
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/ratchet/SenderMessageKey.go
@@ -0,0 +1,89 @@
+package ratchet
+
+import (
+ "go.mau.fi/libsignal/kdf"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+// KdfInfo is optional bytes to include in deriving secrets with KDF.
+const KdfInfo string = "WhisperGroup"
+
+// NewSenderMessageKey will return a new sender message key using the given
+// iteration and seed.
+func NewSenderMessageKey(iteration uint32, seed []byte) (*SenderMessageKey, error) {
+ derivative, err := kdf.DeriveSecrets(seed, nil, []byte(KdfInfo), 48)
+ if err != nil {
+ return nil, err
+ }
+
+ // Split our derived secrets into 2 parts
+ parts := bytehelper.Split(derivative, 16, 32)
+
+ // Build the message key.
+ senderKeyMessage := &SenderMessageKey{
+ iteration: iteration,
+ seed: seed,
+ iv: parts[0],
+ cipherKey: parts[1],
+ }
+
+ return senderKeyMessage, nil
+}
+
+// NewSenderMessageKeyFromStruct will return a new message key object from the
+// given serializeable structure.
+func NewSenderMessageKeyFromStruct(structure *SenderMessageKeyStructure) *SenderMessageKey {
+ return &SenderMessageKey{
+ iteration: structure.Iteration,
+ iv: structure.IV,
+ cipherKey: structure.CipherKey,
+ seed: structure.Seed,
+ }
+}
+
+// NewStructFromSenderMessageKey returns a serializeable structure of message keys.
+func NewStructFromSenderMessageKey(key *SenderMessageKey) *SenderMessageKeyStructure {
+ return &SenderMessageKeyStructure{
+ CipherKey: key.cipherKey,
+ Iteration: key.iteration,
+ IV: key.iv,
+ Seed: key.seed,
+ }
+}
+
+// SenderMessageKeyStructure is a serializeable structure of SenderMessageKeys.
+type SenderMessageKeyStructure struct {
+ Iteration uint32
+ IV []byte
+ CipherKey []byte
+ Seed []byte
+}
+
+// SenderMessageKey is a structure for sender message keys used in group
+// messaging.
+type SenderMessageKey struct {
+ iteration uint32
+ iv []byte
+ cipherKey []byte
+ seed []byte
+}
+
+// Iteration will return the sender message key's iteration.
+func (k *SenderMessageKey) Iteration() uint32 {
+ return k.iteration
+}
+
+// Iv will return the sender message key's initialization vector.
+func (k *SenderMessageKey) Iv() []byte {
+ return k.iv
+}
+
+// CipherKey will return the key in bytes.
+func (k *SenderMessageKey) CipherKey() []byte {
+ return k.cipherKey
+}
+
+// Seed will return the sender message key's seed.
+func (k *SenderMessageKey) Seed() []byte {
+ return k.seed
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/state/record/Doc.go b/vendor/go.mau.fi/libsignal/groups/state/record/Doc.go
new file mode 100644
index 00000000..5a7d7307
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/state/record/Doc.go
@@ -0,0 +1,2 @@
+// Package record provides the state and record of a group session.
+package record
diff --git a/vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyRecord.go b/vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyRecord.go
new file mode 100644
index 00000000..64d59068
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyRecord.go
@@ -0,0 +1,149 @@
+package record
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/signalerror"
+)
+
+const maxStates = 5
+
+// SenderKeySerializer is an interface for serializing and deserializing
+// SenderKey objects into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SenderKeySerializer interface {
+ Serialize(preKey *SenderKeyStructure) []byte
+ Deserialize(serialized []byte) (*SenderKeyStructure, error)
+}
+
+// NewSenderKeyFromBytes will return a prekey record from the given bytes using the given serializer.
+func NewSenderKeyFromBytes(serialized []byte, serializer SenderKeySerializer,
+ stateSerializer SenderKeyStateSerializer) (*SenderKey, error) {
+
+ // Use the given serializer to decode the senderkey record
+ senderKeyStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSenderKeyFromStruct(senderKeyStructure, serializer, stateSerializer)
+}
+
+// NewSenderKeyFromStruct returns a SenderKey record using the given serializable structure.
+func NewSenderKeyFromStruct(structure *SenderKeyStructure, serializer SenderKeySerializer,
+ stateSerializer SenderKeyStateSerializer) (*SenderKey, error) {
+
+ // Build our sender key states from structure.
+ senderKeyStates := make([]*SenderKeyState, len(structure.SenderKeyStates))
+ for i := range structure.SenderKeyStates {
+ var err error
+ senderKeyStates[i], err = NewSenderKeyStateFromStructure(structure.SenderKeyStates[i], stateSerializer)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Build and return our session.
+ senderKey := &SenderKey{
+ senderKeyStates: senderKeyStates,
+ serializer: serializer,
+ }
+
+ return senderKey, nil
+
+}
+
+// NewSenderKey record returns a new sender key record that can
+// be stored in a SenderKeyStore.
+func NewSenderKey(serializer SenderKeySerializer,
+ stateSerializer SenderKeyStateSerializer) *SenderKey {
+
+ return &SenderKey{
+ senderKeyStates: []*SenderKeyState{},
+ serializer: serializer,
+ stateSerializer: stateSerializer,
+ }
+}
+
+// SenderKeyStructure is a structure for serializing SenderKey records.
+type SenderKeyStructure struct {
+ SenderKeyStates []*SenderKeyStateStructure
+}
+
+// SenderKey record is a structure for storing pre keys inside
+// a SenderKeyStore.
+type SenderKey struct {
+ senderKeyStates []*SenderKeyState
+ serializer SenderKeySerializer
+ stateSerializer SenderKeyStateSerializer
+}
+
+// SenderKeyState will return the first sender key state in the record's
+// list of sender key states.
+func (k *SenderKey) SenderKeyState() (*SenderKeyState, error) {
+ if len(k.senderKeyStates) > 0 {
+ return k.senderKeyStates[0], nil
+ }
+ return nil, signalerror.ErrNoSenderKeyStatesInRecord
+}
+
+// GetSenderKeyStateByID will return the sender key state with the given
+// key id.
+func (k *SenderKey) GetSenderKeyStateByID(keyID uint32) (*SenderKeyState, error) {
+ for i := 0; i < len(k.senderKeyStates); i++ {
+ if k.senderKeyStates[i].KeyID() == keyID {
+ return k.senderKeyStates[i], nil
+ }
+ }
+
+ return nil, fmt.Errorf("%w %d", signalerror.ErrNoSenderKeyStateForID, keyID)
+}
+
+// IsEmpty will return false if there is more than one state in this
+// senderkey record.
+func (k *SenderKey) IsEmpty() bool {
+ return len(k.senderKeyStates) == 0
+}
+
+// AddSenderKeyState will add a new state to this senderkey record with the given
+// id, iteration, chainkey, and signature key.
+func (k *SenderKey) AddSenderKeyState(id uint32, iteration uint32,
+ chainKey []byte, signatureKey ecc.ECPublicKeyable) {
+
+ newState := NewSenderKeyStateFromPublicKey(id, iteration, chainKey, signatureKey, k.stateSerializer)
+ k.senderKeyStates = append([]*SenderKeyState{newState}, k.senderKeyStates...)
+
+ if len(k.senderKeyStates) > maxStates {
+ k.senderKeyStates = k.senderKeyStates[:len(k.senderKeyStates)-1]
+ }
+}
+
+// SetSenderKeyState will replace the current senderkey states with the given
+// senderkey state.
+func (k *SenderKey) SetSenderKeyState(id uint32, iteration uint32,
+ chainKey []byte, signatureKey *ecc.ECKeyPair) {
+
+ newState := NewSenderKeyState(id, iteration, chainKey, signatureKey, k.stateSerializer)
+ k.senderKeyStates = make([]*SenderKeyState, 0, maxStates/2)
+ k.senderKeyStates = append(k.senderKeyStates, newState)
+}
+
+// Serialize will return the record as serialized bytes so it can be
+// persistently stored.
+func (k *SenderKey) Serialize() []byte {
+ return k.serializer.Serialize(k.Structure())
+}
+
+// Structure will return a simple serializable record structure.
+// This is used for serialization to persistently
+// store a session record.
+func (k *SenderKey) Structure() *SenderKeyStructure {
+ senderKeyStates := make([]*SenderKeyStateStructure, len(k.senderKeyStates))
+ for i := range k.senderKeyStates {
+ senderKeyStates[i] = k.senderKeyStates[i].structure()
+ }
+ return &SenderKeyStructure{
+ SenderKeyStates: senderKeyStates,
+ }
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyState.go b/vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyState.go
new file mode 100644
index 00000000..e3187c30
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/state/record/SenderKeyState.go
@@ -0,0 +1,186 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/groups/ratchet"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+const maxMessageKeys = 2000
+
+// SenderKeyStateSerializer is an interface for serializing and deserializing
+// a Signal State into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SenderKeyStateSerializer interface {
+ Serialize(state *SenderKeyStateStructure) []byte
+ Deserialize(serialized []byte) (*SenderKeyStateStructure, error)
+}
+
+// NewSenderKeyStateFromBytes will return a Signal State from the given
+// bytes using the given serializer.
+func NewSenderKeyStateFromBytes(serialized []byte, serializer SenderKeyStateSerializer) (*SenderKeyState, error) {
+ // Use the given serializer to decode the signal message.
+ stateStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSenderKeyStateFromStructure(stateStructure, serializer)
+}
+
+// NewSenderKeyState returns a new SenderKeyState.
+func NewSenderKeyState(keyID uint32, iteration uint32, chainKey []byte,
+ signatureKey *ecc.ECKeyPair, serializer SenderKeyStateSerializer) *SenderKeyState {
+
+ return &SenderKeyState{
+ keys: make([]*ratchet.SenderMessageKey, 0, maxMessageKeys/2),
+ keyID: keyID,
+ senderChainKey: ratchet.NewSenderChainKey(iteration, chainKey),
+ signingKeyPair: signatureKey,
+ serializer: serializer,
+ }
+}
+
+// NewSenderKeyStateFromPublicKey returns a new SenderKeyState with the given publicKey.
+func NewSenderKeyStateFromPublicKey(keyID uint32, iteration uint32, chainKey []byte,
+ signatureKey ecc.ECPublicKeyable, serializer SenderKeyStateSerializer) *SenderKeyState {
+
+ keyPair := ecc.NewECKeyPair(signatureKey, nil)
+
+ return &SenderKeyState{
+ keys: make([]*ratchet.SenderMessageKey, 0, maxMessageKeys/2),
+ keyID: keyID,
+ senderChainKey: ratchet.NewSenderChainKey(iteration, chainKey),
+ signingKeyPair: keyPair,
+ serializer: serializer,
+ }
+}
+
+// NewSenderKeyStateFromStructure will return a new session state with the
+// given state structure. This structure is given back from an
+// implementation of the sender key state serializer.
+func NewSenderKeyStateFromStructure(structure *SenderKeyStateStructure,
+ serializer SenderKeyStateSerializer) (*SenderKeyState, error) {
+
+ // Convert our ecc keys from bytes into object form.
+ signingKeyPublic, err := ecc.DecodePoint(structure.SigningKeyPublic, 0)
+ if err != nil {
+ return nil, err
+ }
+ signingKeyPrivate := ecc.NewDjbECPrivateKey(bytehelper.SliceToArray(structure.SigningKeyPrivate))
+
+ // Build our sender message keys from structure
+ senderMessageKeys := make([]*ratchet.SenderMessageKey, len(structure.Keys))
+ for i := range structure.Keys {
+ senderMessageKeys[i] = ratchet.NewSenderMessageKeyFromStruct(structure.Keys[i])
+ }
+
+ // Build our state object.
+ state := &SenderKeyState{
+ keys: senderMessageKeys,
+ keyID: structure.KeyID,
+ senderChainKey: ratchet.NewSenderChainKeyFromStruct(structure.SenderChainKey),
+ signingKeyPair: ecc.NewECKeyPair(signingKeyPublic, signingKeyPrivate),
+ serializer: serializer,
+ }
+
+ return state, nil
+}
+
+// SenderKeyStateStructure is a serializeable structure of SenderKeyState.
+type SenderKeyStateStructure struct {
+ Keys []*ratchet.SenderMessageKeyStructure
+ KeyID uint32
+ SenderChainKey *ratchet.SenderChainKeyStructure
+ SigningKeyPrivate []byte
+ SigningKeyPublic []byte
+}
+
+// SenderKeyState is a structure for maintaining a senderkey session state.
+type SenderKeyState struct {
+ keys []*ratchet.SenderMessageKey
+ keyID uint32
+ senderChainKey *ratchet.SenderChainKey
+ signingKeyPair *ecc.ECKeyPair
+ serializer SenderKeyStateSerializer
+}
+
+// SigningKey returns the signing key pair of the sender key state.
+func (k *SenderKeyState) SigningKey() *ecc.ECKeyPair {
+ return k.signingKeyPair
+}
+
+// SenderChainKey returns the sender chain key of the state.
+func (k *SenderKeyState) SenderChainKey() *ratchet.SenderChainKey {
+ return k.senderChainKey
+}
+
+// KeyID returns the state's key id.
+func (k *SenderKeyState) KeyID() uint32 {
+ return k.keyID
+}
+
+// HasSenderMessageKey will return true if the state has a key with the
+// given iteration.
+func (k *SenderKeyState) HasSenderMessageKey(iteration uint32) bool {
+ for i := 0; i < len(k.keys); i++ {
+ if k.keys[i].Iteration() == iteration {
+ return true
+ }
+ }
+ return false
+}
+
+// AddSenderMessageKey will add the given sender message key to the state.
+func (k *SenderKeyState) AddSenderMessageKey(senderMsgKey *ratchet.SenderMessageKey) {
+ k.keys = append(k.keys, senderMsgKey)
+
+ if len(k.keys) > maxMessageKeys {
+ k.keys = k.keys[1:]
+ }
+}
+
+// SetSenderChainKey will set the state's sender chain key with the given key.
+func (k *SenderKeyState) SetSenderChainKey(senderChainKey *ratchet.SenderChainKey) {
+ k.senderChainKey = senderChainKey
+}
+
+// RemoveSenderMessageKey will remove the key in this state with the given iteration number.
+func (k *SenderKeyState) RemoveSenderMessageKey(iteration uint32) *ratchet.SenderMessageKey {
+ for i := 0; i < len(k.keys); i++ {
+ if k.keys[i].Iteration() == iteration {
+ removed := k.keys[i]
+ k.keys = append(k.keys[0:i], k.keys[i+1:]...)
+ return removed
+ }
+ }
+
+ return nil
+}
+
+// Serialize will return the state as bytes using the given serializer.
+func (k *SenderKeyState) Serialize() []byte {
+ return k.serializer.Serialize(k.structure())
+}
+
+// structure will return a serializable structure of the
+// the given state so it can be persistently stored.
+func (k *SenderKeyState) structure() *SenderKeyStateStructure {
+ // Convert our sender message keys into a serializeable structure
+ keys := make([]*ratchet.SenderMessageKeyStructure, len(k.keys))
+ for i := range k.keys {
+ keys[i] = ratchet.NewStructFromSenderMessageKey(k.keys[i])
+ }
+
+ // Build and return our state structure.
+ s := &SenderKeyStateStructure{
+ Keys: keys,
+ KeyID: k.keyID,
+ SenderChainKey: ratchet.NewStructFromSenderChainKey(k.senderChainKey),
+ SigningKeyPublic: k.signingKeyPair.PublicKey().Serialize(),
+ }
+ if k.signingKeyPair.PrivateKey() != nil {
+ s.SigningKeyPrivate = bytehelper.ArrayToSlice(k.signingKeyPair.PrivateKey().Serialize())
+ }
+ return s
+}
diff --git a/vendor/go.mau.fi/libsignal/groups/state/store/Doc.go b/vendor/go.mau.fi/libsignal/groups/state/store/Doc.go
new file mode 100644
index 00000000..8a23b446
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/state/store/Doc.go
@@ -0,0 +1,3 @@
+// Package store provides the storage interfaces for storing group sender
+// key records.
+package store
diff --git a/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go b/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go
new file mode 100644
index 00000000..a068df7c
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go
@@ -0,0 +1,11 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/groups/state/record"
+ "go.mau.fi/libsignal/protocol"
+)
+
+type SenderKey interface {
+ StoreSenderKey(senderKeyName *protocol.SenderKeyName, keyRecord *record.SenderKey)
+ LoadSenderKey(senderKeyName *protocol.SenderKeyName) *record.SenderKey
+}
diff --git a/vendor/go.mau.fi/libsignal/kdf/HKDF.go b/vendor/go.mau.fi/libsignal/kdf/HKDF.go
new file mode 100644
index 00000000..168b18ac
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/kdf/HKDF.go
@@ -0,0 +1,47 @@
+// Package kdf provides a key derivation function to calculate key output
+// and negotiate shared secrets for curve X25519 keys.
+package kdf
+
+import (
+ "crypto/sha256"
+ "io"
+
+ "golang.org/x/crypto/curve25519"
+ "golang.org/x/crypto/hkdf"
+)
+
+// HKDF is a hashed key derivation function type that can be used to derive keys.
+type HKDF func(inputKeyMaterial, salt, info []byte, outputLength int) ([]byte, error)
+
+// DeriveSecrets derives the requested number of bytes using HKDF with the given
+// input, salt, and info.
+func DeriveSecrets(inputKeyMaterial, salt, info []byte, outputLength int) ([]byte, error) {
+ kdf := hkdf.New(sha256.New, inputKeyMaterial, salt, info)
+
+ secrets := make([]byte, outputLength)
+ length, err := io.ReadFull(kdf, secrets)
+ if err != nil {
+ return nil, err
+ }
+ if length != outputLength {
+ return nil, err
+ }
+
+ return secrets, nil
+}
+
+// CalculateSharedSecret uses DH Curve25519 to find a shared secret. The result of this function
+// should be used in `DeriveSecrets` to output the Root and Chain keys.
+func CalculateSharedSecret(theirKey, ourKey [32]byte) [32]byte {
+ var sharedSecret [32]byte
+ curve25519.ScalarMult(&sharedSecret, &ourKey, &theirKey)
+
+ return sharedSecret
+}
+
+// KeyMaterial is a structure for representing a cipherkey, mac, and iv
+type KeyMaterial struct {
+ CipherKey []byte
+ MacKey []byte
+ IV []byte
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go b/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go
new file mode 100644
index 00000000..0a5125df
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go
@@ -0,0 +1,127 @@
+// Package chain provides chain keys used in double ratchet sessions.
+package chain
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+ "go.mau.fi/libsignal/kdf"
+ "go.mau.fi/libsignal/keys/message"
+)
+
+var messageKeySeed = []byte{0x01}
+var chainKeySeed = []byte{0x02}
+
+// NewKey returns a new chain key with the given kdf, key, and index
+func NewKey(kdf kdf.HKDF, key []byte, index uint32) *Key {
+ chainKey := Key{
+ kdf: kdf,
+ key: key,
+ index: index,
+ }
+
+ return &chainKey
+}
+
+// NewKeyFromStruct will return a chain key built from the given structure.
+func NewKeyFromStruct(structure *KeyStructure, kdf kdf.HKDF) *Key {
+ return NewKey(
+ kdf,
+ structure.Key,
+ structure.Index,
+ )
+}
+
+// NewStructFromKey will return a chain key structure for serialization.
+func NewStructFromKey(key *Key) *KeyStructure {
+ return &KeyStructure{
+ Key: key.key,
+ Index: key.index,
+ }
+}
+
+// KeyStructure is a serializeable structure for chain keys.
+type KeyStructure struct {
+ Key []byte
+ Index uint32
+}
+
+// Key is used for generating message keys. This key "ratchets" every time a
+// message key is generated. Every time the chain key ratchets forward, its index
+// increases by one.
+type Key struct {
+ kdf kdf.HKDF
+ key []byte
+ index uint32 // Index's maximum size: 4,294,967,295
+}
+
+// Current returns the current ChainKey struct.
+func (c *Key) Current() *Key {
+ return c
+}
+
+// Key returns the ChainKey's key material.
+func (c *Key) Key() []byte {
+ return c.key
+}
+
+// SetKey will set the ChainKey's key material.
+func (c *Key) SetKey(key []byte) {
+ c.key = key
+}
+
+// Index returns how many times the ChainKey has been "ratcheted" forward.
+func (c *Key) Index() uint32 {
+ return c.index
+}
+
+// SetIndex sets how many times the ChainKey has been "ratcheted" forward.
+func (c *Key) SetIndex(index uint32) {
+ c.index = index
+}
+
+// NextKey uses the key derivation function to generate a new ChainKey.
+func (c *Key) NextKey() *Key {
+ nextKey := c.BaseMaterial(chainKeySeed)
+ return NewKey(c.kdf, nextKey, c.index+1)
+}
+
+// MessageKeys returns message keys, which includes the cipherkey, mac, iv, and index.
+func (c *Key) MessageKeys() *message.Keys {
+ inputKeyMaterial := c.BaseMaterial(messageKeySeed)
+ keyMaterialBytes, _ := c.kdf(inputKeyMaterial, nil, []byte(message.KdfSalt), message.DerivedSecretsSize)
+ keyMaterial := newKeyMaterial(keyMaterialBytes)
+
+ // Use the key material returned from the key derivation function for our cipherkey, mac, and iv.
+ messageKeys := message.NewKeys(
+ keyMaterial.CipherKey, // Use the first 32 bytes of the key material for the CipherKey
+ keyMaterial.MacKey, // Use bytes 32-64 of the key material for the MacKey
+ keyMaterial.IV, // Use the last 16 bytes for the IV.
+ c.Index(), // Attach the chain key's index to the message keys.
+ )
+
+ return messageKeys
+}
+
+// BaseMaterial uses hmac to derive the base material used in the key derivation function for a new key.
+func (c *Key) BaseMaterial(seed []byte) []byte {
+ mac := hmac.New(sha256.New, c.key[:])
+ mac.Write(seed)
+
+ return mac.Sum(nil)
+}
+
+// NewKeyMaterial takes an 80-byte slice derived from a key derivation function and splits
+// it into the cipherkey, mac, and iv.
+func newKeyMaterial(keyMaterialBytes []byte) *kdf.KeyMaterial {
+ cipherKey := keyMaterialBytes[:32] // Use the first 32 bytes of the key material for the CipherKey
+ macKey := keyMaterialBytes[32:64] // Use bytes 32-64 of the key material for the MacKey
+ iv := keyMaterialBytes[64:80] // Use the last 16 bytes for the IV.
+
+ keyMaterial := kdf.KeyMaterial{
+ CipherKey: cipherKey,
+ MacKey: macKey,
+ IV: iv,
+ }
+
+ return &keyMaterial
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go b/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go
new file mode 100644
index 00000000..127dbe16
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go
@@ -0,0 +1,47 @@
+// Package identity provides identity keys used for verifying the identity
+// of a signal user.
+package identity
+
+import (
+ "encoding/hex"
+ "go.mau.fi/libsignal/ecc"
+)
+
+// NewKey generates a new IdentityKey from an ECPublicKey
+func NewKey(publicKey ecc.ECPublicKeyable) *Key {
+ identityKey := Key{
+ publicKey: publicKey,
+ }
+
+ return &identityKey
+}
+
+// NewKeyFromBytes generates a new IdentityKey from public key bytes
+func NewKeyFromBytes(publicKey [32]byte, offset int) Key {
+ identityKey := Key{
+ publicKey: ecc.NewDjbECPublicKey(publicKey),
+ }
+
+ return identityKey
+}
+
+// Key is a structure for representing an identity key. This same structure can
+// be used for verifying recipient's identity key or storing our own identity key.
+type Key struct {
+ publicKey ecc.ECPublicKeyable
+}
+
+// Fingerprint gets the string fingerprint representation of the public key.
+func (k *Key) Fingerprint() string {
+ return hex.EncodeToString(k.publicKey.Serialize())
+}
+
+// PublicKey returns the EC Public key of the identity key
+func (k *Key) PublicKey() ecc.ECPublicKeyable {
+ return k.publicKey
+}
+
+// Serialize returns the serialized version of the key
+func (k *Key) Serialize() []byte {
+ return k.publicKey.Serialize()
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/identity/IdentityKeyPair.go b/vendor/go.mau.fi/libsignal/keys/identity/IdentityKeyPair.go
new file mode 100644
index 00000000..1d401118
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/identity/IdentityKeyPair.go
@@ -0,0 +1,39 @@
+package identity
+
+import (
+ "go.mau.fi/libsignal/ecc"
+)
+
+// NewKeyPair returns a new identity key with the given public and private keys.
+func NewKeyPair(publicKey *Key, privateKey ecc.ECPrivateKeyable) *KeyPair {
+ keyPair := KeyPair{
+ publicKey: publicKey,
+ privateKey: privateKey,
+ }
+
+ return &keyPair
+}
+
+// NewKeyPairFromBytes returns a new identity key from the given serialized bytes.
+//func NewKeyPairFromBytes(serialized []byte) KeyPair {
+//}
+
+// KeyPair is a holder for public and private identity key pair.
+type KeyPair struct {
+ publicKey *Key
+ privateKey ecc.ECPrivateKeyable
+}
+
+// PublicKey returns the identity key's public key.
+func (k *KeyPair) PublicKey() *Key {
+ return k.publicKey
+}
+
+// PrivateKey returns the identity key's private key.
+func (k *KeyPair) PrivateKey() ecc.ECPrivateKeyable {
+ return k.privateKey
+}
+
+// Serialize returns a byte array that represents the keypair.
+//func (k *KeyPair) Serialize() []byte {
+//}
diff --git a/vendor/go.mau.fi/libsignal/keys/message/MessageKey.go b/vendor/go.mau.fi/libsignal/keys/message/MessageKey.go
new file mode 100644
index 00000000..4eadffbe
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/message/MessageKey.go
@@ -0,0 +1,91 @@
+// Package message provides a structure for message keys, which are symmetric
+// keys used for the encryption/decryption of Signal messages.
+package message
+
+// DerivedSecretsSize is the size of the derived secrets for message keys.
+const DerivedSecretsSize = 80
+
+// CipherKeyLength is the length of the actual cipher key used for messages.
+const CipherKeyLength = 32
+
+// MacKeyLength is the length of the message authentication code in bytes.
+const MacKeyLength = 32
+
+// IVLength is the length of the initialization vector in bytes.
+const IVLength = 16
+
+// KdfSalt is used as the Salt for message keys to derive secrets using a Key Derivation Function
+const KdfSalt string = "WhisperMessageKeys"
+
+// NewKeys returns a new message keys structure with the given cipherKey, mac, iv, and index.
+func NewKeys(cipherKey, macKey, iv []byte, index uint32) *Keys {
+ messageKeys := Keys{
+ cipherKey: cipherKey,
+ macKey: macKey,
+ iv: iv,
+ index: index,
+ }
+
+ return &messageKeys
+}
+
+// NewKeysFromStruct will return a new message keys object from the
+// given serializeable structure.
+func NewKeysFromStruct(structure *KeysStructure) *Keys {
+ return NewKeys(
+ structure.CipherKey,
+ structure.MacKey,
+ structure.IV,
+ structure.Index,
+ )
+}
+
+// NewStructFromKeys returns a serializeable structure of message keys.
+func NewStructFromKeys(keys *Keys) *KeysStructure {
+ return &KeysStructure{
+ CipherKey: keys.cipherKey,
+ MacKey: keys.macKey,
+ IV: keys.iv,
+ Index: keys.index,
+ }
+}
+
+// KeysStructure is a serializeable structure of message keys.
+type KeysStructure struct {
+ CipherKey []byte
+ MacKey []byte
+ IV []byte
+ Index uint32
+}
+
+// Keys is a structure to hold all the keys for a single MessageKey, including the
+// cipherKey, mac, iv, and index of the chain key. MessageKeys are used to
+// encrypt individual messages.
+type Keys struct {
+ cipherKey []byte
+ macKey []byte
+ iv []byte
+ index uint32
+}
+
+// CipherKey is the key used to produce ciphertext.
+func (k *Keys) CipherKey() []byte {
+ return k.cipherKey
+}
+
+// MacKey returns the message's message authentication code.
+func (k *Keys) MacKey() []byte {
+ return k.macKey
+}
+
+// Iv returns the message keys' initialization vector. The IV is a fixed-size input
+// to a cryptographic primitive.
+func (k *Keys) Iv() []byte {
+ return k.iv
+}
+
+// Index returns the number of times the chain key has been put through a key derivation
+// function to generate this message key.
+func (k *Keys) Index() uint32 {
+ return k.index
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/prekey/PreKeyBundle.go b/vendor/go.mau.fi/libsignal/keys/prekey/PreKeyBundle.go
new file mode 100644
index 00000000..04471673
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/prekey/PreKeyBundle.go
@@ -0,0 +1,86 @@
+// Package prekey provides prekey bundle structures for calculating
+// a new Signal session with a user asyncronously.
+package prekey
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+// NewBundle returns a Bundle structure that contains a remote PreKey
+// and collection of associated items.
+func NewBundle(registrationID, deviceID uint32, preKeyID *optional.Uint32, signedPreKeyID uint32,
+ preKeyPublic, signedPreKeyPublic ecc.ECPublicKeyable, signedPreKeySig [64]byte,
+ identityKey *identity.Key) *Bundle {
+
+ bundle := Bundle{
+ registrationID: registrationID,
+ deviceID: deviceID,
+ preKeyID: preKeyID,
+ preKeyPublic: preKeyPublic,
+ signedPreKeyID: signedPreKeyID,
+ signedPreKeyPublic: signedPreKeyPublic,
+ signedPreKeySignature: signedPreKeySig,
+ identityKey: identityKey,
+ }
+
+ return &bundle
+}
+
+// Bundle is a structure that contains a remote PreKey and collection
+// of associated items.
+type Bundle struct {
+ registrationID uint32
+ deviceID uint32
+ preKeyID *optional.Uint32
+ preKeyPublic ecc.ECPublicKeyable
+ signedPreKeyID uint32
+ signedPreKeyPublic ecc.ECPublicKeyable
+ signedPreKeySignature [64]byte
+ identityKey *identity.Key
+}
+
+// DeviceID returns the device ID this PreKey belongs to.
+func (b *Bundle) DeviceID() uint32 {
+ return b.deviceID
+}
+
+// PreKeyID returns the unique key ID for this PreKey.
+func (b *Bundle) PreKeyID() *optional.Uint32 {
+ return b.preKeyID
+}
+
+// PreKey returns the public key for this PreKey.
+func (b *Bundle) PreKey() ecc.ECPublicKeyable {
+ return b.preKeyPublic
+}
+
+// SignedPreKeyID returns the unique key ID for this
+// signed PreKey.
+func (b *Bundle) SignedPreKeyID() uint32 {
+ return b.signedPreKeyID
+}
+
+// SignedPreKey returns the signed PreKey for this
+// PreKeyBundle.
+func (b *Bundle) SignedPreKey() ecc.ECPublicKeyable {
+ return b.signedPreKeyPublic
+}
+
+// SignedPreKeySignature returns the signature over the
+// signed PreKey.
+func (b *Bundle) SignedPreKeySignature() [64]byte {
+ return b.signedPreKeySignature
+}
+
+// IdentityKey returns the Identity Key of this PreKey's owner.
+func (b *Bundle) IdentityKey() *identity.Key {
+ return b.identityKey
+}
+
+// RegistrationID returns the registration ID associated with
+// this PreKey.
+func (b *Bundle) RegistrationID() uint32 {
+ return b.registrationID
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/root/RootKey.go b/vendor/go.mau.fi/libsignal/keys/root/RootKey.go
new file mode 100644
index 00000000..e925bc76
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/root/RootKey.go
@@ -0,0 +1,66 @@
+// Package root provides root keys which are used to derive new chain and
+// root keys in a ratcheting session.
+package root
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/kdf"
+ "go.mau.fi/libsignal/keys/chain"
+ "go.mau.fi/libsignal/keys/session"
+)
+
+// DerivedSecretsSize is the size of the derived secrets for root keys.
+const DerivedSecretsSize = 64
+
+// KdfInfo is used as the info for message keys to derive secrets using a Key Derivation Function
+const KdfInfo string = "WhisperRatchet"
+
+// NewKey returns a new RootKey given the key derivation function and bytes.
+func NewKey(kdf kdf.HKDF, key []byte) *Key {
+ rootKey := Key{
+ kdf: kdf,
+ key: key,
+ }
+
+ return &rootKey
+}
+
+// Key is a structure for RootKeys, which are used to derive a new set of chain and root
+// keys for every round trip of messages.
+type Key struct {
+ kdf kdf.HKDF
+ key []byte
+}
+
+// Bytes returns the RootKey in bytes.
+func (k *Key) Bytes() []byte {
+ return k.key
+}
+
+// CreateChain creates a new RootKey and ChainKey from the recipient's ratchet key and our private key.
+func (k *Key) CreateChain(theirRatchetKey ecc.ECPublicKeyable, ourRatchetKey *ecc.ECKeyPair) (*session.KeyPair, error) {
+ theirPublicKey := theirRatchetKey.PublicKey()
+ ourPrivateKey := ourRatchetKey.PrivateKey().Serialize()
+
+ // Use our key derivation function to calculate a shared secret.
+ sharedSecret := kdf.CalculateSharedSecret(theirPublicKey, ourPrivateKey)
+ derivedSecretBytes, err := kdf.DeriveSecrets(sharedSecret[:], k.key, []byte(KdfInfo), DerivedSecretsSize)
+ if err != nil {
+ return nil, err
+ }
+
+ // Split the derived secret bytes in half, using one half for the root key and the second for the chain key.
+ derivedSecrets := session.NewDerivedSecrets(derivedSecretBytes)
+
+ // Create new root and chain key structures from the derived secrets.
+ rootKey := NewKey(k.kdf, derivedSecrets.RootKey())
+ chainKey := chain.NewKey(k.kdf, derivedSecrets.ChainKey(), 0)
+
+ // Create a session keypair with the generated root and chain keys.
+ keyPair := session.NewKeyPair(
+ rootKey,
+ chainKey,
+ )
+
+ return keyPair, nil
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/session/DerivedSecrets.go b/vendor/go.mau.fi/libsignal/keys/session/DerivedSecrets.go
new file mode 100644
index 00000000..6d73cb45
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/session/DerivedSecrets.go
@@ -0,0 +1,29 @@
+package session
+
+// NewDerivedSecrets returns a new RootKey/ChainKey pair from 64 bytes of key material
+// generated by the key derivation function.
+func NewDerivedSecrets(keyMaterial []byte) *DerivedSecrets {
+ secrets := DerivedSecrets{
+ keyMaterial[:32],
+ keyMaterial[32:],
+ }
+
+ return &secrets
+}
+
+// DerivedSecrets is a structure for holding the derived secrets for the
+// Root and Chain keys for a session.
+type DerivedSecrets struct {
+ rootKey []byte
+ chainKey []byte
+}
+
+// RootKey returns the RootKey bytes.
+func (d *DerivedSecrets) RootKey() []byte {
+ return d.rootKey
+}
+
+// ChainKey returns the ChainKey bytes.
+func (d *DerivedSecrets) ChainKey() []byte {
+ return d.chainKey
+}
diff --git a/vendor/go.mau.fi/libsignal/keys/session/Pair.go b/vendor/go.mau.fi/libsignal/keys/session/Pair.go
new file mode 100644
index 00000000..f6387ba8
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/keys/session/Pair.go
@@ -0,0 +1,43 @@
+// Package session provides a simple structure for session keys, which is
+// a pair of root and chain keys for a session.
+package session
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/chain"
+ "go.mau.fi/libsignal/keys/message"
+)
+
+// RootKeyable is an interface for all root key implementations that are part of
+// a session keypair.
+type RootKeyable interface {
+ Bytes() []byte
+ CreateChain(theirRatchetKey ecc.ECPublicKeyable, ourRatchetKey *ecc.ECKeyPair) (*KeyPair, error)
+}
+
+// ChainKeyable is an interface for all chain key implementations that are part of
+// a session keypair.
+type ChainKeyable interface {
+ Key() []byte
+ Index() uint32
+ NextKey() *chain.Key
+ MessageKeys() *message.Keys
+ Current() *chain.Key
+}
+
+// NewKeyPair returns a new session key pair that holds a root and chain key.
+func NewKeyPair(rootKey RootKeyable, chainKey ChainKeyable) *KeyPair {
+ keyPair := KeyPair{
+ RootKey: rootKey,
+ ChainKey: chainKey,
+ }
+
+ return &keyPair
+}
+
+// KeyPair is a session key pair that holds a single root and chain key pair. These
+// keys are ratcheted after every message sent and every message round trip.
+type KeyPair struct {
+ RootKey RootKeyable
+ ChainKey ChainKeyable
+}
diff --git a/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go b/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go
new file mode 100644
index 00000000..62515bff
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go
@@ -0,0 +1,85 @@
+package logger
+
+import (
+ "fmt"
+ "strings"
+ "time"
+)
+
+// DefaultLogger is used if no logger has been set up.
+type defaultLogger struct {
+ namespaces []string
+}
+
+// log simply logs the given message to stdout if the message
+// caller is allowed to log.
+func (d *defaultLogger) log(level, caller, msg string) {
+ if !d.shouldLog(caller) {
+ // return
+ }
+ t := time.Now()
+ fmt.Println(
+ "["+level+"]",
+ t.Format(time.RFC3339),
+ caller,
+ "â–¶ ",
+ msg,
+ )
+}
+
+// shouldLog determines whether or not the given caller should
+// be allowed to log messages.
+func (d *defaultLogger) shouldLog(caller string) bool {
+ shouldLog := false
+ d.ensureNamespaces()
+ for _, namespace := range d.namespaces {
+ if namespace == "all" {
+ shouldLog = true
+ }
+ if strings.Contains(caller, namespace) {
+ shouldLog = true
+ }
+ }
+
+ return shouldLog
+}
+
+// ensureNamespaces checks to see if our list of loggable namespaces
+// has been initialized or not. If not, it defaults to log all.
+func (d *defaultLogger) ensureNamespaces() {
+ if d.namespaces == nil {
+ d.namespaces = []string{"all"}
+ }
+}
+
+// Debug is used to log debug messages.
+func (d *defaultLogger) Debug(caller, msg string) {
+ //d.log("DEBUG", caller, msg)
+}
+
+// Info is used to log info messages.
+func (d *defaultLogger) Info(caller, msg string) {
+ d.log("INFO", caller, msg)
+}
+
+// Warning is used to log warning messages.
+func (d *defaultLogger) Warning(caller, msg string) {
+ d.log("WARNING", caller, msg)
+}
+
+// Error is used to log error messages.
+func (d *defaultLogger) Error(caller, msg string) {
+ d.log("ERROR", caller, msg)
+}
+
+// Configure takes a configuration string separated by commas
+// that contains all the callers that should be logged. This
+// allows granular logging of different go files.
+//
+// Example:
+// logger.Configure("RootKey.go,Curve.go")
+// logger.Configure("all")
+//
+func (d *defaultLogger) Configure(settings string) {
+ d.namespaces = strings.Split(settings, ",")
+}
diff --git a/vendor/go.mau.fi/libsignal/logger/Logger.go b/vendor/go.mau.fi/libsignal/logger/Logger.go
new file mode 100644
index 00000000..653320bf
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/logger/Logger.go
@@ -0,0 +1,89 @@
+// Package logger provides optional debug logging of the Signal library.
+package logger
+
+import (
+ "fmt"
+ "runtime"
+ "strconv"
+ "strings"
+)
+
+// Logger is a shared loggable interface that this library will use for all log messages.
+var Logger Loggable
+
+// Loggable is an interface for logging.
+type Loggable interface {
+ Debug(caller, message string)
+ Info(caller, message string)
+ Warning(caller, message string)
+ Error(caller, message string)
+ Configure(settings string)
+}
+
+// Setup will configure the shared logger to use the provided logger.
+func Setup(logger *Loggable) {
+ Logger = *logger
+}
+
+// ToString converts an arbitrary number of objects to a string for use in a logger.
+func toString(a ...interface{}) string {
+ return fmt.Sprint(a...)
+}
+
+// EnsureLogger will use the default logger if one was not set up.
+func ensureLogger() {
+ if Logger == nil {
+ // fmt.Println("Error: No logger was configured. Use `logger.Setup` to configure a logger.")
+ Logger = &defaultLogger{}
+ }
+}
+
+// GetCaller gets the go file name and line number that the logger was called from.
+func getCaller() string {
+ var file string
+ _, path, line, _ := runtime.Caller(2)
+ paths := strings.Split(path, "/")
+ if len(paths) > 0 {
+ file = paths[len(paths)-1]
+ } else {
+ file = "<unkn>"
+ }
+
+ return file + ":" + strconv.Itoa(line)
+}
+
+/*
+ * Go methods used by the library for logging.
+ */
+
+// Debug prints debug level logs.
+func Debug(msg ...interface{}) {
+ ensureLogger()
+ Logger.Debug(getCaller(), toString(msg...))
+}
+
+// Info prints info level logs.
+func Info(msg ...interface{}) {
+ ensureLogger()
+ Logger.Info(getCaller(), toString(msg...))
+}
+
+// Warning prints warning level logs.
+func Warning(msg ...interface{}) {
+ ensureLogger()
+ Logger.Warning(getCaller(), toString(msg...))
+}
+
+// Error prints error level logs.
+func Error(msg ...interface{}) {
+ ensureLogger()
+ Logger.Error(getCaller(), toString(msg...))
+}
+
+// Configure allows arbitrary logger configuration settings. The
+// default logger uses this method to configure what Go files
+// are allowed to log.
+func Configure(settings string) {
+ ensureLogger()
+ Logger.Configure(settings)
+}
diff --git a/vendor/go.mau.fi/libsignal/protocol/CiphertextMessage.go b/vendor/go.mau.fi/libsignal/protocol/CiphertextMessage.go
new file mode 100644
index 00000000..c8bd759a
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/CiphertextMessage.go
@@ -0,0 +1,19 @@
+package protocol
+
+type CiphertextMessage interface {
+ Serialize() []byte
+ Type() uint32
+}
+
+type GroupCiphertextMessage interface {
+ CiphertextMessage
+ SignedSerialize() []byte
+}
+
+const UnsupportedVersion = 1
+const CurrentVersion = 3
+
+const WHISPER_TYPE = 2
+const PREKEY_TYPE = 3
+const SENDERKEY_TYPE = 4
+const SENDERKEY_DISTRIBUTION_TYPE = 5
diff --git a/vendor/go.mau.fi/libsignal/protocol/Doc.go b/vendor/go.mau.fi/libsignal/protocol/Doc.go
new file mode 100644
index 00000000..3486bdfb
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/Doc.go
@@ -0,0 +1,3 @@
+// Package protocol provides address, group, and message structures that
+// the Signal protocol uses for sending encrypted messages.
+package protocol
diff --git a/vendor/go.mau.fi/libsignal/protocol/PreKeySignalMessage.go b/vendor/go.mau.fi/libsignal/protocol/PreKeySignalMessage.go
new file mode 100644
index 00000000..841d9d17
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/PreKeySignalMessage.go
@@ -0,0 +1,152 @@
+package protocol
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/signalerror"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+// PreKeySignalMessageSerializer is an interface for serializing and deserializing
+// PreKeySignalMessages into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type PreKeySignalMessageSerializer interface {
+ Serialize(signalMessage *PreKeySignalMessageStructure) []byte
+ Deserialize(serialized []byte) (*PreKeySignalMessageStructure, error)
+}
+
+// NewPreKeySignalMessageFromBytes will return a Signal Ciphertext message from the given
+// bytes using the given serializer.
+func NewPreKeySignalMessageFromBytes(serialized []byte, serializer PreKeySignalMessageSerializer,
+ msgSerializer SignalMessageSerializer) (*PreKeySignalMessage, error) {
+ // Use the given serializer to decode the signal message.
+ signalMessageStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewPreKeySignalMessageFromStruct(signalMessageStructure, serializer, msgSerializer)
+}
+
+// NewPreKeySignalMessageFromStruct will return a new PreKeySignalMessage from the given
+// PreKeySignalMessageStructure.
+func NewPreKeySignalMessageFromStruct(structure *PreKeySignalMessageStructure,
+ serializer PreKeySignalMessageSerializer, msgSerializer SignalMessageSerializer) (*PreKeySignalMessage, error) {
+
+ // Throw an error if the given message structure is an unsupported version.
+ if structure.Version <= UnsupportedVersion {
+ return nil, fmt.Errorf("%w %d (prekey message)", signalerror.ErrOldMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the given message structure is a future version.
+ if structure.Version > CurrentVersion {
+ return nil, fmt.Errorf("%w %d (prekey message)", signalerror.ErrUnknownMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the structure is missing critical fields.
+ if structure.BaseKey == nil || structure.IdentityKey == nil || structure.Message == nil {
+ return nil, fmt.Errorf("%w (prekey message)", signalerror.ErrIncompleteMessage)
+ }
+
+ // Create the signal message object from the structure.
+ preKeyWhisperMessage := &PreKeySignalMessage{structure: *structure, serializer: serializer}
+
+ // Generate the base ECC key from bytes.
+ var err error
+ preKeyWhisperMessage.baseKey, err = ecc.DecodePoint(structure.BaseKey, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ // Generate the identity key from bytes
+ var identityKey ecc.ECPublicKeyable
+ identityKey, err = ecc.DecodePoint(structure.IdentityKey, 0)
+ if err != nil {
+ return nil, err
+ }
+ preKeyWhisperMessage.identityKey = identity.NewKey(identityKey)
+
+ // Generate the SignalMessage object from bytes.
+ preKeyWhisperMessage.message, err = NewSignalMessageFromBytes(structure.Message, msgSerializer)
+ if err != nil {
+ return nil, err
+ }
+
+ return preKeyWhisperMessage, nil
+}
+
+// NewPreKeySignalMessage will return a new PreKeySignalMessage object.
+func NewPreKeySignalMessage(version int, registrationID uint32, preKeyID *optional.Uint32, signedPreKeyID uint32,
+ baseKey ecc.ECPublicKeyable, identityKey *identity.Key, message *SignalMessage, serializer PreKeySignalMessageSerializer,
+ msgSerializer SignalMessageSerializer) (*PreKeySignalMessage, error) {
+ structure := &PreKeySignalMessageStructure{
+ Version: version,
+ RegistrationID: registrationID,
+ PreKeyID: preKeyID,
+ SignedPreKeyID: signedPreKeyID,
+ BaseKey: baseKey.Serialize(),
+ IdentityKey: identityKey.PublicKey().Serialize(),
+ Message: message.Serialize(),
+ }
+ return NewPreKeySignalMessageFromStruct(structure, serializer, msgSerializer)
+}
+
+// PreKeySignalMessageStructure is a serializable structure for
+// PreKeySignalMessages.
+type PreKeySignalMessageStructure struct {
+ RegistrationID uint32
+ PreKeyID *optional.Uint32
+ SignedPreKeyID uint32
+ BaseKey []byte
+ IdentityKey []byte
+ Message []byte
+ Version int
+}
+
+// PreKeySignalMessage is an encrypted Signal message that is designed
+// to be used when building a session with someone for the first time.
+type PreKeySignalMessage struct {
+ structure PreKeySignalMessageStructure
+ baseKey ecc.ECPublicKeyable
+ identityKey *identity.Key
+ message *SignalMessage
+ serializer PreKeySignalMessageSerializer
+}
+
+func (p *PreKeySignalMessage) MessageVersion() int {
+ return p.structure.Version
+}
+
+func (p *PreKeySignalMessage) IdentityKey() *identity.Key {
+ return p.identityKey
+}
+
+func (p *PreKeySignalMessage) RegistrationID() uint32 {
+ return p.structure.RegistrationID
+}
+
+func (p *PreKeySignalMessage) PreKeyID() *optional.Uint32 {
+ return p.structure.PreKeyID
+}
+
+func (p *PreKeySignalMessage) SignedPreKeyID() uint32 {
+ return p.structure.SignedPreKeyID
+}
+
+func (p *PreKeySignalMessage) BaseKey() ecc.ECPublicKeyable {
+ return p.baseKey
+}
+
+func (p *PreKeySignalMessage) WhisperMessage() *SignalMessage {
+ return p.message
+}
+
+func (p *PreKeySignalMessage) Serialize() []byte {
+ return p.serializer.Serialize(&p.structure)
+}
+
+func (p *PreKeySignalMessage) Type() uint32 {
+ return PREKEY_TYPE
+}
diff --git a/vendor/go.mau.fi/libsignal/protocol/SenderKeyDistributionMessage.go b/vendor/go.mau.fi/libsignal/protocol/SenderKeyDistributionMessage.go
new file mode 100644
index 00000000..55adcede
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/SenderKeyDistributionMessage.go
@@ -0,0 +1,147 @@
+package protocol
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/signalerror"
+)
+
+// SenderKeyDistributionMessageSerializer is an interface for serializing and deserializing
+// SenderKeyDistributionMessages into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SenderKeyDistributionMessageSerializer interface {
+ Serialize(signalMessage *SenderKeyDistributionMessageStructure) []byte
+ Deserialize(serialized []byte) (*SenderKeyDistributionMessageStructure, error)
+}
+
+// NewSenderKeyDistributionMessageFromBytes will return a Signal Ciphertext message from the given
+// bytes using the given serializer.
+func NewSenderKeyDistributionMessageFromBytes(serialized []byte,
+ serializer SenderKeyDistributionMessageSerializer) (*SenderKeyDistributionMessage, error) {
+
+ // Use the given serializer to decode the signal message.
+ signalMessageStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSenderKeyDistributionMessageFromStruct(signalMessageStructure, serializer)
+}
+
+// NewSenderKeyDistributionMessageFromStruct returns a Signal Ciphertext message from the
+// given serializable structure.
+func NewSenderKeyDistributionMessageFromStruct(structure *SenderKeyDistributionMessageStructure,
+ serializer SenderKeyDistributionMessageSerializer) (*SenderKeyDistributionMessage, error) {
+
+ // Throw an error if the given message structure is an unsupported version.
+ if structure.Version <= UnsupportedVersion {
+ return nil, fmt.Errorf("%w %d (sender key distribution)", signalerror.ErrOldMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the given message structure is a future version.
+ if structure.Version > CurrentVersion {
+ return nil, fmt.Errorf("%w %d (sender key distribution)", signalerror.ErrUnknownMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the structure is missing critical fields.
+ if structure.SigningKey == nil || structure.ChainKey == nil {
+ return nil, fmt.Errorf("%w (sender key distribution)", signalerror.ErrIncompleteMessage)
+ }
+
+ // Get the signing key object from bytes.
+ signingKey, err := ecc.DecodePoint(structure.SigningKey, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ // Create the signal message object from the structure.
+ message := &SenderKeyDistributionMessage{
+ id: structure.ID,
+ iteration: structure.Iteration,
+ chainKey: structure.ChainKey,
+ version: structure.Version,
+ signatureKey: signingKey,
+ serializer: serializer,
+ }
+
+ // Generate the ECC key from bytes.
+ message.signatureKey, err = ecc.DecodePoint(structure.SigningKey, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ return message, nil
+}
+
+// NewSenderKeyDistributionMessage returns a Signal Ciphertext message.
+func NewSenderKeyDistributionMessage(id uint32, iteration uint32,
+ chainKey []byte, signatureKey ecc.ECPublicKeyable,
+ serializer SenderKeyDistributionMessageSerializer) *SenderKeyDistributionMessage {
+
+ return &SenderKeyDistributionMessage{
+ id: id,
+ iteration: iteration,
+ chainKey: chainKey,
+ signatureKey: signatureKey,
+ serializer: serializer,
+ }
+}
+
+// SenderKeyDistributionMessageStructure is a serializeable structure for senderkey
+// distribution messages.
+type SenderKeyDistributionMessageStructure struct {
+ ID uint32
+ Iteration uint32
+ ChainKey []byte
+ SigningKey []byte
+ Version uint32
+}
+
+// SenderKeyDistributionMessage is a structure for senderkey distribution messages.
+type SenderKeyDistributionMessage struct {
+ id uint32
+ iteration uint32
+ chainKey []byte
+ version uint32
+ signatureKey ecc.ECPublicKeyable
+ serializer SenderKeyDistributionMessageSerializer
+}
+
+// ID will return the message's id.
+func (p *SenderKeyDistributionMessage) ID() uint32 {
+ return p.id
+}
+
+// Iteration will return the message's iteration.
+func (p *SenderKeyDistributionMessage) Iteration() uint32 {
+ return p.iteration
+}
+
+// ChainKey will return the message's chain key in bytes.
+func (p *SenderKeyDistributionMessage) ChainKey() []byte {
+ return p.chainKey
+}
+
+// SignatureKey will return the message's signature public key
+func (p *SenderKeyDistributionMessage) SignatureKey() ecc.ECPublicKeyable {
+ return p.signatureKey
+}
+
+// Serialize will use the given serializer and return the message as
+// bytes.
+func (p *SenderKeyDistributionMessage) Serialize() []byte {
+ structure := &SenderKeyDistributionMessageStructure{
+ ID: p.id,
+ Iteration: p.iteration,
+ ChainKey: p.chainKey,
+ SigningKey: p.signatureKey.Serialize(),
+ Version: CurrentVersion,
+ }
+ return p.serializer.Serialize(structure)
+}
+
+// Type will return the message's type.
+func (p *SenderKeyDistributionMessage) Type() uint32 {
+ return SENDERKEY_DISTRIBUTION_TYPE
+}
diff --git a/vendor/go.mau.fi/libsignal/protocol/SenderKeyMessage.go b/vendor/go.mau.fi/libsignal/protocol/SenderKeyMessage.go
new file mode 100644
index 00000000..cd69cea4
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/SenderKeyMessage.go
@@ -0,0 +1,168 @@
+package protocol
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/signalerror"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+// SenderKeyMessageSerializer is an interface for serializing and deserializing
+// SenderKeyMessages into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SenderKeyMessageSerializer interface {
+ Serialize(signalMessage *SenderKeyMessageStructure) []byte
+ Deserialize(serialized []byte) (*SenderKeyMessageStructure, error)
+}
+
+// NewSenderKeyMessageFromBytes will return a Signal Ciphertext message from the given
+// bytes using the given serializer.
+func NewSenderKeyMessageFromBytes(serialized []byte,
+ serializer SenderKeyMessageSerializer) (*SenderKeyMessage, error) {
+
+ // Use the given serializer to decode the signal message.
+ senderKeyMessageStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSenderKeyMessageFromStruct(senderKeyMessageStructure, serializer)
+}
+
+// NewSenderKeyMessageFromStruct returns a Signal Ciphertext message from the
+// given serializable structure.
+func NewSenderKeyMessageFromStruct(structure *SenderKeyMessageStructure,
+ serializer SenderKeyMessageSerializer) (*SenderKeyMessage, error) {
+
+ // Throw an error if the given message structure is an unsupported version.
+ if structure.Version <= UnsupportedVersion {
+ return nil, fmt.Errorf("%w %d (sender key message)", signalerror.ErrOldMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the given message structure is a future version.
+ if structure.Version > CurrentVersion {
+ return nil, fmt.Errorf("%w %d (sender key message)", signalerror.ErrUnknownMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the structure is missing critical fields.
+ if structure.CipherText == nil {
+ return nil, fmt.Errorf("%w (sender key message)", signalerror.ErrIncompleteMessage)
+ }
+
+ // Create the signal message object from the structure.
+ whisperMessage := &SenderKeyMessage{
+ keyID: structure.ID,
+ version: structure.Version,
+ iteration: structure.Iteration,
+ ciphertext: structure.CipherText,
+ signature: structure.Signature,
+ serializer: serializer,
+ }
+
+ return whisperMessage, nil
+}
+
+// NewSenderKeyMessage returns a SenderKeyMessage.
+func NewSenderKeyMessage(keyID uint32, iteration uint32, ciphertext []byte,
+ signatureKey ecc.ECPrivateKeyable, serializer SenderKeyMessageSerializer) *SenderKeyMessage {
+
+ // Ensure we have a valid signature key
+ if signatureKey == nil {
+ panic("Signature is nil. Unable to sign new senderkey message.")
+ }
+
+ // Build our SenderKeyMessage.
+ senderKeyMessage := &SenderKeyMessage{
+ keyID: keyID,
+ iteration: iteration,
+ ciphertext: ciphertext,
+ version: CurrentVersion,
+ serializer: serializer,
+ }
+
+ // Sign the serialized message and include it in the message. This will be included
+ // in the signed serialized version of the message.
+ signature := ecc.CalculateSignature(signatureKey, senderKeyMessage.Serialize())
+ senderKeyMessage.signature = bytehelper.ArrayToSlice64(signature)
+
+ return senderKeyMessage
+}
+
+// SenderKeyMessageStructure is a serializeable structure for SenderKey messages.
+type SenderKeyMessageStructure struct {
+ ID uint32
+ Iteration uint32
+ CipherText []byte
+ Version uint32
+ Signature []byte
+}
+
+// SenderKeyMessage is a structure for messages using senderkey groups.
+type SenderKeyMessage struct {
+ version uint32
+ keyID uint32
+ iteration uint32
+ ciphertext []byte
+ signature []byte
+ serializer SenderKeyMessageSerializer
+}
+
+// KeyID returns the SenderKeyMessage key ID.
+func (p *SenderKeyMessage) KeyID() uint32 {
+ return p.keyID
+}
+
+// Iteration returns the SenderKeyMessage iteration.
+func (p *SenderKeyMessage) Iteration() uint32 {
+ return p.iteration
+}
+
+// Ciphertext returns the SenderKeyMessage encrypted ciphertext.
+func (p *SenderKeyMessage) Ciphertext() []byte {
+ return p.ciphertext
+}
+
+// Version returns the Signal message version of the message.
+func (p *SenderKeyMessage) Version() uint32 {
+ return p.version
+}
+
+// Serialize will use the given serializer to return the message as bytes
+// excluding the signature. This should be used for signing and verifying
+// message signatures.
+func (p *SenderKeyMessage) Serialize() []byte {
+ structure := &SenderKeyMessageStructure{
+ ID: p.keyID,
+ Iteration: p.iteration,
+ CipherText: p.ciphertext,
+ Version: p.version,
+ }
+
+ return p.serializer.Serialize(structure)
+}
+
+// SignedSerialize will use the given serializer to return the message as
+// bytes with the message signature included. This should be used when
+// sending the message over the network.
+func (p *SenderKeyMessage) SignedSerialize() []byte {
+ structure := &SenderKeyMessageStructure{
+ ID: p.keyID,
+ Iteration: p.iteration,
+ CipherText: p.ciphertext,
+ Version: p.version,
+ Signature: p.signature,
+ }
+
+ return p.serializer.Serialize(structure)
+}
+
+// Signature returns the SenderKeyMessage signature
+func (p *SenderKeyMessage) Signature() [64]byte {
+ return bytehelper.SliceToArray64(p.signature)
+}
+
+// Type returns the sender key type.
+func (p *SenderKeyMessage) Type() uint32 {
+ return SENDERKEY_TYPE
+}
diff --git a/vendor/go.mau.fi/libsignal/protocol/SenderKeyName.go b/vendor/go.mau.fi/libsignal/protocol/SenderKeyName.go
new file mode 100644
index 00000000..d9b6b684
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/SenderKeyName.go
@@ -0,0 +1,25 @@
+package protocol
+
+// NewSenderKeyName returns a new SenderKeyName object.
+func NewSenderKeyName(groupID string, sender *SignalAddress) *SenderKeyName {
+ return &SenderKeyName{
+ groupID: groupID,
+ sender: sender,
+ }
+}
+
+// SenderKeyName is a structure for a group session address.
+type SenderKeyName struct {
+ groupID string
+ sender *SignalAddress
+}
+
+// GroupID returns the sender key group id
+func (n *SenderKeyName) GroupID() string {
+ return n.groupID
+}
+
+// Sender returns the Signal address of sending user in the group.
+func (n *SenderKeyName) Sender() *SignalAddress {
+ return n.sender
+}
diff --git a/vendor/go.mau.fi/libsignal/protocol/SignalMessage.go b/vendor/go.mau.fi/libsignal/protocol/SignalMessage.go
new file mode 100644
index 00000000..fd348a3e
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/SignalMessage.go
@@ -0,0 +1,226 @@
+package protocol
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+ "fmt"
+ "strconv"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/logger"
+ "go.mau.fi/libsignal/signalerror"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+const MacLength int = 8
+
+// SignalMessageSerializer is an interface for serializing and deserializing
+// SignalMessages into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SignalMessageSerializer interface {
+ Serialize(signalMessage *SignalMessageStructure) []byte
+ Deserialize(serialized []byte) (*SignalMessageStructure, error)
+}
+
+// NewSignalMessageFromBytes will return a Signal Ciphertext message from the given
+// bytes using the given serializer.
+func NewSignalMessageFromBytes(serialized []byte, serializer SignalMessageSerializer) (*SignalMessage, error) {
+ // Use the given serializer to decode the signal message.
+ signalMessageStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSignalMessageFromStruct(signalMessageStructure, serializer)
+}
+
+// NewSignalMessageFromStruct returns a Signal Ciphertext message from the
+// given serializable structure.
+func NewSignalMessageFromStruct(structure *SignalMessageStructure, serializer SignalMessageSerializer) (*SignalMessage, error) {
+ // Throw an error if the given message structure is an unsupported version.
+ if structure.Version <= UnsupportedVersion {
+ return nil, fmt.Errorf("%w %d (normal message)", signalerror.ErrOldMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the given message structure is a future version.
+ if structure.Version > CurrentVersion {
+ return nil, fmt.Errorf("%w %d (normal message)", signalerror.ErrUnknownMessageVersion, structure.Version)
+ }
+
+ // Throw an error if the structure is missing critical fields.
+ if structure.CipherText == nil || structure.RatchetKey == nil {
+ return nil, fmt.Errorf("%w (normal message)", signalerror.ErrIncompleteMessage)
+ }
+
+ // Create the signal message object from the structure.
+ whisperMessage := &SignalMessage{structure: *structure, serializer: serializer}
+
+ // Generate the ECC key from bytes.
+ var err error
+ whisperMessage.senderRatchetKey, err = ecc.DecodePoint(structure.RatchetKey, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ return whisperMessage, nil
+}
+
+// NewSignalMessage returns a Signal Ciphertext message.
+func NewSignalMessage(messageVersion int, counter, previousCounter uint32, macKey []byte,
+ senderRatchetKey ecc.ECPublicKeyable, ciphertext []byte, senderIdentityKey,
+ receiverIdentityKey *identity.Key, serializer SignalMessageSerializer) (*SignalMessage, error) {
+
+ version := []byte(strconv.Itoa(messageVersion))
+ // Build the signal message structure with the given data.
+ structure := &SignalMessageStructure{
+ Counter: counter,
+ PreviousCounter: previousCounter,
+ RatchetKey: senderRatchetKey.Serialize(),
+ CipherText: ciphertext,
+ }
+
+ serialized := append(version, serializer.Serialize(structure)...)
+ // Get the message authentication code from the serialized structure.
+ mac, err := getMac(
+ messageVersion, senderIdentityKey, receiverIdentityKey,
+ macKey, serialized,
+ )
+ if err != nil {
+ return nil, err
+ }
+ structure.Mac = mac
+ structure.Version = messageVersion
+
+ // Generate a SignalMessage with the structure.
+ whisperMessage, err := NewSignalMessageFromStruct(structure, serializer)
+ if err != nil {
+ return nil, err
+ }
+
+ return whisperMessage, nil
+}
+
+// SignalMessageStructure is a serializeable structure of a signal message
+// object.
+type SignalMessageStructure struct {
+ RatchetKey []byte
+ Counter uint32
+ PreviousCounter uint32
+ CipherText []byte
+ Version int
+ Mac []byte
+}
+
+// SignalMessage is a cipher message that contains a message encrypted
+// with the Signal protocol.
+type SignalMessage struct {
+ structure SignalMessageStructure
+ senderRatchetKey ecc.ECPublicKeyable
+ serializer SignalMessageSerializer
+}
+
+// SenderRatchetKey returns the SignalMessage's sender ratchet key. This
+// key is used for ratcheting the chain forward to negotiate a new shared
+// secret that cannot be derived from previous chains.
+func (s *SignalMessage) SenderRatchetKey() ecc.ECPublicKeyable {
+ return s.senderRatchetKey
+}
+
+// MessageVersion returns the message version this SignalMessage supports.
+func (s *SignalMessage) MessageVersion() int {
+ return s.structure.Version
+}
+
+// Counter will return the SignalMessage counter.
+func (s *SignalMessage) Counter() uint32 {
+ return s.structure.Counter
+}
+
+// Body will return the SignalMessage's ciphertext in bytes.
+func (s *SignalMessage) Body() []byte {
+ return s.structure.CipherText
+}
+
+// VerifyMac will return an error if the message's message authentication code
+// is invalid. This should be used on SignalMessages that have been constructed
+// from a sent message.
+func (s *SignalMessage) VerifyMac(messageVersion int, senderIdentityKey,
+ receiverIdentityKey *identity.Key, macKey []byte) error {
+
+ // Create a copy of the message without the mac. We'll use this to calculate
+ // the message authentication code.
+ structure := s.structure
+ signalMessage, err := NewSignalMessageFromStruct(&structure, s.serializer)
+ if err != nil {
+ return err
+ }
+ signalMessage.structure.Mac = nil
+ signalMessage.structure.Version = 0
+ version := []byte(strconv.Itoa(s.MessageVersion()))
+ serialized := append(version, signalMessage.Serialize()...)
+
+ // Calculate the message authentication code from the serialized structure.
+ ourMac, err := getMac(
+ messageVersion,
+ senderIdentityKey,
+ receiverIdentityKey,
+ macKey,
+ serialized,
+ )
+ if err != nil {
+ logger.Error(err)
+ return err
+ }
+
+ // Get the message authentication code that was sent to us as part of
+ // the signal message structure.
+ theirMac := s.structure.Mac
+
+ logger.Debug("Verifying macs...")
+ logger.Debug(" Our MAC: ", ourMac)
+ logger.Debug(" Their MAC: ", theirMac)
+
+ // Return an error if our calculated mac doesn't match the mac sent to us.
+ if !hmac.Equal(ourMac, theirMac) {
+ return signalerror.ErrBadMAC
+ }
+
+ return nil
+}
+
+// Serialize will return the Signal Message as bytes.
+func (s *SignalMessage) Serialize() []byte {
+ return s.serializer.Serialize(&s.structure)
+}
+
+// Structure will return a serializeable structure of the Signal Message.
+func (s *SignalMessage) Structure() *SignalMessageStructure {
+ structure := s.structure
+ return &structure
+}
+
+// Type will return the type of Signal Message this is.
+func (s *SignalMessage) Type() uint32 {
+ return WHISPER_TYPE
+}
+
+// getMac will calculate the mac using the given message version, identity
+// keys, macKey and SignalMessageStructure. The MAC key is a private key held
+// by both parties that is concatenated with the message and hashed.
+func getMac(messageVersion int, senderIdentityKey, receiverIdentityKey *identity.Key,
+ macKey, serialized []byte) ([]byte, error) {
+
+ mac := hmac.New(sha256.New, macKey[:])
+
+ if messageVersion >= 3 {
+ mac.Write(senderIdentityKey.PublicKey().Serialize())
+ mac.Write(receiverIdentityKey.PublicKey().Serialize())
+ }
+
+ mac.Write(serialized)
+
+ fullMac := mac.Sum(nil)
+
+ return bytehelper.Trim(fullMac, MacLength), nil
+}
diff --git a/vendor/go.mau.fi/libsignal/protocol/SignalProtocolAddress.go b/vendor/go.mau.fi/libsignal/protocol/SignalProtocolAddress.go
new file mode 100644
index 00000000..468a3087
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/protocol/SignalProtocolAddress.go
@@ -0,0 +1,38 @@
+package protocol
+
+import (
+ "fmt"
+)
+
+const ADDRESS_SEPARATOR = ":"
+
+// NewSignalAddress returns a new signal address.
+func NewSignalAddress(name string, deviceID uint32) *SignalAddress {
+ addr := SignalAddress{
+ name: name,
+ deviceID: deviceID,
+ }
+
+ return &addr
+}
+
+// SignalAddress is a combination of a name and a device ID.
+type SignalAddress struct {
+ name string
+ deviceID uint32
+}
+
+// Name returns the signal address's name.
+func (s *SignalAddress) Name() string {
+ return s.name
+}
+
+// DeviceID returns the signal address's device ID.
+func (s *SignalAddress) DeviceID() uint32 {
+ return s.deviceID
+}
+
+// String returns a string of both the address name and device id.
+func (s *SignalAddress) String() string {
+ return fmt.Sprintf("%s%s%d", s.name, ADDRESS_SEPARATOR, s.deviceID)
+}
diff --git a/vendor/go.mau.fi/libsignal/ratchet/Ratchet.go b/vendor/go.mau.fi/libsignal/ratchet/Ratchet.go
new file mode 100644
index 00000000..df25beb3
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ratchet/Ratchet.go
@@ -0,0 +1,197 @@
+// Package ratchet provides the methods necessary to establish a new double
+// ratchet session.
+package ratchet
+
+import (
+ "encoding/base64"
+ "encoding/binary"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/kdf"
+ "go.mau.fi/libsignal/keys/chain"
+ "go.mau.fi/libsignal/keys/root"
+ "go.mau.fi/libsignal/keys/session"
+)
+
+var b64 = base64.StdEncoding.EncodeToString
+
+func genDiscontinuity() [32]byte {
+ var discontinuity [32]byte
+ for i := range discontinuity {
+ discontinuity[i] = 0xFF
+ }
+ return discontinuity
+}
+
+// CalculateSenderSession calculates the key agreement for a recipient. This
+// should be used when we are trying to send a message to someone for the
+// first time.
+func CalculateSenderSession(parameters *SenderParameters) (*session.KeyPair, error) {
+ var secret [32]byte
+ var publicKey [32]byte
+ var privateKey [32]byte
+ masterSecret := []byte{} // Create a master shared secret that is 5 different 32-byte values
+ discontinuity := genDiscontinuity()
+ masterSecret = append(masterSecret, discontinuity[:]...)
+
+ // Calculate the agreement using their signed prekey and our identity key.
+ publicKey = parameters.TheirSignedPreKey().PublicKey()
+ privateKey = parameters.OurIdentityKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ // Calculate the agreement using their identity key and our base key.
+ publicKey = parameters.TheirIdentityKey().PublicKey().PublicKey()
+ privateKey = parameters.OurBaseKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ // Calculate the agreement using their signed prekey and our base key.
+ publicKey = parameters.TheirSignedPreKey().PublicKey()
+ privateKey = parameters.OurBaseKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ // If they have a one-time prekey, use it to calculate the shared secret with their
+ // one time key and our base key.
+ if parameters.TheirOneTimePreKey() != nil {
+ publicKey = parameters.TheirOneTimePreKey().PublicKey()
+ privateKey = parameters.OurBaseKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ }
+
+ // Derive the root and chain keys based on the master secret.
+ derivedKeysBytes, err := kdf.DeriveSecrets(masterSecret, nil, []byte("WhisperText"), root.DerivedSecretsSize)
+ if err != nil {
+ return nil, err
+ }
+ derivedKeys := session.NewDerivedSecrets(derivedKeysBytes)
+ chainKey := chain.NewKey(kdf.DeriveSecrets, derivedKeys.ChainKey(), 0)
+ rootKey := root.NewKey(kdf.DeriveSecrets, derivedKeys.RootKey())
+
+ // Add the root and chain keys to a structure that will hold both keys.
+ sessionKeys := session.NewKeyPair(rootKey, chainKey)
+
+ return sessionKeys, nil
+}
+
+// CalculateReceiverSession calculates the key agreement for a sender. This should
+// be used when we are receiving a message from someone for the first time.
+func CalculateReceiverSession(parameters *ReceiverParameters) (*session.KeyPair, error) {
+ var secret [32]byte
+ var publicKey [32]byte
+ var privateKey [32]byte
+ masterSecret := []byte{} // Create a master shared secret that is 5 different 32-byte values
+
+ discontinuity := genDiscontinuity()
+ masterSecret = append(masterSecret, discontinuity[:]...)
+
+ // Calculate the agreement using their identity key and our signed pre key.
+ publicKey = parameters.TheirIdentityKey().PublicKey().PublicKey()
+ privateKey = parameters.OurSignedPreKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ // Calculate the agreement using their base key and our identity key.
+ publicKey = parameters.TheirBaseKey().PublicKey()
+ privateKey = parameters.OurIdentityKeyPair().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ // Calculate the agreement using their base key and our signed prekey.
+ publicKey = parameters.TheirBaseKey().PublicKey()
+ privateKey = parameters.OurSignedPreKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ // If we had a one-time prekey, use it to calculate the shared secret with our
+ // one time key and their base key.
+ if parameters.OurOneTimePreKey() != nil {
+ publicKey = parameters.TheirBaseKey().PublicKey()
+ privateKey = parameters.OurOneTimePreKey().PrivateKey().Serialize()
+ secret = kdf.CalculateSharedSecret(
+ publicKey,
+ privateKey,
+ )
+ masterSecret = append(masterSecret, secret[:]...)
+
+ }
+
+ // Derive the root and chain keys based on the master secret.
+ derivedKeysBytes, err := kdf.DeriveSecrets(masterSecret, nil, []byte("WhisperText"), root.DerivedSecretsSize)
+ if err != nil {
+ return nil, err
+ }
+ derivedKeys := session.NewDerivedSecrets(derivedKeysBytes)
+ chainKey := chain.NewKey(kdf.DeriveSecrets, derivedKeys.ChainKey(), 0)
+ rootKey := root.NewKey(kdf.DeriveSecrets, derivedKeys.RootKey())
+
+ // Add the root and chain keys to a structure that will hold both keys.
+ sessionKeys := session.NewKeyPair(rootKey, chainKey)
+
+ return sessionKeys, nil
+}
+
+// CalculateSymmetricSession calculates the key agreement between two users. This
+// works by both clients exchanging KeyExchange messages to first establish a session.
+// This is useful for establishing a session if both users are online.
+func CalculateSymmetricSession(parameters *SymmetricParameters) (*session.KeyPair, error) {
+ // Compare the base public keys so we can deterministically know whether we should
+ // be setting up a sender or receiver session. If our key converted to an integer is
+ // less than the other user's, act as a sender.
+ if isSender(parameters.OurBaseKey.PublicKey(), parameters.TheirBaseKey) {
+ senderParameters := &SenderParameters{
+ ourBaseKey: parameters.OurBaseKey,
+ ourIdentityKeyPair: parameters.OurIdentityKeyPair,
+ theirRatchetKey: parameters.TheirRatchetKey,
+ theirIdentityKey: parameters.TheirIdentityKey,
+ theirSignedPreKey: parameters.TheirBaseKey,
+ }
+
+ return CalculateSenderSession(senderParameters)
+ }
+
+ // If our base public key was larger than the other user's, act as a receiver.
+ receiverParameters := &ReceiverParameters{
+ ourIdentityKeyPair: parameters.OurIdentityKeyPair,
+ ourRatchetKey: parameters.OurRatchetKey,
+ ourSignedPreKey: parameters.OurBaseKey,
+ theirBaseKey: parameters.TheirBaseKey,
+ theirIdentityKey: parameters.TheirIdentityKey,
+ }
+
+ return CalculateReceiverSession(receiverParameters)
+}
+
+// isSender is a private method for determining if a symmetric session should
+// be calculated as the sender or receiver. It does so by converting the given
+// keys into integers and comparing the size of those integers.
+func isSender(ourKey, theirKey ecc.ECPublicKeyable) bool {
+ ourKeyInt := binary.BigEndian.Uint32(ourKey.Serialize())
+ theirKeyInt := binary.BigEndian.Uint32(theirKey.Serialize())
+
+ return ourKeyInt < theirKeyInt
+}
diff --git a/vendor/go.mau.fi/libsignal/ratchet/ReceiverParameters.go b/vendor/go.mau.fi/libsignal/ratchet/ReceiverParameters.go
new file mode 100644
index 00000000..97822d19
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ratchet/ReceiverParameters.go
@@ -0,0 +1,106 @@
+package ratchet
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+)
+
+// NewReceiverParameters creates a structure with all the keys needed to construct
+// a new session when we are receiving a message from a user for the first time.
+func NewReceiverParameters(ourIdentityKey *identity.KeyPair, ourSignedPreKey *ecc.ECKeyPair,
+ ourOneTimePreKey *ecc.ECKeyPair, ourRatchetKey *ecc.ECKeyPair,
+ theirBaseKey ecc.ECPublicKeyable, theirIdentityKey *identity.Key) *ReceiverParameters {
+
+ receiverParams := ReceiverParameters{
+ ourIdentityKeyPair: ourIdentityKey,
+ ourSignedPreKey: ourSignedPreKey,
+ ourOneTimePreKey: ourOneTimePreKey,
+ ourRatchetKey: ourRatchetKey,
+ theirBaseKey: theirBaseKey,
+ theirIdentityKey: theirIdentityKey,
+ }
+
+ return &receiverParams
+}
+
+// NewEmptyReceiverParameters creates an empty structure with the receiver parameters
+// needed to create a session. You should use the `set` functions to set all the
+// necessary keys needed to build a session.
+func NewEmptyReceiverParameters() *ReceiverParameters {
+ receiverParams := ReceiverParameters{}
+
+ return &receiverParams
+}
+
+// ReceiverParameters describes the session parameters if we are receiving
+// a message from someone for the first time. These parameters are used as
+// the basis for deriving a shared secret with the sender.
+type ReceiverParameters struct {
+ ourIdentityKeyPair *identity.KeyPair
+ ourSignedPreKey *ecc.ECKeyPair
+ ourOneTimePreKey *ecc.ECKeyPair
+ ourRatchetKey *ecc.ECKeyPair
+
+ theirBaseKey ecc.ECPublicKeyable
+ theirIdentityKey *identity.Key
+}
+
+// OurIdentityKeyPair returns the identity key of the receiver.
+func (r *ReceiverParameters) OurIdentityKeyPair() *identity.KeyPair {
+ return r.ourIdentityKeyPair
+}
+
+// OurSignedPreKey returns the signed prekey of the receiver.
+func (r *ReceiverParameters) OurSignedPreKey() *ecc.ECKeyPair {
+ return r.ourSignedPreKey
+}
+
+// OurOneTimePreKey returns the one time prekey of the receiver.
+func (r *ReceiverParameters) OurOneTimePreKey() *ecc.ECKeyPair {
+ return r.ourOneTimePreKey
+}
+
+// OurRatchetKey returns the ratchet key of the receiver.
+func (r *ReceiverParameters) OurRatchetKey() *ecc.ECKeyPair {
+ return r.ourRatchetKey
+}
+
+// TheirBaseKey returns the base key of the sender.
+func (r *ReceiverParameters) TheirBaseKey() ecc.ECPublicKeyable {
+ return r.theirBaseKey
+}
+
+// TheirIdentityKey returns the identity key of the sender.
+func (r *ReceiverParameters) TheirIdentityKey() *identity.Key {
+ return r.theirIdentityKey
+}
+
+// SetOurIdentityKeyPair sets the identity key of the receiver.
+func (r *ReceiverParameters) SetOurIdentityKeyPair(ourIdentityKey *identity.KeyPair) {
+ r.ourIdentityKeyPair = ourIdentityKey
+}
+
+// SetOurSignedPreKey sets the signed prekey of the receiver.
+func (r *ReceiverParameters) SetOurSignedPreKey(ourSignedPreKey *ecc.ECKeyPair) {
+ r.ourSignedPreKey = ourSignedPreKey
+}
+
+// SetOurOneTimePreKey sets the one time prekey of the receiver.
+func (r *ReceiverParameters) SetOurOneTimePreKey(ourOneTimePreKey *ecc.ECKeyPair) {
+ r.ourOneTimePreKey = ourOneTimePreKey
+}
+
+// SetOurRatchetKey sets the ratchet key of the receiver.
+func (r *ReceiverParameters) SetOurRatchetKey(ourRatchetKey *ecc.ECKeyPair) {
+ r.ourRatchetKey = ourRatchetKey
+}
+
+// SetTheirBaseKey sets the base key of the sender.
+func (r *ReceiverParameters) SetTheirBaseKey(theirBaseKey ecc.ECPublicKeyable) {
+ r.theirBaseKey = theirBaseKey
+}
+
+// SetTheirIdentityKey sets the identity key of the sender.
+func (r *ReceiverParameters) SetTheirIdentityKey(theirIdentityKey *identity.Key) {
+ r.theirIdentityKey = theirIdentityKey
+}
diff --git a/vendor/go.mau.fi/libsignal/ratchet/SenderParameters.go b/vendor/go.mau.fi/libsignal/ratchet/SenderParameters.go
new file mode 100644
index 00000000..ca972956
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ratchet/SenderParameters.go
@@ -0,0 +1,106 @@
+package ratchet
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+)
+
+// NewSenderParameters creates a structure with all the keys needed to construct
+// a new session when we are sending a message to a recipient for the first time.
+func NewSenderParameters(ourIdentityKey *identity.KeyPair, ourBaseKey *ecc.ECKeyPair,
+ theirIdentityKey *identity.Key, theirSignedPreKey ecc.ECPublicKeyable,
+ theirRatchetKey ecc.ECPublicKeyable, theirOneTimePreKey ecc.ECPublicKeyable) *SenderParameters {
+
+ senderParams := SenderParameters{
+ ourIdentityKeyPair: ourIdentityKey,
+ ourBaseKey: ourBaseKey,
+ theirIdentityKey: theirIdentityKey,
+ theirSignedPreKey: theirSignedPreKey,
+ theirOneTimePreKey: theirOneTimePreKey,
+ theirRatchetKey: theirRatchetKey,
+ }
+
+ return &senderParams
+}
+
+// NewEmptySenderParameters creates an empty structure with the sender parameters
+// needed to create a session. You should use the `set` functions to set all the
+// necessary keys needed to build a session.
+func NewEmptySenderParameters() *SenderParameters {
+ senderParams := SenderParameters{}
+
+ return &senderParams
+}
+
+// SenderParameters describes the session parameters if we are sending the
+// recipient a message for the first time. These parameters are used as the
+// basis for deriving a shared secret with a recipient.
+type SenderParameters struct {
+ ourIdentityKeyPair *identity.KeyPair
+ ourBaseKey *ecc.ECKeyPair
+
+ theirIdentityKey *identity.Key
+ theirSignedPreKey ecc.ECPublicKeyable
+ theirOneTimePreKey ecc.ECPublicKeyable
+ theirRatchetKey ecc.ECPublicKeyable
+}
+
+// OurIdentityKey returns the identity key pair of the sender.
+func (s *SenderParameters) OurIdentityKey() *identity.KeyPair {
+ return s.ourIdentityKeyPair
+}
+
+// OurBaseKey returns the base ECC key pair of the sender.
+func (s *SenderParameters) OurBaseKey() *ecc.ECKeyPair {
+ return s.ourBaseKey
+}
+
+// TheirIdentityKey returns the identity public key of the receiver.
+func (s *SenderParameters) TheirIdentityKey() *identity.Key {
+ return s.theirIdentityKey
+}
+
+// TheirSignedPreKey returns the signed pre key of the receiver.
+func (s *SenderParameters) TheirSignedPreKey() ecc.ECPublicKeyable {
+ return s.theirSignedPreKey
+}
+
+// TheirOneTimePreKey returns the receiver's one time prekey.
+func (s *SenderParameters) TheirOneTimePreKey() ecc.ECPublicKeyable {
+ return s.theirOneTimePreKey
+}
+
+// TheirRatchetKey returns the receiver's ratchet key.
+func (s *SenderParameters) TheirRatchetKey() ecc.ECPublicKeyable {
+ return s.theirRatchetKey
+}
+
+// SetOurIdentityKey sets the identity key pair of the sender.
+func (s *SenderParameters) SetOurIdentityKey(ourIdentityKey *identity.KeyPair) {
+ s.ourIdentityKeyPair = ourIdentityKey
+}
+
+// SetOurBaseKey sets the base ECC key pair of the sender.
+func (s *SenderParameters) SetOurBaseKey(ourBaseKey *ecc.ECKeyPair) {
+ s.ourBaseKey = ourBaseKey
+}
+
+// SetTheirIdentityKey sets the identity public key of the receiver.
+func (s *SenderParameters) SetTheirIdentityKey(theirIdentityKey *identity.Key) {
+ s.theirIdentityKey = theirIdentityKey
+}
+
+// SetTheirSignedPreKey sets the signed pre key of the receiver.
+func (s *SenderParameters) SetTheirSignedPreKey(theirSignedPreKey ecc.ECPublicKeyable) {
+ s.theirSignedPreKey = theirSignedPreKey
+}
+
+// SetTheirOneTimePreKey sets the receiver's one time prekey.
+func (s *SenderParameters) SetTheirOneTimePreKey(theirOneTimePreKey ecc.ECPublicKeyable) {
+ s.theirOneTimePreKey = theirOneTimePreKey
+}
+
+// SetTheirRatchetKey sets the receiver's ratchet key.
+func (s *SenderParameters) SetTheirRatchetKey(theirRatchetKey ecc.ECPublicKeyable) {
+ s.theirRatchetKey = theirRatchetKey
+}
diff --git a/vendor/go.mau.fi/libsignal/ratchet/SymmetricParameters.go b/vendor/go.mau.fi/libsignal/ratchet/SymmetricParameters.go
new file mode 100644
index 00000000..e7811de5
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/ratchet/SymmetricParameters.go
@@ -0,0 +1,18 @@
+package ratchet
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+)
+
+// SymmetricParameters describes the session parameters for sessions where
+// both users are online, which doesn't use prekeys for setup.
+type SymmetricParameters struct {
+ OurBaseKey *ecc.ECKeyPair
+ OurRatchetKey *ecc.ECKeyPair
+ OurIdentityKeyPair *identity.KeyPair
+
+ TheirBaseKey ecc.ECPublicKeyable
+ TheirRatchetKey ecc.ECPublicKeyable
+ TheirIdentityKey *identity.Key
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go b/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go
new file mode 100644
index 00000000..1e90caac
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go
@@ -0,0 +1,245 @@
+// From https://github.com/signalapp/libsignal-protocol-c/blob/master/protobuf/FingerprintProtocol.proto
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.12.4
+// source: serialize/FingerprintProtocol.proto
+
+package serialize
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type LogicalFingerprint struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Content []byte `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"`
+ Identifier []byte `protobuf:"bytes,2,opt,name=identifier" json:"identifier,omitempty"` // Version 0
+}
+
+func (x *LogicalFingerprint) Reset() {
+ *x = LogicalFingerprint{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_FingerprintProtocol_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LogicalFingerprint) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LogicalFingerprint) ProtoMessage() {}
+
+func (x *LogicalFingerprint) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_FingerprintProtocol_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 LogicalFingerprint.ProtoReflect.Descriptor instead.
+func (*LogicalFingerprint) Descriptor() ([]byte, []int) {
+ return file_serialize_FingerprintProtocol_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *LogicalFingerprint) GetContent() []byte {
+ if x != nil {
+ return x.Content
+ }
+ return nil
+}
+
+func (x *LogicalFingerprint) GetIdentifier() []byte {
+ if x != nil {
+ return x.Identifier
+ }
+ return nil
+}
+
+type CombinedFingerprints struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
+ LocalFingerprint *LogicalFingerprint `protobuf:"bytes,2,opt,name=localFingerprint" json:"localFingerprint,omitempty"`
+ RemoteFingerprint *LogicalFingerprint `protobuf:"bytes,3,opt,name=remoteFingerprint" json:"remoteFingerprint,omitempty"`
+}
+
+func (x *CombinedFingerprints) Reset() {
+ *x = CombinedFingerprints{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_FingerprintProtocol_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CombinedFingerprints) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CombinedFingerprints) ProtoMessage() {}
+
+func (x *CombinedFingerprints) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_FingerprintProtocol_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 CombinedFingerprints.ProtoReflect.Descriptor instead.
+func (*CombinedFingerprints) Descriptor() ([]byte, []int) {
+ return file_serialize_FingerprintProtocol_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CombinedFingerprints) GetVersion() uint32 {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return 0
+}
+
+func (x *CombinedFingerprints) GetLocalFingerprint() *LogicalFingerprint {
+ if x != nil {
+ return x.LocalFingerprint
+ }
+ return nil
+}
+
+func (x *CombinedFingerprints) GetRemoteFingerprint() *LogicalFingerprint {
+ if x != nil {
+ return x.RemoteFingerprint
+ }
+ return nil
+}
+
+var File_serialize_FingerprintProtocol_proto protoreflect.FileDescriptor
+
+var file_serialize_FingerprintProtocol_proto_rawDesc = []byte{
+ 0x0a, 0x23, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x2f, 0x46, 0x69, 0x6e, 0x67,
+ 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72,
+ 0x65, 0x22, 0x4e, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x6e, 0x67,
+ 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
+ 0x72, 0x22, 0xca, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x46, 0x69,
+ 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x6e,
+ 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
+ 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x69,
+ 0x63, 0x61, 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x52, 0x10,
+ 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74,
+ 0x12, 0x4c, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72,
+ 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65,
+ 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c,
+ 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x52, 0x11, 0x72, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74,
+}
+
+var (
+ file_serialize_FingerprintProtocol_proto_rawDescOnce sync.Once
+ file_serialize_FingerprintProtocol_proto_rawDescData = file_serialize_FingerprintProtocol_proto_rawDesc
+)
+
+func file_serialize_FingerprintProtocol_proto_rawDescGZIP() []byte {
+ file_serialize_FingerprintProtocol_proto_rawDescOnce.Do(func() {
+ file_serialize_FingerprintProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_serialize_FingerprintProtocol_proto_rawDescData)
+ })
+ return file_serialize_FingerprintProtocol_proto_rawDescData
+}
+
+var file_serialize_FingerprintProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_serialize_FingerprintProtocol_proto_goTypes = []interface{}{
+ (*LogicalFingerprint)(nil), // 0: textsecure.LogicalFingerprint
+ (*CombinedFingerprints)(nil), // 1: textsecure.CombinedFingerprints
+}
+var file_serialize_FingerprintProtocol_proto_depIdxs = []int32{
+ 0, // 0: textsecure.CombinedFingerprints.localFingerprint:type_name -> textsecure.LogicalFingerprint
+ 0, // 1: textsecure.CombinedFingerprints.remoteFingerprint:type_name -> textsecure.LogicalFingerprint
+ 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_serialize_FingerprintProtocol_proto_init() }
+func file_serialize_FingerprintProtocol_proto_init() {
+ if File_serialize_FingerprintProtocol_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_serialize_FingerprintProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LogicalFingerprint); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_FingerprintProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CombinedFingerprints); 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_serialize_FingerprintProtocol_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_serialize_FingerprintProtocol_proto_goTypes,
+ DependencyIndexes: file_serialize_FingerprintProtocol_proto_depIdxs,
+ MessageInfos: file_serialize_FingerprintProtocol_proto_msgTypes,
+ }.Build()
+ File_serialize_FingerprintProtocol_proto = out.File
+ file_serialize_FingerprintProtocol_proto_rawDesc = nil
+ file_serialize_FingerprintProtocol_proto_goTypes = nil
+ file_serialize_FingerprintProtocol_proto_depIdxs = nil
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.proto b/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.proto
new file mode 100644
index 00000000..2003ec72
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.proto
@@ -0,0 +1,14 @@
+// From https://github.com/signalapp/libsignal-protocol-c/blob/master/protobuf/FingerprintProtocol.proto
+syntax = "proto2";
+package textsecure;
+
+message LogicalFingerprint {
+ optional bytes content = 1;
+ optional bytes identifier = 2; // Version 0
+}
+
+message CombinedFingerprints {
+ optional uint32 version = 1;
+ optional LogicalFingerprint localFingerprint = 2;
+ optional LogicalFingerprint remoteFingerprint = 3;
+} \ No newline at end of file
diff --git a/vendor/go.mau.fi/libsignal/serialize/JSONSerializer.go b/vendor/go.mau.fi/libsignal/serialize/JSONSerializer.go
new file mode 100644
index 00000000..1245fc42
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/JSONSerializer.go
@@ -0,0 +1,303 @@
+package serialize
+
+import (
+ "encoding/json"
+
+ groupRecord "go.mau.fi/libsignal/groups/state/record"
+ "go.mau.fi/libsignal/logger"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/state/record"
+)
+
+// NewJSONSerializer will return a serializer for all Signal objects that will
+// be responsible for converting objects to and from JSON bytes.
+func NewJSONSerializer() *Serializer {
+ serializer := NewSerializer()
+
+ serializer.SignalMessage = &JSONSignalMessageSerializer{}
+ serializer.PreKeySignalMessage = &JSONPreKeySignalMessageSerializer{}
+ serializer.SignedPreKeyRecord = &JSONSignedPreKeyRecordSerializer{}
+ serializer.PreKeyRecord = &JSONPreKeyRecordSerializer{}
+ serializer.State = &JSONStateSerializer{}
+ serializer.Session = &JSONSessionSerializer{}
+ serializer.SenderKeyMessage = &JSONSenderKeyMessageSerializer{}
+ serializer.SenderKeyDistributionMessage = &JSONSenderKeyDistributionMessageSerializer{}
+ serializer.SenderKeyRecord = &JSONSenderKeySessionSerializer{}
+ serializer.SenderKeyState = &JSONSenderKeyStateSerializer{}
+
+ return serializer
+}
+
+// JSONSignalMessageSerializer is a structure for serializing signal messages into
+// and from JSON.
+type JSONSignalMessageSerializer struct{}
+
+// Serialize will take a signal message structure and convert it to JSON bytes.
+func (j *JSONSignalMessageSerializer) Serialize(signalMessage *protocol.SignalMessageStructure) []byte {
+ serialized, err := json.Marshal(*signalMessage)
+ if err != nil {
+ logger.Error("Error serializing signal message: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a signal message structure.
+func (j *JSONSignalMessageSerializer) Deserialize(serialized []byte) (*protocol.SignalMessageStructure, error) {
+ var signalMessage protocol.SignalMessageStructure
+ err := json.Unmarshal(serialized, &signalMessage)
+ if err != nil {
+ logger.Error("Error deserializing signal message: ", err)
+ return nil, err
+ }
+
+ return &signalMessage, nil
+}
+
+// JSONPreKeySignalMessageSerializer is a structure for serializing prekey signal messages
+// into and from JSON.
+type JSONPreKeySignalMessageSerializer struct{}
+
+// Serialize will take a prekey signal message structure and convert it to JSON bytes.
+func (j *JSONPreKeySignalMessageSerializer) Serialize(signalMessage *protocol.PreKeySignalMessageStructure) []byte {
+ serialized, err := json.Marshal(signalMessage)
+ if err != nil {
+ logger.Error("Error serializing prekey signal message: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a prekey signal message structure.
+func (j *JSONPreKeySignalMessageSerializer) Deserialize(serialized []byte) (*protocol.PreKeySignalMessageStructure, error) {
+ var preKeySignalMessage protocol.PreKeySignalMessageStructure
+ err := json.Unmarshal(serialized, &preKeySignalMessage)
+ if err != nil {
+ logger.Error("Error deserializing prekey signal message: ", err)
+ return nil, err
+ }
+
+ return &preKeySignalMessage, nil
+}
+
+// JSONSignedPreKeyRecordSerializer is a structure for serializing signed prekey records
+// into and from JSON.
+type JSONSignedPreKeyRecordSerializer struct{}
+
+// Serialize will take a signed prekey record structure and convert it to JSON bytes.
+func (j *JSONSignedPreKeyRecordSerializer) Serialize(signedPreKey *record.SignedPreKeyStructure) []byte {
+ serialized, err := json.Marshal(signedPreKey)
+ if err != nil {
+ logger.Error("Error serializing signed prekey record: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a signed prekey record structure.
+func (j *JSONSignedPreKeyRecordSerializer) Deserialize(serialized []byte) (*record.SignedPreKeyStructure, error) {
+ var signedPreKeyStructure record.SignedPreKeyStructure
+ err := json.Unmarshal(serialized, &signedPreKeyStructure)
+ if err != nil {
+ logger.Error("Error deserializing signed prekey record: ", err)
+ return nil, err
+ }
+
+ return &signedPreKeyStructure, nil
+}
+
+// JSONPreKeyRecordSerializer is a structure for serializing prekey records
+// into and from JSON.
+type JSONPreKeyRecordSerializer struct{}
+
+// Serialize will take a prekey record structure and convert it to JSON bytes.
+func (j *JSONPreKeyRecordSerializer) Serialize(preKey *record.PreKeyStructure) []byte {
+ serialized, err := json.Marshal(preKey)
+ if err != nil {
+ logger.Error("Error serializing prekey record: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a prekey record structure.
+func (j *JSONPreKeyRecordSerializer) Deserialize(serialized []byte) (*record.PreKeyStructure, error) {
+ var preKeyStructure record.PreKeyStructure
+ err := json.Unmarshal(serialized, &preKeyStructure)
+ if err != nil {
+ logger.Error("Error deserializing prekey record: ", err)
+ return nil, err
+ }
+
+ return &preKeyStructure, nil
+}
+
+// JSONStateSerializer is a structure for serializing session states into
+// and from JSON.
+type JSONStateSerializer struct{}
+
+// Serialize will take a session state structure and convert it to JSON bytes.
+func (j *JSONStateSerializer) Serialize(state *record.StateStructure) []byte {
+ serialized, err := json.Marshal(state)
+ if err != nil {
+ logger.Error("Error serializing session state: ", err)
+ }
+ logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a session state structure.
+func (j *JSONStateSerializer) Deserialize(serialized []byte) (*record.StateStructure, error) {
+ var stateStructure record.StateStructure
+ err := json.Unmarshal(serialized, &stateStructure)
+ if err != nil {
+ logger.Error("Error deserializing session state: ", err)
+ return nil, err
+ }
+
+ return &stateStructure, nil
+}
+
+// JSONSessionSerializer is a structure for serializing session records into
+// and from JSON.
+type JSONSessionSerializer struct{}
+
+// Serialize will take a session structure and convert it to JSON bytes.
+func (j *JSONSessionSerializer) Serialize(session *record.SessionStructure) []byte {
+ serialized, err := json.Marshal(session)
+ if err != nil {
+ logger.Error("Error serializing session: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a session structure, which can be
+// used to create a new Session Record object.
+func (j *JSONSessionSerializer) Deserialize(serialized []byte) (*record.SessionStructure, error) {
+ var sessionStructure record.SessionStructure
+ err := json.Unmarshal(serialized, &sessionStructure)
+ if err != nil {
+ logger.Error("Error deserializing session: ", err)
+ return nil, err
+ }
+
+ return &sessionStructure, nil
+}
+
+// JSONSenderKeyDistributionMessageSerializer is a structure for serializing senderkey
+// distribution records to and from JSON.
+type JSONSenderKeyDistributionMessageSerializer struct{}
+
+// Serialize will take a senderkey distribution message and convert it to JSON bytes.
+func (j *JSONSenderKeyDistributionMessageSerializer) Serialize(message *protocol.SenderKeyDistributionMessageStructure) []byte {
+ serialized, err := json.Marshal(message)
+ if err != nil {
+ logger.Error("Error serializing senderkey distribution message: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a message structure, which can be
+// used to create a new SenderKey Distribution object.
+func (j *JSONSenderKeyDistributionMessageSerializer) Deserialize(serialized []byte) (*protocol.SenderKeyDistributionMessageStructure, error) {
+ var msgStructure protocol.SenderKeyDistributionMessageStructure
+ err := json.Unmarshal(serialized, &msgStructure)
+ if err != nil {
+ logger.Error("Error deserializing senderkey distribution message: ", err)
+ return nil, err
+ }
+
+ return &msgStructure, nil
+}
+
+// JSONSenderKeyMessageSerializer is a structure for serializing senderkey
+// messages to and from JSON.
+type JSONSenderKeyMessageSerializer struct{}
+
+// Serialize will take a senderkey message and convert it to JSON bytes.
+func (j *JSONSenderKeyMessageSerializer) Serialize(message *protocol.SenderKeyMessageStructure) []byte {
+ serialized, err := json.Marshal(message)
+ if err != nil {
+ logger.Error("Error serializing senderkey distribution message: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a message structure, which can be
+// used to create a new SenderKey message object.
+func (j *JSONSenderKeyMessageSerializer) Deserialize(serialized []byte) (*protocol.SenderKeyMessageStructure, error) {
+ var msgStructure protocol.SenderKeyMessageStructure
+ err := json.Unmarshal(serialized, &msgStructure)
+ if err != nil {
+ logger.Error("Error deserializing senderkey message: ", err)
+ return nil, err
+ }
+
+ return &msgStructure, nil
+}
+
+// JSONSenderKeyStateSerializer is a structure for serializing group session states into
+// and from JSON.
+type JSONSenderKeyStateSerializer struct{}
+
+// Serialize will take a session state structure and convert it to JSON bytes.
+func (j *JSONSenderKeyStateSerializer) Serialize(state *groupRecord.SenderKeyStateStructure) []byte {
+ serialized, err := json.Marshal(state)
+ if err != nil {
+ logger.Error("Error serializing session state: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a session state structure.
+func (j *JSONSenderKeyStateSerializer) Deserialize(serialized []byte) (*groupRecord.SenderKeyStateStructure, error) {
+ var stateStructure groupRecord.SenderKeyStateStructure
+ err := json.Unmarshal(serialized, &stateStructure)
+ if err != nil {
+ logger.Error("Error deserializing session state: ", err)
+ return nil, err
+ }
+
+ return &stateStructure, nil
+}
+
+// JSONSenderKeySessionSerializer is a structure for serializing session records into
+// and from JSON.
+type JSONSenderKeySessionSerializer struct{}
+
+// Serialize will take a session structure and convert it to JSON bytes.
+func (j *JSONSenderKeySessionSerializer) Serialize(session *groupRecord.SenderKeyStructure) []byte {
+ serialized, err := json.Marshal(session)
+ if err != nil {
+ logger.Error("Error serializing session: ", err)
+ }
+ // logger.Debug("Serialize result: ", string(serialized))
+
+ return serialized
+}
+
+// Deserialize will take in JSON bytes and return a session structure, which can be
+// used to create a new Session Record object.
+func (j *JSONSenderKeySessionSerializer) Deserialize(serialized []byte) (*groupRecord.SenderKeyStructure, error) {
+ var sessionStructure groupRecord.SenderKeyStructure
+ err := json.Unmarshal(serialized, &sessionStructure)
+ if err != nil {
+ logger.Error("Error deserializing session: ", err)
+ return nil, err
+ }
+
+ return &sessionStructure, nil
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go b/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go
new file mode 100644
index 00000000..e7097399
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go
@@ -0,0 +1,1500 @@
+// From https://github.com/signalapp/libsignal-protocol-c/blob/master/protobuf/LocalStorageProtocol.proto
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.12.4
+// source: serialize/LocalStorageProtocol.proto
+
+package serialize
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SessionStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SessionVersion *uint32 `protobuf:"varint,1,opt,name=sessionVersion" json:"sessionVersion,omitempty"`
+ LocalIdentityPublic []byte `protobuf:"bytes,2,opt,name=localIdentityPublic" json:"localIdentityPublic,omitempty"`
+ RemoteIdentityPublic []byte `protobuf:"bytes,3,opt,name=remoteIdentityPublic" json:"remoteIdentityPublic,omitempty"`
+ RootKey []byte `protobuf:"bytes,4,opt,name=rootKey" json:"rootKey,omitempty"`
+ PreviousCounter *uint32 `protobuf:"varint,5,opt,name=previousCounter" json:"previousCounter,omitempty"`
+ SenderChain *SessionStructure_Chain `protobuf:"bytes,6,opt,name=senderChain" json:"senderChain,omitempty"`
+ ReceiverChains []*SessionStructure_Chain `protobuf:"bytes,7,rep,name=receiverChains" json:"receiverChains,omitempty"`
+ PendingKeyExchange *SessionStructure_PendingKeyExchange `protobuf:"bytes,8,opt,name=pendingKeyExchange" json:"pendingKeyExchange,omitempty"`
+ PendingPreKey *SessionStructure_PendingPreKey `protobuf:"bytes,9,opt,name=pendingPreKey" json:"pendingPreKey,omitempty"`
+ RemoteRegistrationId *uint32 `protobuf:"varint,10,opt,name=remoteRegistrationId" json:"remoteRegistrationId,omitempty"`
+ LocalRegistrationId *uint32 `protobuf:"varint,11,opt,name=localRegistrationId" json:"localRegistrationId,omitempty"`
+ NeedsRefresh *bool `protobuf:"varint,12,opt,name=needsRefresh" json:"needsRefresh,omitempty"`
+ AliceBaseKey []byte `protobuf:"bytes,13,opt,name=aliceBaseKey" json:"aliceBaseKey,omitempty"`
+}
+
+func (x *SessionStructure) Reset() {
+ *x = SessionStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SessionStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStructure) ProtoMessage() {}
+
+func (x *SessionStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_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 SessionStructure.ProtoReflect.Descriptor instead.
+func (*SessionStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SessionStructure) GetSessionVersion() uint32 {
+ if x != nil && x.SessionVersion != nil {
+ return *x.SessionVersion
+ }
+ return 0
+}
+
+func (x *SessionStructure) GetLocalIdentityPublic() []byte {
+ if x != nil {
+ return x.LocalIdentityPublic
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetRemoteIdentityPublic() []byte {
+ if x != nil {
+ return x.RemoteIdentityPublic
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetRootKey() []byte {
+ if x != nil {
+ return x.RootKey
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetPreviousCounter() uint32 {
+ if x != nil && x.PreviousCounter != nil {
+ return *x.PreviousCounter
+ }
+ return 0
+}
+
+func (x *SessionStructure) GetSenderChain() *SessionStructure_Chain {
+ if x != nil {
+ return x.SenderChain
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetReceiverChains() []*SessionStructure_Chain {
+ if x != nil {
+ return x.ReceiverChains
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetPendingKeyExchange() *SessionStructure_PendingKeyExchange {
+ if x != nil {
+ return x.PendingKeyExchange
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetPendingPreKey() *SessionStructure_PendingPreKey {
+ if x != nil {
+ return x.PendingPreKey
+ }
+ return nil
+}
+
+func (x *SessionStructure) GetRemoteRegistrationId() uint32 {
+ if x != nil && x.RemoteRegistrationId != nil {
+ return *x.RemoteRegistrationId
+ }
+ return 0
+}
+
+func (x *SessionStructure) GetLocalRegistrationId() uint32 {
+ if x != nil && x.LocalRegistrationId != nil {
+ return *x.LocalRegistrationId
+ }
+ return 0
+}
+
+func (x *SessionStructure) GetNeedsRefresh() bool {
+ if x != nil && x.NeedsRefresh != nil {
+ return *x.NeedsRefresh
+ }
+ return false
+}
+
+func (x *SessionStructure) GetAliceBaseKey() []byte {
+ if x != nil {
+ return x.AliceBaseKey
+ }
+ return nil
+}
+
+type RecordStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CurrentSession *SessionStructure `protobuf:"bytes,1,opt,name=currentSession" json:"currentSession,omitempty"`
+ PreviousSessions []*SessionStructure `protobuf:"bytes,2,rep,name=previousSessions" json:"previousSessions,omitempty"`
+}
+
+func (x *RecordStructure) Reset() {
+ *x = RecordStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecordStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecordStructure) ProtoMessage() {}
+
+func (x *RecordStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_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 RecordStructure.ProtoReflect.Descriptor instead.
+func (*RecordStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RecordStructure) GetCurrentSession() *SessionStructure {
+ if x != nil {
+ return x.CurrentSession
+ }
+ return nil
+}
+
+func (x *RecordStructure) GetPreviousSessions() []*SessionStructure {
+ if x != nil {
+ return x.PreviousSessions
+ }
+ return nil
+}
+
+type PreKeyRecordStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ PublicKey []byte `protobuf:"bytes,2,opt,name=publicKey" json:"publicKey,omitempty"`
+ PrivateKey []byte `protobuf:"bytes,3,opt,name=privateKey" json:"privateKey,omitempty"`
+}
+
+func (x *PreKeyRecordStructure) Reset() {
+ *x = PreKeyRecordStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PreKeyRecordStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PreKeyRecordStructure) ProtoMessage() {}
+
+func (x *PreKeyRecordStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_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 PreKeyRecordStructure.ProtoReflect.Descriptor instead.
+func (*PreKeyRecordStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *PreKeyRecordStructure) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *PreKeyRecordStructure) GetPublicKey() []byte {
+ if x != nil {
+ return x.PublicKey
+ }
+ return nil
+}
+
+func (x *PreKeyRecordStructure) GetPrivateKey() []byte {
+ if x != nil {
+ return x.PrivateKey
+ }
+ return nil
+}
+
+type SignedPreKeyRecordStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ PublicKey []byte `protobuf:"bytes,2,opt,name=publicKey" json:"publicKey,omitempty"`
+ PrivateKey []byte `protobuf:"bytes,3,opt,name=privateKey" json:"privateKey,omitempty"`
+ Signature []byte `protobuf:"bytes,4,opt,name=signature" json:"signature,omitempty"`
+ Timestamp *uint64 `protobuf:"fixed64,5,opt,name=timestamp" json:"timestamp,omitempty"`
+}
+
+func (x *SignedPreKeyRecordStructure) Reset() {
+ *x = SignedPreKeyRecordStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SignedPreKeyRecordStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SignedPreKeyRecordStructure) ProtoMessage() {}
+
+func (x *SignedPreKeyRecordStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_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 SignedPreKeyRecordStructure.ProtoReflect.Descriptor instead.
+func (*SignedPreKeyRecordStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *SignedPreKeyRecordStructure) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *SignedPreKeyRecordStructure) GetPublicKey() []byte {
+ if x != nil {
+ return x.PublicKey
+ }
+ return nil
+}
+
+func (x *SignedPreKeyRecordStructure) GetPrivateKey() []byte {
+ if x != nil {
+ return x.PrivateKey
+ }
+ return nil
+}
+
+func (x *SignedPreKeyRecordStructure) GetSignature() []byte {
+ if x != nil {
+ return x.Signature
+ }
+ return nil
+}
+
+func (x *SignedPreKeyRecordStructure) GetTimestamp() uint64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+type IdentityKeyPairStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PublicKey []byte `protobuf:"bytes,1,opt,name=publicKey" json:"publicKey,omitempty"`
+ PrivateKey []byte `protobuf:"bytes,2,opt,name=privateKey" json:"privateKey,omitempty"`
+}
+
+func (x *IdentityKeyPairStructure) Reset() {
+ *x = IdentityKeyPairStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IdentityKeyPairStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IdentityKeyPairStructure) ProtoMessage() {}
+
+func (x *IdentityKeyPairStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_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 IdentityKeyPairStructure.ProtoReflect.Descriptor instead.
+func (*IdentityKeyPairStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *IdentityKeyPairStructure) GetPublicKey() []byte {
+ if x != nil {
+ return x.PublicKey
+ }
+ return nil
+}
+
+func (x *IdentityKeyPairStructure) GetPrivateKey() []byte {
+ if x != nil {
+ return x.PrivateKey
+ }
+ return nil
+}
+
+type SenderKeyStateStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SenderKeyId *uint32 `protobuf:"varint,1,opt,name=senderKeyId" json:"senderKeyId,omitempty"`
+ SenderChainKey *SenderKeyStateStructure_SenderChainKey `protobuf:"bytes,2,opt,name=senderChainKey" json:"senderChainKey,omitempty"`
+ SenderSigningKey *SenderKeyStateStructure_SenderSigningKey `protobuf:"bytes,3,opt,name=senderSigningKey" json:"senderSigningKey,omitempty"`
+ SenderMessageKeys []*SenderKeyStateStructure_SenderMessageKey `protobuf:"bytes,4,rep,name=senderMessageKeys" json:"senderMessageKeys,omitempty"`
+}
+
+func (x *SenderKeyStateStructure) Reset() {
+ *x = SenderKeyStateStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyStateStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyStateStructure) ProtoMessage() {}
+
+func (x *SenderKeyStateStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_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 SenderKeyStateStructure.ProtoReflect.Descriptor instead.
+func (*SenderKeyStateStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *SenderKeyStateStructure) GetSenderKeyId() uint32 {
+ if x != nil && x.SenderKeyId != nil {
+ return *x.SenderKeyId
+ }
+ return 0
+}
+
+func (x *SenderKeyStateStructure) GetSenderChainKey() *SenderKeyStateStructure_SenderChainKey {
+ if x != nil {
+ return x.SenderChainKey
+ }
+ return nil
+}
+
+func (x *SenderKeyStateStructure) GetSenderSigningKey() *SenderKeyStateStructure_SenderSigningKey {
+ if x != nil {
+ return x.SenderSigningKey
+ }
+ return nil
+}
+
+func (x *SenderKeyStateStructure) GetSenderMessageKeys() []*SenderKeyStateStructure_SenderMessageKey {
+ if x != nil {
+ return x.SenderMessageKeys
+ }
+ return nil
+}
+
+type SenderKeyRecordStructure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SenderKeyStates []*SenderKeyStateStructure `protobuf:"bytes,1,rep,name=senderKeyStates" json:"senderKeyStates,omitempty"`
+}
+
+func (x *SenderKeyRecordStructure) Reset() {
+ *x = SenderKeyRecordStructure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyRecordStructure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyRecordStructure) ProtoMessage() {}
+
+func (x *SenderKeyRecordStructure) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SenderKeyRecordStructure.ProtoReflect.Descriptor instead.
+func (*SenderKeyRecordStructure) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *SenderKeyRecordStructure) GetSenderKeyStates() []*SenderKeyStateStructure {
+ if x != nil {
+ return x.SenderKeyStates
+ }
+ return nil
+}
+
+type SessionStructure_Chain struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SenderRatchetKey []byte `protobuf:"bytes,1,opt,name=senderRatchetKey" json:"senderRatchetKey,omitempty"`
+ SenderRatchetKeyPrivate []byte `protobuf:"bytes,2,opt,name=senderRatchetKeyPrivate" json:"senderRatchetKeyPrivate,omitempty"`
+ ChainKey *SessionStructure_Chain_ChainKey `protobuf:"bytes,3,opt,name=chainKey" json:"chainKey,omitempty"`
+ MessageKeys []*SessionStructure_Chain_MessageKey `protobuf:"bytes,4,rep,name=messageKeys" json:"messageKeys,omitempty"`
+}
+
+func (x *SessionStructure_Chain) Reset() {
+ *x = SessionStructure_Chain{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SessionStructure_Chain) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStructure_Chain) ProtoMessage() {}
+
+func (x *SessionStructure_Chain) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SessionStructure_Chain.ProtoReflect.Descriptor instead.
+func (*SessionStructure_Chain) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *SessionStructure_Chain) GetSenderRatchetKey() []byte {
+ if x != nil {
+ return x.SenderRatchetKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_Chain) GetSenderRatchetKeyPrivate() []byte {
+ if x != nil {
+ return x.SenderRatchetKeyPrivate
+ }
+ return nil
+}
+
+func (x *SessionStructure_Chain) GetChainKey() *SessionStructure_Chain_ChainKey {
+ if x != nil {
+ return x.ChainKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_Chain) GetMessageKeys() []*SessionStructure_Chain_MessageKey {
+ if x != nil {
+ return x.MessageKeys
+ }
+ return nil
+}
+
+type SessionStructure_PendingKeyExchange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Sequence *uint32 `protobuf:"varint,1,opt,name=sequence" json:"sequence,omitempty"`
+ LocalBaseKey []byte `protobuf:"bytes,2,opt,name=localBaseKey" json:"localBaseKey,omitempty"`
+ LocalBaseKeyPrivate []byte `protobuf:"bytes,3,opt,name=localBaseKeyPrivate" json:"localBaseKeyPrivate,omitempty"`
+ LocalRatchetKey []byte `protobuf:"bytes,4,opt,name=localRatchetKey" json:"localRatchetKey,omitempty"`
+ LocalRatchetKeyPrivate []byte `protobuf:"bytes,5,opt,name=localRatchetKeyPrivate" json:"localRatchetKeyPrivate,omitempty"`
+ LocalIdentityKey []byte `protobuf:"bytes,7,opt,name=localIdentityKey" json:"localIdentityKey,omitempty"`
+ LocalIdentityKeyPrivate []byte `protobuf:"bytes,8,opt,name=localIdentityKeyPrivate" json:"localIdentityKeyPrivate,omitempty"`
+}
+
+func (x *SessionStructure_PendingKeyExchange) Reset() {
+ *x = SessionStructure_PendingKeyExchange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SessionStructure_PendingKeyExchange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStructure_PendingKeyExchange) ProtoMessage() {}
+
+func (x *SessionStructure_PendingKeyExchange) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SessionStructure_PendingKeyExchange.ProtoReflect.Descriptor instead.
+func (*SessionStructure_PendingKeyExchange) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{0, 1}
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetSequence() uint32 {
+ if x != nil && x.Sequence != nil {
+ return *x.Sequence
+ }
+ return 0
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetLocalBaseKey() []byte {
+ if x != nil {
+ return x.LocalBaseKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetLocalBaseKeyPrivate() []byte {
+ if x != nil {
+ return x.LocalBaseKeyPrivate
+ }
+ return nil
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetLocalRatchetKey() []byte {
+ if x != nil {
+ return x.LocalRatchetKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetLocalRatchetKeyPrivate() []byte {
+ if x != nil {
+ return x.LocalRatchetKeyPrivate
+ }
+ return nil
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetLocalIdentityKey() []byte {
+ if x != nil {
+ return x.LocalIdentityKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_PendingKeyExchange) GetLocalIdentityKeyPrivate() []byte {
+ if x != nil {
+ return x.LocalIdentityKeyPrivate
+ }
+ return nil
+}
+
+type SessionStructure_PendingPreKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PreKeyId *uint32 `protobuf:"varint,1,opt,name=preKeyId" json:"preKeyId,omitempty"`
+ SignedPreKeyId *int32 `protobuf:"varint,3,opt,name=signedPreKeyId" json:"signedPreKeyId,omitempty"`
+ BaseKey []byte `protobuf:"bytes,2,opt,name=baseKey" json:"baseKey,omitempty"`
+}
+
+func (x *SessionStructure_PendingPreKey) Reset() {
+ *x = SessionStructure_PendingPreKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SessionStructure_PendingPreKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStructure_PendingPreKey) ProtoMessage() {}
+
+func (x *SessionStructure_PendingPreKey) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SessionStructure_PendingPreKey.ProtoReflect.Descriptor instead.
+func (*SessionStructure_PendingPreKey) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{0, 2}
+}
+
+func (x *SessionStructure_PendingPreKey) GetPreKeyId() uint32 {
+ if x != nil && x.PreKeyId != nil {
+ return *x.PreKeyId
+ }
+ return 0
+}
+
+func (x *SessionStructure_PendingPreKey) GetSignedPreKeyId() int32 {
+ if x != nil && x.SignedPreKeyId != nil {
+ return *x.SignedPreKeyId
+ }
+ return 0
+}
+
+func (x *SessionStructure_PendingPreKey) GetBaseKey() []byte {
+ if x != nil {
+ return x.BaseKey
+ }
+ return nil
+}
+
+type SessionStructure_Chain_ChainKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
+ Key []byte `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
+}
+
+func (x *SessionStructure_Chain_ChainKey) Reset() {
+ *x = SessionStructure_Chain_ChainKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SessionStructure_Chain_ChainKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStructure_Chain_ChainKey) ProtoMessage() {}
+
+func (x *SessionStructure_Chain_ChainKey) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SessionStructure_Chain_ChainKey.ProtoReflect.Descriptor instead.
+func (*SessionStructure_Chain_ChainKey) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{0, 0, 0}
+}
+
+func (x *SessionStructure_Chain_ChainKey) GetIndex() uint32 {
+ if x != nil && x.Index != nil {
+ return *x.Index
+ }
+ return 0
+}
+
+func (x *SessionStructure_Chain_ChainKey) GetKey() []byte {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+type SessionStructure_Chain_MessageKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
+ CipherKey []byte `protobuf:"bytes,2,opt,name=cipherKey" json:"cipherKey,omitempty"`
+ MacKey []byte `protobuf:"bytes,3,opt,name=macKey" json:"macKey,omitempty"`
+ Iv []byte `protobuf:"bytes,4,opt,name=iv" json:"iv,omitempty"`
+}
+
+func (x *SessionStructure_Chain_MessageKey) Reset() {
+ *x = SessionStructure_Chain_MessageKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SessionStructure_Chain_MessageKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStructure_Chain_MessageKey) ProtoMessage() {}
+
+func (x *SessionStructure_Chain_MessageKey) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[11]
+ 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 SessionStructure_Chain_MessageKey.ProtoReflect.Descriptor instead.
+func (*SessionStructure_Chain_MessageKey) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{0, 0, 1}
+}
+
+func (x *SessionStructure_Chain_MessageKey) GetIndex() uint32 {
+ if x != nil && x.Index != nil {
+ return *x.Index
+ }
+ return 0
+}
+
+func (x *SessionStructure_Chain_MessageKey) GetCipherKey() []byte {
+ if x != nil {
+ return x.CipherKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_Chain_MessageKey) GetMacKey() []byte {
+ if x != nil {
+ return x.MacKey
+ }
+ return nil
+}
+
+func (x *SessionStructure_Chain_MessageKey) GetIv() []byte {
+ if x != nil {
+ return x.Iv
+ }
+ return nil
+}
+
+type SenderKeyStateStructure_SenderChainKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Iteration *uint32 `protobuf:"varint,1,opt,name=iteration" json:"iteration,omitempty"`
+ Seed []byte `protobuf:"bytes,2,opt,name=seed" json:"seed,omitempty"`
+}
+
+func (x *SenderKeyStateStructure_SenderChainKey) Reset() {
+ *x = SenderKeyStateStructure_SenderChainKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyStateStructure_SenderChainKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyStateStructure_SenderChainKey) ProtoMessage() {}
+
+func (x *SenderKeyStateStructure_SenderChainKey) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[12]
+ 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 SenderKeyStateStructure_SenderChainKey.ProtoReflect.Descriptor instead.
+func (*SenderKeyStateStructure_SenderChainKey) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{5, 0}
+}
+
+func (x *SenderKeyStateStructure_SenderChainKey) GetIteration() uint32 {
+ if x != nil && x.Iteration != nil {
+ return *x.Iteration
+ }
+ return 0
+}
+
+func (x *SenderKeyStateStructure_SenderChainKey) GetSeed() []byte {
+ if x != nil {
+ return x.Seed
+ }
+ return nil
+}
+
+type SenderKeyStateStructure_SenderMessageKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Iteration *uint32 `protobuf:"varint,1,opt,name=iteration" json:"iteration,omitempty"`
+ Seed []byte `protobuf:"bytes,2,opt,name=seed" json:"seed,omitempty"`
+}
+
+func (x *SenderKeyStateStructure_SenderMessageKey) Reset() {
+ *x = SenderKeyStateStructure_SenderMessageKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyStateStructure_SenderMessageKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyStateStructure_SenderMessageKey) ProtoMessage() {}
+
+func (x *SenderKeyStateStructure_SenderMessageKey) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[13]
+ 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 SenderKeyStateStructure_SenderMessageKey.ProtoReflect.Descriptor instead.
+func (*SenderKeyStateStructure_SenderMessageKey) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{5, 1}
+}
+
+func (x *SenderKeyStateStructure_SenderMessageKey) GetIteration() uint32 {
+ if x != nil && x.Iteration != nil {
+ return *x.Iteration
+ }
+ return 0
+}
+
+func (x *SenderKeyStateStructure_SenderMessageKey) GetSeed() []byte {
+ if x != nil {
+ return x.Seed
+ }
+ return nil
+}
+
+type SenderKeyStateStructure_SenderSigningKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Public []byte `protobuf:"bytes,1,opt,name=public" json:"public,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private" json:"private,omitempty"`
+}
+
+func (x *SenderKeyStateStructure_SenderSigningKey) Reset() {
+ *x = SenderKeyStateStructure_SenderSigningKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyStateStructure_SenderSigningKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyStateStructure_SenderSigningKey) ProtoMessage() {}
+
+func (x *SenderKeyStateStructure_SenderSigningKey) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_LocalStorageProtocol_proto_msgTypes[14]
+ 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 SenderKeyStateStructure_SenderSigningKey.ProtoReflect.Descriptor instead.
+func (*SenderKeyStateStructure_SenderSigningKey) Descriptor() ([]byte, []int) {
+ return file_serialize_LocalStorageProtocol_proto_rawDescGZIP(), []int{5, 2}
+}
+
+func (x *SenderKeyStateStructure_SenderSigningKey) GetPublic() []byte {
+ if x != nil {
+ return x.Public
+ }
+ return nil
+}
+
+func (x *SenderKeyStateStructure_SenderSigningKey) GetPrivate() []byte {
+ if x != nil {
+ return x.Private
+ }
+ return nil
+}
+
+var File_serialize_LocalStorageProtocol_proto protoreflect.FileDescriptor
+
+var file_serialize_LocalStorageProtocol_proto_rawDesc = []byte{
+ 0x0a, 0x24, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x2f, 0x4c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75,
+ 0x72, 0x65, 0x22, 0xbf, 0x0c, 0x0a, 0x10, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69,
+ 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x30, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+ 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x6c, 0x6f,
+ 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69,
+ 0x63, 0x12, 0x32, 0x0a, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
+ 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
+ 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x4b, 0x65, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x4b, 0x65, 0x79, 0x12,
+ 0x28, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+ 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f,
+ 0x75, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0b, 0x73, 0x65, 0x6e,
+ 0x64, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
+ 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73,
+ 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x68, 0x61,
+ 0x69, 0x6e, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12,
+ 0x4a, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e,
+ 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65,
+ 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x63,
+ 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x5f, 0x0a, 0x12, 0x70,
+ 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
+ 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65,
+ 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79,
+ 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e,
+ 0x67, 0x4b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0d,
+ 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65,
+ 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72,
+ 0x65, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52,
+ 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x32,
+ 0x0a, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x66,
+ 0x72, 0x65, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x65, 0x64,
+ 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x6c, 0x69, 0x63,
+ 0x65, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c,
+ 0x61, 0x6c, 0x69, 0x63, 0x65, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x1a, 0xa5, 0x03, 0x0a,
+ 0x05, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72,
+ 0x52, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b,
+ 0x65, 0x79, 0x12, 0x38, 0x0a, 0x17, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x17, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x74, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x08,
+ 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
+ 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73,
+ 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x68, 0x61,
+ 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x08, 0x63, 0x68, 0x61,
+ 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x4b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x1a, 0x32, 0x0a, 0x08, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x68, 0x0a, 0x0a, 0x4d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c,
+ 0x0a, 0x09, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x09, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06,
+ 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61,
+ 0x63, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x02, 0x69, 0x76, 0x1a, 0xce, 0x02, 0x0a, 0x12, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
+ 0x4b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73,
+ 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73,
+ 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x6c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42,
+ 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a,
+ 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x52, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12,
+ 0x2a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+ 0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x17, 0x6c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x50,
+ 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x6c, 0x6f,
+ 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x50, 0x72,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x6d, 0x0a, 0x0d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
+ 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x4b, 0x65, 0x79,
+ 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x65, 0x4b, 0x65, 0x79,
+ 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x4b,
+ 0x65, 0x79, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e,
+ 0x65, 0x64, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61,
+ 0x73, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x61, 0x73,
+ 0x65, 0x4b, 0x65, 0x79, 0x22, 0xa1, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72,
+ 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65,
+ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0e,
+ 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x48,
+ 0x0a, 0x10, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x10, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
+ 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x65, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x4b,
+ 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22,
+ 0xa7, 0x01, 0x0a, 0x1b, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79,
+ 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a,
+ 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x52, 0x09,
+ 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x58, 0x0a, 0x18, 0x49, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b,
+ 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
+ 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65,
+ 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x4b, 0x65, 0x79, 0x22, 0xad, 0x04, 0x0a, 0x17, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65,
+ 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12,
+ 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x49,
+ 0x64, 0x12, 0x5a, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e,
+ 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x65, 0x78, 0x74,
+ 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79,
+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x53,
+ 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x0e, 0x73,
+ 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x60, 0x0a,
+ 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65,
+ 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65,
+ 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x74,
+ 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6e,
+ 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x52, 0x10, 0x73,
+ 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12,
+ 0x62, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x4b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x65, 0x78,
+ 0x74, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65,
+ 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e,
+ 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79,
+ 0x52, 0x11, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b,
+ 0x65, 0x79, 0x73, 0x1a, 0x42, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x68, 0x61,
+ 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x1a, 0x44, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x65,
+ 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69,
+ 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09,
+ 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x1a, 0x44, 0x0a,
+ 0x10, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65,
+ 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76,
+ 0x61, 0x74, 0x65, 0x22, 0x69, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79,
+ 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12,
+ 0x4d, 0x0a, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x73,
+ 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53,
+ 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0f, 0x73,
+ 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x42, 0x33,
+ 0x0a, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x68, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x79, 0x73,
+ 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x6c, 0x69, 0x62, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x42, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x73,
+}
+
+var (
+ file_serialize_LocalStorageProtocol_proto_rawDescOnce sync.Once
+ file_serialize_LocalStorageProtocol_proto_rawDescData = file_serialize_LocalStorageProtocol_proto_rawDesc
+)
+
+func file_serialize_LocalStorageProtocol_proto_rawDescGZIP() []byte {
+ file_serialize_LocalStorageProtocol_proto_rawDescOnce.Do(func() {
+ file_serialize_LocalStorageProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_serialize_LocalStorageProtocol_proto_rawDescData)
+ })
+ return file_serialize_LocalStorageProtocol_proto_rawDescData
+}
+
+var file_serialize_LocalStorageProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_serialize_LocalStorageProtocol_proto_goTypes = []interface{}{
+ (*SessionStructure)(nil), // 0: textsecure.SessionStructure
+ (*RecordStructure)(nil), // 1: textsecure.RecordStructure
+ (*PreKeyRecordStructure)(nil), // 2: textsecure.PreKeyRecordStructure
+ (*SignedPreKeyRecordStructure)(nil), // 3: textsecure.SignedPreKeyRecordStructure
+ (*IdentityKeyPairStructure)(nil), // 4: textsecure.IdentityKeyPairStructure
+ (*SenderKeyStateStructure)(nil), // 5: textsecure.SenderKeyStateStructure
+ (*SenderKeyRecordStructure)(nil), // 6: textsecure.SenderKeyRecordStructure
+ (*SessionStructure_Chain)(nil), // 7: textsecure.SessionStructure.Chain
+ (*SessionStructure_PendingKeyExchange)(nil), // 8: textsecure.SessionStructure.PendingKeyExchange
+ (*SessionStructure_PendingPreKey)(nil), // 9: textsecure.SessionStructure.PendingPreKey
+ (*SessionStructure_Chain_ChainKey)(nil), // 10: textsecure.SessionStructure.Chain.ChainKey
+ (*SessionStructure_Chain_MessageKey)(nil), // 11: textsecure.SessionStructure.Chain.MessageKey
+ (*SenderKeyStateStructure_SenderChainKey)(nil), // 12: textsecure.SenderKeyStateStructure.SenderChainKey
+ (*SenderKeyStateStructure_SenderMessageKey)(nil), // 13: textsecure.SenderKeyStateStructure.SenderMessageKey
+ (*SenderKeyStateStructure_SenderSigningKey)(nil), // 14: textsecure.SenderKeyStateStructure.SenderSigningKey
+}
+var file_serialize_LocalStorageProtocol_proto_depIdxs = []int32{
+ 7, // 0: textsecure.SessionStructure.senderChain:type_name -> textsecure.SessionStructure.Chain
+ 7, // 1: textsecure.SessionStructure.receiverChains:type_name -> textsecure.SessionStructure.Chain
+ 8, // 2: textsecure.SessionStructure.pendingKeyExchange:type_name -> textsecure.SessionStructure.PendingKeyExchange
+ 9, // 3: textsecure.SessionStructure.pendingPreKey:type_name -> textsecure.SessionStructure.PendingPreKey
+ 0, // 4: textsecure.RecordStructure.currentSession:type_name -> textsecure.SessionStructure
+ 0, // 5: textsecure.RecordStructure.previousSessions:type_name -> textsecure.SessionStructure
+ 12, // 6: textsecure.SenderKeyStateStructure.senderChainKey:type_name -> textsecure.SenderKeyStateStructure.SenderChainKey
+ 14, // 7: textsecure.SenderKeyStateStructure.senderSigningKey:type_name -> textsecure.SenderKeyStateStructure.SenderSigningKey
+ 13, // 8: textsecure.SenderKeyStateStructure.senderMessageKeys:type_name -> textsecure.SenderKeyStateStructure.SenderMessageKey
+ 5, // 9: textsecure.SenderKeyRecordStructure.senderKeyStates:type_name -> textsecure.SenderKeyStateStructure
+ 10, // 10: textsecure.SessionStructure.Chain.chainKey:type_name -> textsecure.SessionStructure.Chain.ChainKey
+ 11, // 11: textsecure.SessionStructure.Chain.messageKeys:type_name -> textsecure.SessionStructure.Chain.MessageKey
+ 12, // [12:12] is the sub-list for method output_type
+ 12, // [12:12] is the sub-list for method input_type
+ 12, // [12:12] is the sub-list for extension type_name
+ 12, // [12:12] is the sub-list for extension extendee
+ 0, // [0:12] is the sub-list for field type_name
+}
+
+func init() { file_serialize_LocalStorageProtocol_proto_init() }
+func file_serialize_LocalStorageProtocol_proto_init() {
+ if File_serialize_LocalStorageProtocol_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_serialize_LocalStorageProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SessionStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecordStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PreKeyRecordStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SignedPreKeyRecordStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IdentityKeyPairStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyStateStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyRecordStructure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SessionStructure_Chain); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SessionStructure_PendingKeyExchange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SessionStructure_PendingPreKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SessionStructure_Chain_ChainKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SessionStructure_Chain_MessageKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyStateStructure_SenderChainKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyStateStructure_SenderMessageKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_LocalStorageProtocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyStateStructure_SenderSigningKey); 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_serialize_LocalStorageProtocol_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 15,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_serialize_LocalStorageProtocol_proto_goTypes,
+ DependencyIndexes: file_serialize_LocalStorageProtocol_proto_depIdxs,
+ MessageInfos: file_serialize_LocalStorageProtocol_proto_msgTypes,
+ }.Build()
+ File_serialize_LocalStorageProtocol_proto = out.File
+ file_serialize_LocalStorageProtocol_proto_rawDesc = nil
+ file_serialize_LocalStorageProtocol_proto_goTypes = nil
+ file_serialize_LocalStorageProtocol_proto_depIdxs = nil
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.proto b/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.proto
new file mode 100644
index 00000000..8ae9c01a
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.proto
@@ -0,0 +1,114 @@
+// From https://github.com/signalapp/libsignal-protocol-c/blob/master/protobuf/LocalStorageProtocol.proto
+syntax = "proto2";
+package textsecure;
+
+option java_package = "org.whispersystems.libsignal.state";
+option java_outer_classname = "StorageProtos";
+
+message SessionStructure {
+ message Chain {
+ optional bytes senderRatchetKey = 1;
+ optional bytes senderRatchetKeyPrivate = 2;
+
+ message ChainKey {
+ optional uint32 index = 1;
+ optional bytes key = 2;
+ }
+
+ optional ChainKey chainKey = 3;
+
+ message MessageKey {
+ optional uint32 index = 1;
+ optional bytes cipherKey = 2;
+ optional bytes macKey = 3;
+ optional bytes iv = 4;
+ }
+
+ repeated MessageKey messageKeys = 4;
+ }
+
+ message PendingKeyExchange {
+ optional uint32 sequence = 1;
+ optional bytes localBaseKey = 2;
+ optional bytes localBaseKeyPrivate = 3;
+ optional bytes localRatchetKey = 4;
+ optional bytes localRatchetKeyPrivate = 5;
+ optional bytes localIdentityKey = 7;
+ optional bytes localIdentityKeyPrivate = 8;
+ }
+
+ message PendingPreKey {
+ optional uint32 preKeyId = 1;
+ optional int32 signedPreKeyId = 3;
+ optional bytes baseKey = 2;
+ }
+
+ optional uint32 sessionVersion = 1;
+ optional bytes localIdentityPublic = 2;
+ optional bytes remoteIdentityPublic = 3;
+
+ optional bytes rootKey = 4;
+ optional uint32 previousCounter = 5;
+
+ optional Chain senderChain = 6;
+ repeated Chain receiverChains = 7;
+
+ optional PendingKeyExchange pendingKeyExchange = 8;
+ optional PendingPreKey pendingPreKey = 9;
+
+ optional uint32 remoteRegistrationId = 10;
+ optional uint32 localRegistrationId = 11;
+
+ optional bool needsRefresh = 12;
+ optional bytes aliceBaseKey = 13;
+}
+
+message RecordStructure {
+ optional SessionStructure currentSession = 1;
+ repeated SessionStructure previousSessions = 2;
+}
+
+message PreKeyRecordStructure {
+ optional uint32 id = 1;
+ optional bytes publicKey = 2;
+ optional bytes privateKey = 3;
+}
+
+message SignedPreKeyRecordStructure {
+ optional uint32 id = 1;
+ optional bytes publicKey = 2;
+ optional bytes privateKey = 3;
+ optional bytes signature = 4;
+ optional fixed64 timestamp = 5;
+}
+
+message IdentityKeyPairStructure {
+ optional bytes publicKey = 1;
+ optional bytes privateKey = 2;
+}
+
+message SenderKeyStateStructure {
+ message SenderChainKey {
+ optional uint32 iteration = 1;
+ optional bytes seed = 2;
+ }
+
+ message SenderMessageKey {
+ optional uint32 iteration = 1;
+ optional bytes seed = 2;
+ }
+
+ message SenderSigningKey {
+ optional bytes public = 1;
+ optional bytes private = 2;
+ }
+
+ optional uint32 senderKeyId = 1;
+ optional SenderChainKey senderChainKey = 2;
+ optional SenderSigningKey senderSigningKey = 3;
+ repeated SenderMessageKey senderMessageKeys = 4;
+}
+
+message SenderKeyRecordStructure {
+ repeated SenderKeyStateStructure senderKeyStates = 1;
+} \ No newline at end of file
diff --git a/vendor/go.mau.fi/libsignal/serialize/ProtoBufferSerializer.go b/vendor/go.mau.fi/libsignal/serialize/ProtoBufferSerializer.go
new file mode 100644
index 00000000..81482d31
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/ProtoBufferSerializer.go
@@ -0,0 +1,262 @@
+package serialize
+
+import (
+ "fmt"
+ "strconv"
+
+ "go.mau.fi/libsignal/logger"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/util/bytehelper"
+ "go.mau.fi/libsignal/util/optional"
+ proto "google.golang.org/protobuf/proto"
+)
+
+// NewProtoBufSerializer will return a serializer for all Signal objects that will
+// be responsible for converting objects to and from ProtoBuf bytes.
+func NewProtoBufSerializer() *Serializer {
+ serializer := NewSerializer()
+
+ serializer.SignalMessage = &ProtoBufSignalMessageSerializer{}
+ serializer.PreKeySignalMessage = &ProtoBufPreKeySignalMessageSerializer{}
+ serializer.SenderKeyMessage = &ProtoBufSenderKeyMessageSerializer{}
+ serializer.SenderKeyDistributionMessage = &ProtoBufSenderKeyDistributionMessageSerializer{}
+ serializer.SignedPreKeyRecord = &JSONSignedPreKeyRecordSerializer{}
+ serializer.PreKeyRecord = &JSONPreKeyRecordSerializer{}
+ serializer.State = &JSONStateSerializer{}
+ serializer.Session = &JSONSessionSerializer{}
+ serializer.SenderKeyRecord = &JSONSenderKeySessionSerializer{}
+ serializer.SenderKeyState = &JSONSenderKeyStateSerializer{}
+
+ return serializer
+}
+
+func highBitsToInt(value byte) int {
+ return int((value & 0xFF) >> 4)
+}
+
+func intsToByteHighAndLow(highValue, lowValue int) byte {
+ return byte((highValue<<4 | lowValue) & 0xFF)
+}
+
+// ProtoBufSignalMessageSerializer is a structure for serializing signal messages into
+// and from ProtoBuf.
+type ProtoBufSignalMessageSerializer struct{}
+
+// Serialize will take a signal message structure and convert it to ProtoBuf bytes.
+func (j *ProtoBufSignalMessageSerializer) Serialize(signalMessage *protocol.SignalMessageStructure) []byte {
+ sm := &SignalMessage{
+ RatchetKey: signalMessage.RatchetKey,
+ Counter: &signalMessage.Counter,
+ PreviousCounter: &signalMessage.PreviousCounter,
+ Ciphertext: signalMessage.CipherText,
+ }
+ var serialized []byte
+ message, err := proto.Marshal(sm)
+ if err != nil {
+ logger.Error("Error serializing signal message: ", err)
+ }
+
+ if signalMessage.Version != 0 {
+ serialized = append(serialized, []byte(strconv.Itoa(signalMessage.Version))...)
+ }
+ serialized = append(serialized, message...)
+
+ if signalMessage.Mac != nil {
+ serialized = append(serialized, signalMessage.Mac...)
+ }
+
+ return serialized
+}
+
+// Deserialize will take in ProtoBuf bytes and return a signal message structure.
+func (j *ProtoBufSignalMessageSerializer) Deserialize(serialized []byte) (*protocol.SignalMessageStructure, error) {
+ parts, err := bytehelper.SplitThree(serialized, 1, len(serialized)-1-protocol.MacLength, protocol.MacLength)
+ if err != nil {
+ logger.Error("Error split signal message: ", err)
+ return nil, err
+ }
+ version := highBitsToInt(parts[0][0])
+ message := parts[1]
+ mac := parts[2]
+
+ var sm SignalMessage
+ err = proto.Unmarshal(message, &sm)
+ if err != nil {
+ logger.Error("Error deserializing signal message: ", err)
+ return nil, err
+ }
+
+ signalMessage := protocol.SignalMessageStructure{
+ Version: version,
+ RatchetKey: sm.GetRatchetKey(),
+ Counter: sm.GetCounter(),
+ PreviousCounter: sm.GetPreviousCounter(),
+ CipherText: sm.GetCiphertext(),
+ Mac: mac,
+ }
+
+ return &signalMessage, nil
+}
+
+// ProtoBufPreKeySignalMessageSerializer is a structure for serializing prekey signal messages
+// into and from ProtoBuf.
+type ProtoBufPreKeySignalMessageSerializer struct{}
+
+// Serialize will take a prekey signal message structure and convert it to ProtoBuf bytes.
+func (j *ProtoBufPreKeySignalMessageSerializer) Serialize(signalMessage *protocol.PreKeySignalMessageStructure) []byte {
+ preKeyMessage := &PreKeySignalMessage{
+ RegistrationId: &signalMessage.RegistrationID,
+ SignedPreKeyId: &signalMessage.SignedPreKeyID,
+ BaseKey: signalMessage.BaseKey,
+ IdentityKey: signalMessage.IdentityKey,
+ Message: signalMessage.Message,
+ }
+
+ if !signalMessage.PreKeyID.IsEmpty {
+ preKeyMessage.PreKeyId = &signalMessage.PreKeyID.Value
+ }
+
+ message, err := proto.Marshal(preKeyMessage)
+ if err != nil {
+ logger.Error("Error serializing prekey signal message: ", err)
+ }
+
+ serialized := append([]byte(strconv.Itoa(signalMessage.Version)), message...)
+ logger.Debug("Serialize PreKeySignalMessage result: ", serialized)
+ return serialized
+}
+
+// Deserialize will take in ProtoBuf bytes and return a prekey signal message structure.
+func (j *ProtoBufPreKeySignalMessageSerializer) Deserialize(serialized []byte) (*protocol.PreKeySignalMessageStructure, error) {
+ version := highBitsToInt(serialized[0])
+ message := serialized[1:]
+ var sm PreKeySignalMessage
+ err := proto.Unmarshal(message, &sm)
+ if err != nil {
+ logger.Error("Error deserializing prekey signal message: ", err)
+ return nil, err
+ }
+
+ preKeyId := optional.NewEmptyUint32()
+ if sm.GetPreKeyId() != 0 {
+ preKeyId = optional.NewOptionalUint32(sm.GetPreKeyId())
+ }
+
+ preKeySignalMessage := protocol.PreKeySignalMessageStructure{
+ Version: version,
+ RegistrationID: sm.GetRegistrationId(),
+ BaseKey: sm.GetBaseKey(),
+ IdentityKey: sm.GetIdentityKey(),
+ SignedPreKeyID: sm.GetSignedPreKeyId(),
+ Message: sm.GetMessage(),
+ PreKeyID: preKeyId,
+ }
+
+ return &preKeySignalMessage, nil
+}
+
+// ProtoBufSenderKeyDistributionMessageSerializer is a structure for serializing senderkey
+// distribution records to and from ProtoBuf.
+type ProtoBufSenderKeyDistributionMessageSerializer struct{}
+
+// Serialize will take a senderkey distribution message and convert it to ProtoBuf bytes.
+func (j *ProtoBufSenderKeyDistributionMessageSerializer) Serialize(message *protocol.SenderKeyDistributionMessageStructure) []byte {
+ senderDis := SenderKeyDistributionMessage{
+ Id: &message.ID,
+ Iteration: &message.Iteration,
+ ChainKey: message.ChainKey,
+ SigningKey: message.SigningKey,
+ }
+
+ serialized, err := proto.Marshal(&senderDis)
+ if err != nil {
+ logger.Error("Error serializing senderkey distribution message: ", err)
+ }
+
+ version := strconv.Itoa(int(message.Version))
+ serialized = append([]byte(version), serialized...)
+ logger.Debug("Serialize result: ", serialized)
+ return serialized
+}
+
+// Deserialize will take in ProtoBuf bytes and return a message structure, which can be
+// used to create a new SenderKey Distribution object.
+func (j *ProtoBufSenderKeyDistributionMessageSerializer) Deserialize(serialized []byte) (*protocol.SenderKeyDistributionMessageStructure, error) {
+ version := uint32(highBitsToInt(serialized[0]))
+ message := serialized[1:]
+
+ var senderKeyDis SenderKeyDistributionMessage
+ err := proto.Unmarshal(message, &senderKeyDis)
+ if err != nil {
+ logger.Error("Error deserializing senderkey distribution message: ", err)
+ return nil, err
+ }
+
+ msgStructure := protocol.SenderKeyDistributionMessageStructure{
+ ID: senderKeyDis.GetId(),
+ Iteration: senderKeyDis.GetIteration(),
+ ChainKey: senderKeyDis.GetChainKey(),
+ SigningKey: senderKeyDis.GetSigningKey(),
+ Version: version,
+ }
+ return &msgStructure, nil
+}
+
+// ProtoBufSenderKeyMessageSerializer is a structure for serializing senderkey
+// messages to and from ProtoBuf.
+type ProtoBufSenderKeyMessageSerializer struct{}
+
+// Serialize will take a senderkey message and convert it to ProtoBuf bytes.
+func (j *ProtoBufSenderKeyMessageSerializer) Serialize(message *protocol.SenderKeyMessageStructure) []byte {
+ senderMessage := &SenderKeyMessage{
+ Id: &message.ID,
+ Iteration: &message.Iteration,
+ Ciphertext: message.CipherText,
+ }
+
+ var serialized []byte
+ m, err := proto.Marshal(senderMessage)
+ if err != nil {
+ logger.Error("Error serializing signal message: ", err)
+ }
+
+ if message.Version != 0 {
+ serialized = append([]byte(fmt.Sprint(message.Version)), m...)
+ }
+
+ if message.Signature != nil {
+ serialized = append(serialized, message.Signature...)
+ }
+ logger.Debug("Serialize result: ", serialized)
+ return serialized
+}
+
+// Deserialize will take in ProtoBuf bytes and return a message structure, which can be
+// used to create a new SenderKey message object.
+func (j *ProtoBufSenderKeyMessageSerializer) Deserialize(serialized []byte) (*protocol.SenderKeyMessageStructure, error) {
+ parts, err := bytehelper.SplitThree(serialized, 1, len(serialized)-1-64, 64)
+ if err != nil {
+ logger.Error("Error split signal message: ", err)
+ return nil, err
+ }
+ version := uint32(highBitsToInt(parts[0][0]))
+ message := parts[1]
+ signature := parts[2]
+
+ var senderKey SenderKeyMessage
+ err = proto.Unmarshal(message, &senderKey)
+ if err != nil {
+ logger.Error("Error deserializing senderkey message: ", err)
+ return nil, err
+ }
+
+ msgStructure := protocol.SenderKeyMessageStructure{
+ Version: version,
+ ID: senderKey.GetId(),
+ Iteration: senderKey.GetIteration(),
+ CipherText: senderKey.GetCiphertext(),
+ Signature: signature,
+ }
+
+ return &msgStructure, nil
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/Serializer.go b/vendor/go.mau.fi/libsignal/serialize/Serializer.go
new file mode 100644
index 00000000..fe7dd433
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/Serializer.go
@@ -0,0 +1,31 @@
+// Package serialize provides a serialization structure to serialize and
+// deserialize Signal objects into storeable and transportable bytes.
+package serialize
+
+import (
+ groupRecord "go.mau.fi/libsignal/groups/state/record"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/state/record"
+)
+
+// NewSerializer will return a new serializer object that will be used
+// to encode/decode Signal objects into bytes.
+func NewSerializer() *Serializer {
+ return &Serializer{}
+}
+
+// Serializer is a structure to serialize Signal objects
+// into bytes. This allows you to use any serialization format
+// to store or send Signal objects.
+type Serializer struct {
+ SenderKeyRecord groupRecord.SenderKeySerializer
+ SenderKeyState groupRecord.SenderKeyStateSerializer
+ SignalMessage protocol.SignalMessageSerializer
+ PreKeySignalMessage protocol.PreKeySignalMessageSerializer
+ SenderKeyMessage protocol.SenderKeyMessageSerializer
+ SenderKeyDistributionMessage protocol.SenderKeyDistributionMessageSerializer
+ SignedPreKeyRecord record.SignedPreKeySerializer
+ PreKeyRecord record.PreKeySerializer
+ State record.StateSerializer
+ Session record.SessionSerializer
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go b/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go
new file mode 100644
index 00000000..18143be5
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go
@@ -0,0 +1,640 @@
+// From https://github.com/signalapp/libsignal-protocol-c/blob/master/protobuf/WhisperTextProtocol.proto
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.12.4
+// source: serialize/WhisperTextProtocol.proto
+
+package serialize
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SignalMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RatchetKey []byte `protobuf:"bytes,1,opt,name=ratchetKey" json:"ratchetKey,omitempty"`
+ Counter *uint32 `protobuf:"varint,2,opt,name=counter" json:"counter,omitempty"`
+ PreviousCounter *uint32 `protobuf:"varint,3,opt,name=previousCounter" json:"previousCounter,omitempty"`
+ Ciphertext []byte `protobuf:"bytes,4,opt,name=ciphertext" json:"ciphertext,omitempty"`
+}
+
+func (x *SignalMessage) Reset() {
+ *x = SignalMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_WhisperTextProtocol_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SignalMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SignalMessage) ProtoMessage() {}
+
+func (x *SignalMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_WhisperTextProtocol_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 SignalMessage.ProtoReflect.Descriptor instead.
+func (*SignalMessage) Descriptor() ([]byte, []int) {
+ return file_serialize_WhisperTextProtocol_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SignalMessage) GetRatchetKey() []byte {
+ if x != nil {
+ return x.RatchetKey
+ }
+ return nil
+}
+
+func (x *SignalMessage) GetCounter() uint32 {
+ if x != nil && x.Counter != nil {
+ return *x.Counter
+ }
+ return 0
+}
+
+func (x *SignalMessage) GetPreviousCounter() uint32 {
+ if x != nil && x.PreviousCounter != nil {
+ return *x.PreviousCounter
+ }
+ return 0
+}
+
+func (x *SignalMessage) GetCiphertext() []byte {
+ if x != nil {
+ return x.Ciphertext
+ }
+ return nil
+}
+
+type PreKeySignalMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RegistrationId *uint32 `protobuf:"varint,5,opt,name=registrationId" json:"registrationId,omitempty"`
+ PreKeyId *uint32 `protobuf:"varint,1,opt,name=preKeyId" json:"preKeyId,omitempty"`
+ SignedPreKeyId *uint32 `protobuf:"varint,6,opt,name=signedPreKeyId" json:"signedPreKeyId,omitempty"`
+ BaseKey []byte `protobuf:"bytes,2,opt,name=baseKey" json:"baseKey,omitempty"`
+ IdentityKey []byte `protobuf:"bytes,3,opt,name=identityKey" json:"identityKey,omitempty"`
+ Message []byte `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"` // SignalMessage
+}
+
+func (x *PreKeySignalMessage) Reset() {
+ *x = PreKeySignalMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_WhisperTextProtocol_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PreKeySignalMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PreKeySignalMessage) ProtoMessage() {}
+
+func (x *PreKeySignalMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_WhisperTextProtocol_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 PreKeySignalMessage.ProtoReflect.Descriptor instead.
+func (*PreKeySignalMessage) Descriptor() ([]byte, []int) {
+ return file_serialize_WhisperTextProtocol_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PreKeySignalMessage) GetRegistrationId() uint32 {
+ if x != nil && x.RegistrationId != nil {
+ return *x.RegistrationId
+ }
+ return 0
+}
+
+func (x *PreKeySignalMessage) GetPreKeyId() uint32 {
+ if x != nil && x.PreKeyId != nil {
+ return *x.PreKeyId
+ }
+ return 0
+}
+
+func (x *PreKeySignalMessage) GetSignedPreKeyId() uint32 {
+ if x != nil && x.SignedPreKeyId != nil {
+ return *x.SignedPreKeyId
+ }
+ return 0
+}
+
+func (x *PreKeySignalMessage) GetBaseKey() []byte {
+ if x != nil {
+ return x.BaseKey
+ }
+ return nil
+}
+
+func (x *PreKeySignalMessage) GetIdentityKey() []byte {
+ if x != nil {
+ return x.IdentityKey
+ }
+ return nil
+}
+
+func (x *PreKeySignalMessage) GetMessage() []byte {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+type KeyExchangeMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ BaseKey []byte `protobuf:"bytes,2,opt,name=baseKey" json:"baseKey,omitempty"`
+ RatchetKey []byte `protobuf:"bytes,3,opt,name=ratchetKey" json:"ratchetKey,omitempty"`
+ IdentityKey []byte `protobuf:"bytes,4,opt,name=identityKey" json:"identityKey,omitempty"`
+ BaseKeySignature []byte `protobuf:"bytes,5,opt,name=baseKeySignature" json:"baseKeySignature,omitempty"`
+}
+
+func (x *KeyExchangeMessage) Reset() {
+ *x = KeyExchangeMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_WhisperTextProtocol_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *KeyExchangeMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KeyExchangeMessage) ProtoMessage() {}
+
+func (x *KeyExchangeMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_WhisperTextProtocol_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 KeyExchangeMessage.ProtoReflect.Descriptor instead.
+func (*KeyExchangeMessage) Descriptor() ([]byte, []int) {
+ return file_serialize_WhisperTextProtocol_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *KeyExchangeMessage) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *KeyExchangeMessage) GetBaseKey() []byte {
+ if x != nil {
+ return x.BaseKey
+ }
+ return nil
+}
+
+func (x *KeyExchangeMessage) GetRatchetKey() []byte {
+ if x != nil {
+ return x.RatchetKey
+ }
+ return nil
+}
+
+func (x *KeyExchangeMessage) GetIdentityKey() []byte {
+ if x != nil {
+ return x.IdentityKey
+ }
+ return nil
+}
+
+func (x *KeyExchangeMessage) GetBaseKeySignature() []byte {
+ if x != nil {
+ return x.BaseKeySignature
+ }
+ return nil
+}
+
+type SenderKeyMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ Iteration *uint32 `protobuf:"varint,2,opt,name=iteration" json:"iteration,omitempty"`
+ Ciphertext []byte `protobuf:"bytes,3,opt,name=ciphertext" json:"ciphertext,omitempty"`
+}
+
+func (x *SenderKeyMessage) Reset() {
+ *x = SenderKeyMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_WhisperTextProtocol_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyMessage) ProtoMessage() {}
+
+func (x *SenderKeyMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_WhisperTextProtocol_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 SenderKeyMessage.ProtoReflect.Descriptor instead.
+func (*SenderKeyMessage) Descriptor() ([]byte, []int) {
+ return file_serialize_WhisperTextProtocol_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *SenderKeyMessage) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *SenderKeyMessage) GetIteration() uint32 {
+ if x != nil && x.Iteration != nil {
+ return *x.Iteration
+ }
+ return 0
+}
+
+func (x *SenderKeyMessage) GetCiphertext() []byte {
+ if x != nil {
+ return x.Ciphertext
+ }
+ return nil
+}
+
+type SenderKeyDistributionMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ Iteration *uint32 `protobuf:"varint,2,opt,name=iteration" json:"iteration,omitempty"`
+ ChainKey []byte `protobuf:"bytes,3,opt,name=chainKey" json:"chainKey,omitempty"`
+ SigningKey []byte `protobuf:"bytes,4,opt,name=signingKey" json:"signingKey,omitempty"`
+}
+
+func (x *SenderKeyDistributionMessage) Reset() {
+ *x = SenderKeyDistributionMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_WhisperTextProtocol_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyDistributionMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyDistributionMessage) ProtoMessage() {}
+
+func (x *SenderKeyDistributionMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_WhisperTextProtocol_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 SenderKeyDistributionMessage.ProtoReflect.Descriptor instead.
+func (*SenderKeyDistributionMessage) Descriptor() ([]byte, []int) {
+ return file_serialize_WhisperTextProtocol_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *SenderKeyDistributionMessage) GetId() uint32 {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return 0
+}
+
+func (x *SenderKeyDistributionMessage) GetIteration() uint32 {
+ if x != nil && x.Iteration != nil {
+ return *x.Iteration
+ }
+ return 0
+}
+
+func (x *SenderKeyDistributionMessage) GetChainKey() []byte {
+ if x != nil {
+ return x.ChainKey
+ }
+ return nil
+}
+
+func (x *SenderKeyDistributionMessage) GetSigningKey() []byte {
+ if x != nil {
+ return x.SigningKey
+ }
+ return nil
+}
+
+type DeviceConsistencyCodeMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Generation *uint32 `protobuf:"varint,1,opt,name=generation" json:"generation,omitempty"`
+ Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
+}
+
+func (x *DeviceConsistencyCodeMessage) Reset() {
+ *x = DeviceConsistencyCodeMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_serialize_WhisperTextProtocol_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceConsistencyCodeMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceConsistencyCodeMessage) ProtoMessage() {}
+
+func (x *DeviceConsistencyCodeMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_serialize_WhisperTextProtocol_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 DeviceConsistencyCodeMessage.ProtoReflect.Descriptor instead.
+func (*DeviceConsistencyCodeMessage) Descriptor() ([]byte, []int) {
+ return file_serialize_WhisperTextProtocol_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *DeviceConsistencyCodeMessage) GetGeneration() uint32 {
+ if x != nil && x.Generation != nil {
+ return *x.Generation
+ }
+ return 0
+}
+
+func (x *DeviceConsistencyCodeMessage) GetSignature() []byte {
+ if x != nil {
+ return x.Signature
+ }
+ return nil
+}
+
+var File_serialize_WhisperTextProtocol_proto protoreflect.FileDescriptor
+
+var file_serialize_WhisperTextProtocol_proto_rawDesc = []byte{
+ 0x0a, 0x23, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x2f, 0x57, 0x68, 0x69, 0x73,
+ 0x70, 0x65, 0x72, 0x54, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x73, 0x65, 0x63, 0x75, 0x72,
+ 0x65, 0x22, 0x93, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74,
+ 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a,
+ 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
+ 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65,
+ 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70,
+ 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x4b,
+ 0x65, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
+ 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+ 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x4b, 0x65,
+ 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x65, 0x4b, 0x65,
+ 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65,
+ 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x69, 0x67,
+ 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62,
+ 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x61,
+ 0x73, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
+ 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x73, 0x65,
+ 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x4b,
+ 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b, 0x65, 0x79,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x63, 0x68, 0x65, 0x74, 0x4b,
+ 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65,
+ 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x53,
+ 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10,
+ 0x62, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x22, 0x60, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65,
+ 0x78, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79,
+ 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x22, 0x5c, 0x0a,
+ 0x1c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e,
+ 0x63, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a,
+ 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
+}
+
+var (
+ file_serialize_WhisperTextProtocol_proto_rawDescOnce sync.Once
+ file_serialize_WhisperTextProtocol_proto_rawDescData = file_serialize_WhisperTextProtocol_proto_rawDesc
+)
+
+func file_serialize_WhisperTextProtocol_proto_rawDescGZIP() []byte {
+ file_serialize_WhisperTextProtocol_proto_rawDescOnce.Do(func() {
+ file_serialize_WhisperTextProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_serialize_WhisperTextProtocol_proto_rawDescData)
+ })
+ return file_serialize_WhisperTextProtocol_proto_rawDescData
+}
+
+var file_serialize_WhisperTextProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_serialize_WhisperTextProtocol_proto_goTypes = []interface{}{
+ (*SignalMessage)(nil), // 0: textsecure.SignalMessage
+ (*PreKeySignalMessage)(nil), // 1: textsecure.PreKeySignalMessage
+ (*KeyExchangeMessage)(nil), // 2: textsecure.KeyExchangeMessage
+ (*SenderKeyMessage)(nil), // 3: textsecure.SenderKeyMessage
+ (*SenderKeyDistributionMessage)(nil), // 4: textsecure.SenderKeyDistributionMessage
+ (*DeviceConsistencyCodeMessage)(nil), // 5: textsecure.DeviceConsistencyCodeMessage
+}
+var file_serialize_WhisperTextProtocol_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_serialize_WhisperTextProtocol_proto_init() }
+func file_serialize_WhisperTextProtocol_proto_init() {
+ if File_serialize_WhisperTextProtocol_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_serialize_WhisperTextProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SignalMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_WhisperTextProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PreKeySignalMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_WhisperTextProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*KeyExchangeMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_WhisperTextProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_WhisperTextProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyDistributionMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_serialize_WhisperTextProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceConsistencyCodeMessage); 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_serialize_WhisperTextProtocol_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_serialize_WhisperTextProtocol_proto_goTypes,
+ DependencyIndexes: file_serialize_WhisperTextProtocol_proto_depIdxs,
+ MessageInfos: file_serialize_WhisperTextProtocol_proto_msgTypes,
+ }.Build()
+ File_serialize_WhisperTextProtocol_proto = out.File
+ file_serialize_WhisperTextProtocol_proto_rawDesc = nil
+ file_serialize_WhisperTextProtocol_proto_goTypes = nil
+ file_serialize_WhisperTextProtocol_proto_depIdxs = nil
+}
diff --git a/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.proto b/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.proto
new file mode 100644
index 00000000..def080b4
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.proto
@@ -0,0 +1,45 @@
+// From https://github.com/signalapp/libsignal-protocol-c/blob/master/protobuf/WhisperTextProtocol.proto
+syntax = "proto2";
+package textsecure;
+
+message SignalMessage {
+ optional bytes ratchetKey = 1;
+ optional uint32 counter = 2;
+ optional uint32 previousCounter = 3;
+ optional bytes ciphertext = 4;
+}
+
+message PreKeySignalMessage {
+ optional uint32 registrationId = 5;
+ optional uint32 preKeyId = 1;
+ optional uint32 signedPreKeyId = 6;
+ optional bytes baseKey = 2;
+ optional bytes identityKey = 3;
+ optional bytes message = 4; // SignalMessage
+}
+
+message KeyExchangeMessage {
+ optional uint32 id = 1;
+ optional bytes baseKey = 2;
+ optional bytes ratchetKey = 3;
+ optional bytes identityKey = 4;
+ optional bytes baseKeySignature = 5;
+}
+
+message SenderKeyMessage {
+ optional uint32 id = 1;
+ optional uint32 iteration = 2;
+ optional bytes ciphertext = 3;
+}
+
+message SenderKeyDistributionMessage {
+ optional uint32 id = 1;
+ optional uint32 iteration = 2;
+ optional bytes chainKey = 3;
+ optional bytes signingKey = 4;
+}
+
+message DeviceConsistencyCodeMessage {
+ optional uint32 generation = 1;
+ optional bytes signature = 2;
+} \ No newline at end of file
diff --git a/vendor/go.mau.fi/libsignal/session/Session.go b/vendor/go.mau.fi/libsignal/session/Session.go
new file mode 100644
index 00000000..aafac760
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/session/Session.go
@@ -0,0 +1,272 @@
+// Package session provides the methods necessary to build sessions
+package session
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/prekey"
+ "go.mau.fi/libsignal/logger"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/ratchet"
+ "go.mau.fi/libsignal/serialize"
+ "go.mau.fi/libsignal/signalerror"
+ "go.mau.fi/libsignal/state/record"
+ "go.mau.fi/libsignal/state/store"
+ "go.mau.fi/libsignal/util/medium"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+// NewBuilder constructs a session builder.
+func NewBuilder(sessionStore store.Session, preKeyStore store.PreKey,
+ signedStore store.SignedPreKey, identityStore store.IdentityKey,
+ remoteAddress *protocol.SignalAddress, serializer *serialize.Serializer) *Builder {
+
+ builder := Builder{
+ sessionStore: sessionStore,
+ preKeyStore: preKeyStore,
+ signedPreKeyStore: signedStore,
+ identityKeyStore: identityStore,
+ remoteAddress: remoteAddress,
+ serializer: serializer,
+ }
+
+ return &builder
+}
+
+// NewBuilderFromSignal Store constructs a session builder using a
+// SignalProtocol Store.
+func NewBuilderFromSignal(signalStore store.SignalProtocol,
+ remoteAddress *protocol.SignalAddress, serializer *serialize.Serializer) *Builder {
+
+ builder := Builder{
+ sessionStore: signalStore,
+ preKeyStore: signalStore,
+ signedPreKeyStore: signalStore,
+ identityKeyStore: signalStore,
+ remoteAddress: remoteAddress,
+ serializer: serializer,
+ }
+
+ return &builder
+}
+
+// Builder is responsible for setting up encrypted sessions.
+// Once a session has been established, SessionCipher can be
+// used to encrypt/decrypt messages in that session.
+//
+// Sessions are built from one of three different vectors:
+// * PreKeyBundle retrieved from a server.
+// * PreKeySignalMessage received from a client.
+// * KeyExchangeMessage sent to or received from a client.
+//
+// Sessions are constructed per recipientId + deviceId tuple.
+// Remote logical users are identified by their recipientId,
+// and each logical recipientId can have multiple physical
+// devices.
+type Builder struct {
+ sessionStore store.Session
+ preKeyStore store.PreKey
+ signedPreKeyStore store.SignedPreKey
+ identityKeyStore store.IdentityKey
+ remoteAddress *protocol.SignalAddress
+ serializer *serialize.Serializer
+}
+
+// Process builds a new session from a session record and pre
+// key signal message.
+func (b *Builder) Process(sessionRecord *record.Session, message *protocol.PreKeySignalMessage) (unsignedPreKeyID *optional.Uint32, err error) {
+
+ // Check to see if the keys are trusted.
+ theirIdentityKey := message.IdentityKey()
+ if !(b.identityKeyStore.IsTrustedIdentity(b.remoteAddress, theirIdentityKey)) {
+ return nil, signalerror.ErrUntrustedIdentity
+ }
+
+ // Use version 3 of the signal/axolotl protocol.
+ unsignedPreKeyID, err = b.processV3(sessionRecord, message)
+ if err != nil {
+ return nil, err
+ }
+
+ // Save the identity key to our identity store.
+ b.identityKeyStore.SaveIdentity(b.remoteAddress, theirIdentityKey)
+
+ // Return the unsignedPreKeyID
+ return unsignedPreKeyID, nil
+}
+
+// ProcessV3 builds a new session from a session record and pre key
+// signal message. After a session is constructed in this way, the embedded
+// SignalMessage can be decrypted.
+func (b *Builder) processV3(sessionRecord *record.Session,
+ message *protocol.PreKeySignalMessage) (unsignedPreKeyID *optional.Uint32, err error) {
+
+ logger.Debug("Processing message with PreKeyID: ", message.PreKeyID())
+ // Check to see if we've already set up a session for this V3 message.
+ sessionExists := sessionRecord.HasSessionState(
+ message.MessageVersion(),
+ message.BaseKey().Serialize(),
+ )
+ if sessionExists {
+ logger.Debug("We've already setup a session for this V3 message, letting bundled message fall through...")
+ return optional.NewEmptyUint32(), nil
+ }
+
+ // Load our signed prekey from our signed prekey store.
+ ourSignedPreKeyRecord := b.signedPreKeyStore.LoadSignedPreKey(message.SignedPreKeyID())
+ if ourSignedPreKeyRecord == nil {
+ return nil, fmt.Errorf("%w with ID %d", signalerror.ErrNoSignedPreKey, message.SignedPreKeyID())
+ }
+ ourSignedPreKey := ourSignedPreKeyRecord.KeyPair()
+
+ // Build the parameters of the session.
+ parameters := ratchet.NewEmptyReceiverParameters()
+ parameters.SetTheirBaseKey(message.BaseKey())
+ parameters.SetTheirIdentityKey(message.IdentityKey())
+ parameters.SetOurIdentityKeyPair(b.identityKeyStore.GetIdentityKeyPair())
+ parameters.SetOurSignedPreKey(ourSignedPreKey)
+ parameters.SetOurRatchetKey(ourSignedPreKey)
+
+ // Set our one time pre key with the one from our prekey store
+ // if the message contains a valid pre key id
+ if !message.PreKeyID().IsEmpty {
+ oneTimePreKey := b.preKeyStore.LoadPreKey(message.PreKeyID().Value)
+ if oneTimePreKey == nil {
+ return nil, fmt.Errorf("%w with ID %d", signalerror.ErrNoOneTimeKeyFound, message.PreKeyID().Value)
+ }
+ parameters.SetOurOneTimePreKey(oneTimePreKey.KeyPair())
+ } else {
+ parameters.SetOurOneTimePreKey(nil)
+ }
+
+ // If this is a fresh record, archive our current state.
+ if !sessionRecord.IsFresh() {
+ sessionRecord.ArchiveCurrentState()
+ }
+
+ ///////// Initialize our session /////////
+ sessionState := sessionRecord.SessionState()
+ derivedKeys, sessionErr := ratchet.CalculateReceiverSession(parameters)
+ if sessionErr != nil {
+ return nil, sessionErr
+ }
+ sessionState.SetVersion(protocol.CurrentVersion)
+ sessionState.SetRemoteIdentityKey(parameters.TheirIdentityKey())
+ sessionState.SetLocalIdentityKey(parameters.OurIdentityKeyPair().PublicKey())
+ sessionState.SetSenderChain(parameters.OurRatchetKey(), derivedKeys.ChainKey)
+ sessionState.SetRootKey(derivedKeys.RootKey)
+
+ // Set the session's registration ids and base key
+ sessionState.SetLocalRegistrationID(b.identityKeyStore.GetLocalRegistrationId())
+ sessionState.SetRemoteRegistrationID(message.RegistrationID())
+ sessionState.SetSenderBaseKey(message.BaseKey().Serialize())
+
+ // Remove the PreKey from our store and return the message prekey id if it is valid.
+ if message.PreKeyID() != nil && message.PreKeyID().Value != medium.MaxValue {
+ return message.PreKeyID(), nil
+ }
+ return nil, nil
+}
+
+// ProcessBundle builds a new session from a PreKeyBundle retrieved
+// from a server.
+func (b *Builder) ProcessBundle(preKey *prekey.Bundle) error {
+ // Check to see if the keys are trusted.
+ if !(b.identityKeyStore.IsTrustedIdentity(b.remoteAddress, preKey.IdentityKey())) {
+ return signalerror.ErrUntrustedIdentity
+ }
+
+ // Check to see if the bundle has a signed pre key.
+ if preKey.SignedPreKey() == nil {
+ return signalerror.ErrNoSignedPreKey
+ }
+
+ // Verify the signature of the pre key
+ preKeyPublic := preKey.IdentityKey().PublicKey()
+ preKeyBytes := preKey.SignedPreKey().Serialize()
+ preKeySignature := preKey.SignedPreKeySignature()
+ if !ecc.VerifySignature(preKeyPublic, preKeyBytes, preKeySignature) {
+ return signalerror.ErrInvalidSignature
+ }
+
+ // Load our session and generate keys.
+ sessionRecord := b.sessionStore.LoadSession(b.remoteAddress)
+ ourBaseKey, err := ecc.GenerateKeyPair()
+ if err != nil {
+ return err
+ }
+ theirSignedPreKey := preKey.SignedPreKey()
+ theirOneTimePreKey := preKey.PreKey()
+ theirOneTimePreKeyID := preKey.PreKeyID()
+
+ // Build the parameters of the session
+ parameters := ratchet.NewEmptySenderParameters()
+ parameters.SetOurBaseKey(ourBaseKey)
+ parameters.SetOurIdentityKey(b.identityKeyStore.GetIdentityKeyPair())
+ parameters.SetTheirIdentityKey(preKey.IdentityKey())
+ parameters.SetTheirSignedPreKey(theirSignedPreKey)
+ parameters.SetTheirRatchetKey(theirSignedPreKey)
+ parameters.SetTheirOneTimePreKey(theirOneTimePreKey)
+
+ // If this is a fresh record, archive our current state.
+ if !sessionRecord.IsFresh() {
+ sessionRecord.ArchiveCurrentState()
+ }
+
+ ///////// Initialize our session /////////
+ sessionState := sessionRecord.SessionState()
+ derivedKeys, sessionErr := ratchet.CalculateSenderSession(parameters)
+ if sessionErr != nil {
+ return sessionErr
+ }
+ // Generate an ephemeral "ratchet" key that will be advertised to
+ // the receiving user.
+ sendingRatchetKey, keyErr := ecc.GenerateKeyPair()
+ if keyErr != nil {
+ return keyErr
+ }
+ sendingChain, chainErr := derivedKeys.RootKey.CreateChain(
+ parameters.TheirRatchetKey(),
+ sendingRatchetKey,
+ )
+ if chainErr != nil {
+ return chainErr
+ }
+
+ // Calculate the sender session.
+ sessionState.SetVersion(protocol.CurrentVersion)
+ sessionState.SetRemoteIdentityKey(parameters.TheirIdentityKey())
+ sessionState.SetLocalIdentityKey(parameters.OurIdentityKey().PublicKey())
+ sessionState.AddReceiverChain(parameters.TheirRatchetKey(), derivedKeys.ChainKey.Current())
+ sessionState.SetSenderChain(sendingRatchetKey, sendingChain.ChainKey)
+ sessionState.SetRootKey(sendingChain.RootKey)
+
+ // Update our session record with the unackowledged prekey message
+ sessionState.SetUnacknowledgedPreKeyMessage(
+ theirOneTimePreKeyID,
+ preKey.SignedPreKeyID(),
+ ourBaseKey.PublicKey(),
+ )
+
+ // Set the local registration ID based on the registration id in our identity key store.
+ sessionState.SetLocalRegistrationID(
+ b.identityKeyStore.GetLocalRegistrationId(),
+ )
+
+ // Set the remote registration ID based on the given prekey bundle registrationID.
+ sessionState.SetRemoteRegistrationID(
+ preKey.RegistrationID(),
+ )
+
+ // Set the sender base key in our session record state.
+ sessionState.SetSenderBaseKey(
+ ourBaseKey.PublicKey().Serialize(),
+ )
+
+ // Store the session in our session store and save the identity in our identity store.
+ b.sessionStore.StoreSession(b.remoteAddress, sessionRecord)
+ b.identityKeyStore.SaveIdentity(b.remoteAddress, preKey.IdentityKey())
+
+ return nil
+}
diff --git a/vendor/go.mau.fi/libsignal/session/SessionCipher.go b/vendor/go.mau.fi/libsignal/session/SessionCipher.go
new file mode 100644
index 00000000..a70812b9
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/session/SessionCipher.go
@@ -0,0 +1,366 @@
+package session
+
+import (
+ "fmt"
+
+ "go.mau.fi/libsignal/cipher"
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/chain"
+ "go.mau.fi/libsignal/keys/message"
+ "go.mau.fi/libsignal/logger"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/signalerror"
+ "go.mau.fi/libsignal/state/record"
+ "go.mau.fi/libsignal/state/store"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+const maxFutureMessages = 2000
+
+// NewCipher constructs a session cipher for encrypt/decrypt operations on a
+// session. In order to use the session cipher, a session must have already
+// been created and stored using session.Builder.
+func NewCipher(builder *Builder, remoteAddress *protocol.SignalAddress) *Cipher {
+ cipher := &Cipher{
+ sessionStore: builder.sessionStore,
+ preKeyMessageSerializer: builder.serializer.PreKeySignalMessage,
+ signalMessageSerializer: builder.serializer.SignalMessage,
+ preKeyStore: builder.preKeyStore,
+ remoteAddress: remoteAddress,
+ builder: builder,
+ identityKeyStore: builder.identityKeyStore,
+ }
+
+ return cipher
+}
+
+func NewCipherFromSession(remoteAddress *protocol.SignalAddress,
+ sessionStore store.Session, preKeyStore store.PreKey, identityKeyStore store.IdentityKey,
+ preKeyMessageSerializer protocol.PreKeySignalMessageSerializer,
+ signalMessageSerializer protocol.SignalMessageSerializer) *Cipher {
+ cipher := &Cipher{
+ sessionStore: sessionStore,
+ preKeyMessageSerializer: preKeyMessageSerializer,
+ signalMessageSerializer: signalMessageSerializer,
+ preKeyStore: preKeyStore,
+ remoteAddress: remoteAddress,
+ identityKeyStore: identityKeyStore,
+ }
+
+ return cipher
+}
+
+// Cipher is the main entry point for Signal Protocol encrypt/decrypt operations.
+// Once a session has been established with session.Builder, this can be used for
+// all encrypt/decrypt operations within that session.
+type Cipher struct {
+ sessionStore store.Session
+ preKeyMessageSerializer protocol.PreKeySignalMessageSerializer
+ signalMessageSerializer protocol.SignalMessageSerializer
+ preKeyStore store.PreKey
+ remoteAddress *protocol.SignalAddress
+ builder *Builder
+ identityKeyStore store.IdentityKey
+}
+
+// Encrypt will take the given message in bytes and return an object that follows
+// the CiphertextMessage interface.
+func (d *Cipher) Encrypt(plaintext []byte) (protocol.CiphertextMessage, error) {
+ sessionRecord := d.sessionStore.LoadSession(d.remoteAddress)
+ sessionState := sessionRecord.SessionState()
+ chainKey := sessionState.SenderChainKey()
+ messageKeys := chainKey.MessageKeys()
+ senderEphemeral := sessionState.SenderRatchetKey()
+ previousCounter := sessionState.PreviousCounter()
+ sessionVersion := sessionState.Version()
+
+ ciphertextBody, err := encrypt(messageKeys, plaintext)
+ logger.Debug("Got ciphertextBody: ", ciphertextBody)
+ if err != nil {
+ return nil, err
+ }
+
+ var ciphertextMessage protocol.CiphertextMessage
+ ciphertextMessage, err = protocol.NewSignalMessage(
+ sessionVersion,
+ chainKey.Index(),
+ previousCounter,
+ messageKeys.MacKey(),
+ senderEphemeral,
+ ciphertextBody,
+ sessionState.LocalIdentityKey(),
+ sessionState.RemoteIdentityKey(),
+ d.signalMessageSerializer,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ // If we haven't established a session with the recipient yet,
+ // send our message as a PreKeySignalMessage.
+ if sessionState.HasUnacknowledgedPreKeyMessage() {
+ items, err := sessionState.UnackPreKeyMessageItems()
+ if err != nil {
+ return nil, err
+ }
+ localRegistrationID := sessionState.LocalRegistrationID()
+
+ ciphertextMessage, err = protocol.NewPreKeySignalMessage(
+ sessionVersion,
+ localRegistrationID,
+ items.PreKeyID(),
+ items.SignedPreKeyID(),
+ items.BaseKey(),
+ sessionState.LocalIdentityKey(),
+ ciphertextMessage.(*protocol.SignalMessage),
+ d.preKeyMessageSerializer,
+ d.signalMessageSerializer,
+ )
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ sessionState.SetSenderChainKey(chainKey.NextKey())
+ if !d.identityKeyStore.IsTrustedIdentity(d.remoteAddress, sessionState.RemoteIdentityKey()) {
+ // return err
+ }
+ d.identityKeyStore.SaveIdentity(d.remoteAddress, sessionState.RemoteIdentityKey())
+ d.sessionStore.StoreSession(d.remoteAddress, sessionRecord)
+ return ciphertextMessage, nil
+}
+
+// Decrypt decrypts the given message using an existing session that
+// is stored in the session store.
+func (d *Cipher) Decrypt(ciphertextMessage *protocol.SignalMessage) ([]byte, error) {
+ plaintext, _, err := d.DecryptAndGetKey(ciphertextMessage)
+
+ return plaintext, err
+}
+
+// DecryptAndGetKey decrypts the given message using an existing session that
+// is stored in the session store and returns the message keys used for encryption.
+func (d *Cipher) DecryptAndGetKey(ciphertextMessage *protocol.SignalMessage) ([]byte, *message.Keys, error) {
+ if !d.sessionStore.ContainsSession(d.remoteAddress) {
+ return nil, nil, fmt.Errorf("%w %s", signalerror.ErrNoSessionForUser, d.remoteAddress.String())
+ }
+
+ // Load the session record from our session store and decrypt the message.
+ sessionRecord := d.sessionStore.LoadSession(d.remoteAddress)
+ plaintext, messageKeys, err := d.DecryptWithRecord(sessionRecord, ciphertextMessage)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ if !d.identityKeyStore.IsTrustedIdentity(d.remoteAddress, sessionRecord.SessionState().RemoteIdentityKey()) {
+ // return err
+ }
+ d.identityKeyStore.SaveIdentity(d.remoteAddress, sessionRecord.SessionState().RemoteIdentityKey())
+
+ // Store the session record in our session store.
+ d.sessionStore.StoreSession(d.remoteAddress, sessionRecord)
+ return plaintext, messageKeys, nil
+}
+
+func (d *Cipher) DecryptMessage(ciphertextMessage *protocol.PreKeySignalMessage) ([]byte, error) {
+ plaintext, _, err := d.DecryptMessageReturnKey(ciphertextMessage)
+ return plaintext, err
+}
+
+func (d *Cipher) DecryptMessageReturnKey(ciphertextMessage *protocol.PreKeySignalMessage) ([]byte, *message.Keys, error) {
+ // Load or create session record for this session.
+ sessionRecord := d.sessionStore.LoadSession(d.remoteAddress)
+ unsignedPreKeyID, err := d.builder.Process(sessionRecord, ciphertextMessage)
+ if err != nil {
+ return nil, nil, err
+ }
+ plaintext, keys, err := d.DecryptWithRecord(sessionRecord, ciphertextMessage.WhisperMessage())
+ if err != nil {
+ return nil, nil, err
+ }
+ // Store the session record in our session store.
+ d.sessionStore.StoreSession(d.remoteAddress, sessionRecord)
+ if !unsignedPreKeyID.IsEmpty {
+ d.preKeyStore.RemovePreKey(unsignedPreKeyID.Value)
+ }
+ return plaintext, keys, nil
+}
+
+// DecryptWithKey will decrypt the given message using the given symmetric key. This
+// can be used when decrypting messages at a later time if the message key was saved.
+func (d *Cipher) DecryptWithKey(ciphertextMessage *protocol.SignalMessage, key *message.Keys) ([]byte, error) {
+ logger.Debug("Decrypting ciphertext body: ", ciphertextMessage.Body())
+ plaintext, err := decrypt(key, ciphertextMessage.Body())
+ if err != nil {
+ logger.Error("Unable to get plain text from ciphertext: ", err)
+ return nil, err
+ }
+
+ return plaintext, nil
+}
+
+// DecryptWithRecord decrypts the given message using the given session record.
+func (d *Cipher) DecryptWithRecord(sessionRecord *record.Session, ciphertext *protocol.SignalMessage) ([]byte, *message.Keys, error) {
+ logger.Debug("Decrypting ciphertext with record: ", sessionRecord)
+ previousStates := sessionRecord.PreviousSessionStates()
+ sessionState := sessionRecord.SessionState()
+
+ // Try and decrypt the message with the current session state.
+ plaintext, messageKeys, err := d.DecryptWithState(sessionState, ciphertext)
+
+ // If we received an error using the current session state, loop
+ // through all previous states.
+ if err != nil {
+ logger.Warning(err)
+ for i, state := range previousStates {
+ // Try decrypting the message with previous states
+ plaintext, messageKeys, err = d.DecryptWithState(state, ciphertext)
+ if err != nil {
+ continue
+ }
+
+ // If successful, remove and promote the state.
+ previousStates = append(previousStates[:i], previousStates[i+1:]...)
+ sessionRecord.PromoteState(state)
+
+ return plaintext, messageKeys, nil
+ }
+
+ return nil, nil, signalerror.ErrNoValidSessions
+ }
+
+ // If decryption was successful, set the session state and return the plain text.
+ sessionRecord.SetState(sessionState)
+
+ return plaintext, messageKeys, nil
+}
+
+// DecryptWithState decrypts the given message with the given session state.
+func (d *Cipher) DecryptWithState(sessionState *record.State, ciphertextMessage *protocol.SignalMessage) ([]byte, *message.Keys, error) {
+ logger.Debug("Decrypting ciphertext with session state: ", sessionState)
+ if !sessionState.HasSenderChain() {
+ logger.Error("Unable to decrypt message with state: ", signalerror.ErrUninitializedSession)
+ return nil, nil, signalerror.ErrUninitializedSession
+ }
+
+ if ciphertextMessage.MessageVersion() != sessionState.Version() {
+ logger.Error("Unable to decrypt message with state: ", signalerror.ErrWrongMessageVersion)
+ return nil, nil, signalerror.ErrWrongMessageVersion
+ }
+
+ messageVersion := ciphertextMessage.MessageVersion()
+ theirEphemeral := ciphertextMessage.SenderRatchetKey()
+ counter := ciphertextMessage.Counter()
+ chainKey, chainCreateErr := getOrCreateChainKey(sessionState, theirEphemeral)
+ if chainCreateErr != nil {
+ logger.Error("Unable to get or create chain key: ", chainCreateErr)
+ return nil, nil, fmt.Errorf("failed to get or create chain key: %w", chainCreateErr)
+ }
+
+ messageKeys, keysCreateErr := getOrCreateMessageKeys(sessionState, theirEphemeral, chainKey, counter)
+ if keysCreateErr != nil {
+ logger.Error("Unable to get or create message keys: ", keysCreateErr)
+ return nil, nil, fmt.Errorf("failed to get or create message keys: %w", keysCreateErr)
+ }
+
+ err := ciphertextMessage.VerifyMac(messageVersion, sessionState.RemoteIdentityKey(), sessionState.LocalIdentityKey(), messageKeys.MacKey())
+ if err != nil {
+ logger.Error("Unable to verify ciphertext mac: ", err)
+ return nil, nil, fmt.Errorf("failed to verify ciphertext MAC: %w", err)
+ }
+
+ plaintext, err := d.DecryptWithKey(ciphertextMessage, messageKeys)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ sessionState.ClearUnackPreKeyMessage()
+
+ return plaintext, messageKeys, nil
+}
+
+func getOrCreateMessageKeys(sessionState *record.State, theirEphemeral ecc.ECPublicKeyable,
+ chainKey *chain.Key, counter uint32) (*message.Keys, error) {
+
+ if chainKey.Index() > counter {
+ if sessionState.HasMessageKeys(theirEphemeral, counter) {
+ return sessionState.RemoveMessageKeys(theirEphemeral, counter), nil
+ }
+ return nil, fmt.Errorf("%w (index: %d, count: %d)", signalerror.ErrOldCounter, chainKey.Index(), counter)
+ }
+
+ if counter-chainKey.Index() > maxFutureMessages {
+ return nil, signalerror.ErrTooFarIntoFuture
+ }
+
+ for chainKey.Index() < counter {
+ messageKeys := chainKey.MessageKeys()
+ sessionState.SetMessageKeys(theirEphemeral, messageKeys)
+ chainKey = chainKey.NextKey()
+ }
+
+ sessionState.SetReceiverChainKey(theirEphemeral, chainKey.NextKey())
+ return chainKey.MessageKeys(), nil
+}
+
+// getOrCreateChainKey will either return the existing chain key or
+// create a new one with the given session state and ephemeral key.
+func getOrCreateChainKey(sessionState *record.State, theirEphemeral ecc.ECPublicKeyable) (*chain.Key, error) {
+
+ // If our session state already has a receiver chain, use their
+ // ephemeral key in the existing chain.
+ if sessionState.HasReceiverChain(theirEphemeral) {
+ return sessionState.ReceiverChainKey(theirEphemeral), nil
+ }
+
+ // If we don't have a chain key, create one with ephemeral keys.
+ rootKey := sessionState.RootKey()
+ ourEphemeral := sessionState.SenderRatchetKeyPair()
+ receiverChain, rErr := rootKey.CreateChain(theirEphemeral, ourEphemeral)
+ if rErr != nil {
+ return nil, rErr
+ }
+
+ // Generate a new ephemeral key pair.
+ ourNewEphemeral, gErr := ecc.GenerateKeyPair()
+ if gErr != nil {
+ return nil, gErr
+ }
+
+ // Create a new chain using our new ephemeral key.
+ senderChain, cErr := receiverChain.RootKey.CreateChain(theirEphemeral, ourNewEphemeral)
+ if cErr != nil {
+ return nil, cErr
+ }
+
+ // Set our session state parameters.
+ sessionState.SetRootKey(senderChain.RootKey)
+ sessionState.AddReceiverChain(theirEphemeral, receiverChain.ChainKey)
+ previousCounter := max(sessionState.SenderChainKey().Index()-1, 0)
+ sessionState.SetPreviousCounter(previousCounter)
+ sessionState.SetSenderChain(ourNewEphemeral, senderChain.ChainKey)
+
+ return receiverChain.ChainKey.(*chain.Key), nil
+}
+
+// decrypt will use the given message keys and ciphertext and return
+// the plaintext bytes.
+func decrypt(keys *message.Keys, body []byte) ([]byte, error) {
+ logger.Debug("Using cipherKey: ", keys.CipherKey())
+ return cipher.DecryptCbc(keys.Iv(), keys.CipherKey(), bytehelper.CopySlice(body))
+}
+
+// encrypt will use the given cipher, message keys, and plaintext bytes
+// and return ciphertext bytes.
+func encrypt(messageKeys *message.Keys, plaintext []byte) ([]byte, error) {
+ logger.Debug("Using cipherKey: ", messageKeys.CipherKey())
+ return cipher.EncryptCbc(messageKeys.Iv(), messageKeys.CipherKey(), plaintext)
+}
+
+// Max is a uint32 implementation of math.Max
+func max(x, y uint32) uint32 {
+ if x > y {
+ return x
+ }
+ return y
+}
diff --git a/vendor/go.mau.fi/libsignal/signalerror/errors.go b/vendor/go.mau.fi/libsignal/signalerror/errors.go
new file mode 100644
index 00000000..51232160
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/signalerror/errors.go
@@ -0,0 +1,37 @@
+package signalerror
+
+import "errors"
+
+var (
+ ErrNoSenderKeyStatesInRecord = errors.New("no sender key states in record")
+ ErrNoSenderKeyStateForID = errors.New("no sender key state for key ID")
+)
+
+var (
+ ErrUntrustedIdentity = errors.New("untrusted identity")
+ ErrNoSignedPreKey = errors.New("no signed prekey found in bundle")
+ ErrInvalidSignature = errors.New("invalid signature on device key")
+ ErrNoOneTimeKeyFound = errors.New("prekey store didn't return one-time key")
+)
+
+var (
+ ErrNoValidSessions = errors.New("no valid sessions")
+ ErrUninitializedSession = errors.New("uninitialized session")
+ ErrWrongMessageVersion = errors.New("wrong message version")
+ ErrTooFarIntoFuture = errors.New("message index is over 2000 messages into the future")
+ ErrOldCounter = errors.New("received message with old counter")
+ ErrNoSessionForUser = errors.New("no session found for user")
+)
+
+var (
+ ErrSenderKeyStateVerificationFailed = errors.New("sender key state failed verification with given public key")
+ ErrNoSenderKeyForUser = errors.New("no sender key")
+)
+
+var (
+ ErrOldMessageVersion = errors.New("too old message version")
+ ErrUnknownMessageVersion = errors.New("unknown message version")
+ ErrIncompleteMessage = errors.New("incomplete message")
+)
+
+var ErrBadMAC = errors.New("mismatching MAC in signal message")
diff --git a/vendor/go.mau.fi/libsignal/state/record/ChainState.go b/vendor/go.mau.fi/libsignal/state/record/ChainState.go
new file mode 100644
index 00000000..dd07bf89
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/ChainState.go
@@ -0,0 +1,157 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/kdf"
+ "go.mau.fi/libsignal/keys/chain"
+ "go.mau.fi/libsignal/keys/message"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+// NewReceiverChainPair will return a new ReceiverChainPair object.
+func NewReceiverChainPair(receiverChain *Chain, index int) *ReceiverChainPair {
+ return &ReceiverChainPair{
+ ReceiverChain: receiverChain,
+ Index: index,
+ }
+}
+
+// ReceiverChainPair is a structure for a receiver chain key and index number.
+type ReceiverChainPair struct {
+ ReceiverChain *Chain
+ Index int
+}
+
+// NewChain returns a new Chain structure for SessionState.
+func NewChain(senderRatchetKeyPair *ecc.ECKeyPair, chainKey *chain.Key,
+ messageKeys []*message.Keys) *Chain {
+
+ return &Chain{
+ senderRatchetKeyPair: senderRatchetKeyPair,
+ chainKey: chainKey,
+ messageKeys: messageKeys,
+ }
+}
+
+// NewChainFromStructure will return a new Chain with the given
+// chain structure.
+func NewChainFromStructure(structure *ChainStructure) (*Chain, error) {
+ // Alias to SliceToArray
+ getArray := bytehelper.SliceToArray
+
+ // Build the sender ratchet key from bytes.
+ senderRatchetKeyPublic, err := ecc.DecodePoint(structure.SenderRatchetKeyPublic, 0)
+ if err != nil {
+ return nil, err
+ }
+ var senderRatchetKeyPrivate ecc.ECPrivateKeyable
+ if len(structure.SenderRatchetKeyPrivate) == 32 {
+ senderRatchetKeyPrivate = ecc.NewDjbECPrivateKey(getArray(structure.SenderRatchetKeyPrivate))
+ }
+ senderRatchetKeyPair := ecc.NewECKeyPair(senderRatchetKeyPublic, senderRatchetKeyPrivate)
+
+ // Build our message keys from the message key structures.
+ messageKeys := make([]*message.Keys, len(structure.MessageKeys))
+ for i := range structure.MessageKeys {
+ messageKeys[i] = message.NewKeysFromStruct(structure.MessageKeys[i])
+ }
+
+ // Build our new chain state.
+ chainState := NewChain(
+ senderRatchetKeyPair,
+ chain.NewKeyFromStruct(structure.ChainKey, kdf.DeriveSecrets),
+ messageKeys,
+ )
+
+ return chainState, nil
+}
+
+// ChainStructure is a serializeable structure for chain states.
+type ChainStructure struct {
+ SenderRatchetKeyPublic []byte
+ SenderRatchetKeyPrivate []byte
+ ChainKey *chain.KeyStructure
+ MessageKeys []*message.KeysStructure
+}
+
+// Chain is a structure used inside the SessionState that keeps
+// track of an ongoing ratcheting chain for a session.
+type Chain struct {
+ senderRatchetKeyPair *ecc.ECKeyPair
+ chainKey *chain.Key
+ messageKeys []*message.Keys
+}
+
+// SenderRatchetKey returns the sender's EC keypair.
+func (c *Chain) SenderRatchetKey() *ecc.ECKeyPair {
+ return c.senderRatchetKeyPair
+}
+
+// SetSenderRatchetKey will set the chain state with the given EC
+// key pair.
+func (c *Chain) SetSenderRatchetKey(key *ecc.ECKeyPair) {
+ c.senderRatchetKeyPair = key
+}
+
+// ChainKey will return the chain key in the chain state.
+func (c *Chain) ChainKey() *chain.Key {
+ return c.chainKey
+}
+
+// SetChainKey will set the chain state's chain key.
+func (c *Chain) SetChainKey(key *chain.Key) {
+ c.chainKey = key
+}
+
+// MessageKeys will return the message keys associated with the
+// chain state.
+func (c *Chain) MessageKeys() []*message.Keys {
+ return c.messageKeys
+}
+
+// SetMessageKeys will set the chain state with the given message
+// keys.
+func (c *Chain) SetMessageKeys(keys []*message.Keys) {
+ c.messageKeys = keys
+}
+
+// AddMessageKeys will append the chain state with the given
+// message keys.
+func (c *Chain) AddMessageKeys(keys *message.Keys) {
+ c.messageKeys = append(c.messageKeys, keys)
+}
+
+// PopFirstMessageKeys will remove the first message key from
+// the chain's list of message keys.
+func (c *Chain) PopFirstMessageKeys() *message.Keys {
+ removed := c.messageKeys[0]
+ c.messageKeys = c.messageKeys[1:]
+
+ return removed
+}
+
+// structure returns a serializeable structure of the chain state.
+func (c *Chain) structure() *ChainStructure {
+ // Alias to ArrayToSlice
+ getSlice := bytehelper.ArrayToSlice
+
+ // Convert our message keys into a serializeable structure.
+ messageKeys := make([]*message.KeysStructure, len(c.messageKeys))
+ for i := range c.messageKeys {
+ messageKeys[i] = message.NewStructFromKeys(c.messageKeys[i])
+ }
+
+ // Convert our sender ratchet key private
+ var senderRatchetKeyPrivate []byte
+ if c.senderRatchetKeyPair.PrivateKey() != nil {
+ senderRatchetKeyPrivate = getSlice(c.senderRatchetKeyPair.PrivateKey().Serialize())
+ }
+
+ // Build the chain structure.
+ return &ChainStructure{
+ SenderRatchetKeyPublic: c.senderRatchetKeyPair.PublicKey().Serialize(),
+ SenderRatchetKeyPrivate: senderRatchetKeyPrivate,
+ ChainKey: chain.NewStructFromKey(c.chainKey),
+ MessageKeys: messageKeys,
+ }
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/Doc.go b/vendor/go.mau.fi/libsignal/state/record/Doc.go
new file mode 100644
index 00000000..036419da
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/Doc.go
@@ -0,0 +1,3 @@
+// Package record provides the state and record of an ongoing double
+// ratchet session.
+package record
diff --git a/vendor/go.mau.fi/libsignal/state/record/PendingKeyExchangeState.go b/vendor/go.mau.fi/libsignal/state/record/PendingKeyExchangeState.go
new file mode 100644
index 00000000..ac647215
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/PendingKeyExchangeState.go
@@ -0,0 +1,91 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+// NewPendingKeyExchange will return a new PendingKeyExchange object.
+func NewPendingKeyExchange(sequence uint32, localBaseKeyPair, localRatchetKeyPair *ecc.ECKeyPair,
+ localIdentityKeyPair *identity.KeyPair) *PendingKeyExchange {
+
+ return &PendingKeyExchange{
+ sequence: sequence,
+ localBaseKeyPair: localBaseKeyPair,
+ localRatchetKeyPair: localRatchetKeyPair,
+ localIdentityKeyPair: localIdentityKeyPair,
+ }
+}
+
+// NewPendingKeyExchangeFromStruct will return a PendingKeyExchange object from
+// the given structure. This is used to get a deserialized pending prekey exchange
+// fetched from persistent storage.
+func NewPendingKeyExchangeFromStruct(structure *PendingKeyExchangeStructure) *PendingKeyExchange {
+ // Return nil if no structure was provided.
+ if structure == nil {
+ return nil
+ }
+
+ // Alias the SliceToArray method.
+ getArray := bytehelper.SliceToArray
+
+ // Convert the bytes in the given structure to ECC objects.
+ localBaseKeyPair := ecc.NewECKeyPair(
+ ecc.NewDjbECPublicKey(getArray(structure.LocalBaseKeyPublic)),
+ ecc.NewDjbECPrivateKey(getArray(structure.LocalBaseKeyPrivate)),
+ )
+ localRatchetKeyPair := ecc.NewECKeyPair(
+ ecc.NewDjbECPublicKey(getArray(structure.LocalRatchetKeyPublic)),
+ ecc.NewDjbECPrivateKey(getArray(structure.LocalRatchetKeyPrivate)),
+ )
+ localIdentityKeyPair := identity.NewKeyPair(
+ identity.NewKey(ecc.NewDjbECPublicKey(getArray(structure.LocalIdentityKeyPublic))),
+ ecc.NewDjbECPrivateKey(getArray(structure.LocalIdentityKeyPrivate)),
+ )
+
+ // Return the PendingKeyExchange with the deserialized keys.
+ return &PendingKeyExchange{
+ sequence: structure.Sequence,
+ localBaseKeyPair: localBaseKeyPair,
+ localRatchetKeyPair: localRatchetKeyPair,
+ localIdentityKeyPair: localIdentityKeyPair,
+ }
+}
+
+// PendingKeyExchangeStructure is a serializable structure for pending
+// key exchanges. This structure is used for persistent storage of the
+// key exchange state.
+type PendingKeyExchangeStructure struct {
+ Sequence uint32
+ LocalBaseKeyPublic []byte
+ LocalBaseKeyPrivate []byte
+ LocalRatchetKeyPublic []byte
+ LocalRatchetKeyPrivate []byte
+ LocalIdentityKeyPublic []byte
+ LocalIdentityKeyPrivate []byte
+}
+
+// PendingKeyExchange is a structure for storing a pending
+// key exchange for a session state.
+type PendingKeyExchange struct {
+ sequence uint32
+ localBaseKeyPair *ecc.ECKeyPair
+ localRatchetKeyPair *ecc.ECKeyPair
+ localIdentityKeyPair *identity.KeyPair
+}
+
+// structre will return a serializable structure of a pending key exchange
+// so it can be persistently stored.
+func (p *PendingKeyExchange) structure() *PendingKeyExchangeStructure {
+ getSlice := bytehelper.ArrayToSlice
+ return &PendingKeyExchangeStructure{
+ Sequence: p.sequence,
+ LocalBaseKeyPublic: getSlice(p.localBaseKeyPair.PublicKey().PublicKey()),
+ LocalBaseKeyPrivate: getSlice(p.localBaseKeyPair.PrivateKey().Serialize()),
+ LocalRatchetKeyPublic: getSlice(p.localRatchetKeyPair.PublicKey().PublicKey()),
+ LocalRatchetKeyPrivate: getSlice(p.localRatchetKeyPair.PrivateKey().Serialize()),
+ LocalIdentityKeyPublic: getSlice(p.localIdentityKeyPair.PublicKey().PublicKey().PublicKey()),
+ LocalIdentityKeyPrivate: getSlice(p.localIdentityKeyPair.PrivateKey().Serialize()),
+ }
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/PendingPreKeyState.go b/vendor/go.mau.fi/libsignal/state/record/PendingPreKeyState.go
new file mode 100644
index 00000000..27a8878b
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/PendingPreKeyState.go
@@ -0,0 +1,62 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+// NewPendingPreKey will return a new pending pre key object.
+func NewPendingPreKey(preKeyID *optional.Uint32, signedPreKeyID uint32,
+ baseKey ecc.ECPublicKeyable) *PendingPreKey {
+
+ return &PendingPreKey{
+ preKeyID: preKeyID,
+ signedPreKeyID: signedPreKeyID,
+ baseKey: baseKey,
+ }
+}
+
+// NewPendingPreKeyFromStruct will return a new pending prekey object from the
+// given structure.
+func NewPendingPreKeyFromStruct(preKey *PendingPreKeyStructure) (*PendingPreKey, error) {
+ baseKey, err := ecc.DecodePoint(preKey.BaseKey, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ pendingPreKey := NewPendingPreKey(
+ preKey.PreKeyID,
+ preKey.SignedPreKeyID,
+ baseKey,
+ )
+
+ return pendingPreKey, nil
+}
+
+// PendingPreKeyStructure is a serializeable structure for pending
+// prekeys.
+type PendingPreKeyStructure struct {
+ PreKeyID *optional.Uint32
+ SignedPreKeyID uint32
+ BaseKey []byte
+}
+
+// PendingPreKey is a structure for pending pre keys
+// for a session state.
+type PendingPreKey struct {
+ preKeyID *optional.Uint32
+ signedPreKeyID uint32
+ baseKey ecc.ECPublicKeyable
+}
+
+// structure will return a serializeable structure of the pending prekey.
+func (p *PendingPreKey) structure() *PendingPreKeyStructure {
+ if p != nil {
+ return &PendingPreKeyStructure{
+ PreKeyID: p.preKeyID,
+ SignedPreKeyID: p.signedPreKeyID,
+ BaseKey: p.baseKey.Serialize(),
+ }
+ }
+ return nil
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/PreKeyRecord.go b/vendor/go.mau.fi/libsignal/state/record/PreKeyRecord.go
new file mode 100644
index 00000000..dcd630d2
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/PreKeyRecord.go
@@ -0,0 +1,90 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/util/bytehelper"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+// PreKeySerializer is an interface for serializing and deserializing
+// PreKey objects into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type PreKeySerializer interface {
+ Serialize(preKey *PreKeyStructure) []byte
+ Deserialize(serialized []byte) (*PreKeyStructure, error)
+}
+
+// NewPreKeyFromBytes will return a prekey record from the given bytes using the given serializer.
+func NewPreKeyFromBytes(serialized []byte, serializer PreKeySerializer) (*PreKey, error) {
+ // Use the given serializer to decode the signal message.
+ preKeyStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewPreKeyFromStruct(preKeyStructure, serializer)
+}
+
+// NewPreKeyFromStruct returns a PreKey record using the given serializable structure.
+func NewPreKeyFromStruct(structure *PreKeyStructure, serializer PreKeySerializer) (*PreKey, error) {
+ // Create the prekey record from the structure.
+ preKey := &PreKey{
+ structure: *structure,
+ serializer: serializer,
+ }
+
+ // Generate the ECC key from bytes.
+ publicKey := ecc.NewDjbECPublicKey(bytehelper.SliceToArray(structure.PublicKey))
+ privateKey := ecc.NewDjbECPrivateKey(bytehelper.SliceToArray(structure.PrivateKey))
+ keyPair := ecc.NewECKeyPair(publicKey, privateKey)
+ preKey.keyPair = keyPair
+
+ return preKey, nil
+}
+
+// NewPreKey record returns a new pre key record that can
+// be stored in a PreKeyStore.
+func NewPreKey(id uint32, keyPair *ecc.ECKeyPair, serializer PreKeySerializer) *PreKey {
+ return &PreKey{
+ structure: PreKeyStructure{
+ ID: id,
+ PublicKey: keyPair.PublicKey().Serialize(),
+ PrivateKey: bytehelper.ArrayToSlice(keyPair.PrivateKey().Serialize()),
+ },
+ keyPair: keyPair,
+ serializer: serializer,
+ }
+}
+
+// PreKeyStructure is a structure for serializing PreKey records.
+type PreKeyStructure struct {
+ ID uint32
+ PublicKey []byte
+ PrivateKey []byte
+}
+
+// PreKey record is a structure for storing pre keys inside
+// a PreKeyStore.
+type PreKey struct {
+ structure PreKeyStructure
+ keyPair *ecc.ECKeyPair
+ serializer PreKeySerializer
+}
+
+// ID returns the pre key record's id.
+func (p *PreKey) ID() *optional.Uint32 {
+ // TODO: manually set this to empty if empty
+ return optional.NewOptionalUint32(p.structure.ID)
+}
+
+// KeyPair returns the pre key record's key pair.
+func (p *PreKey) KeyPair() *ecc.ECKeyPair {
+ return p.keyPair
+}
+
+// Serialize uses the PreKey serializer to return the PreKey
+// as serialized bytes.
+func (p *PreKey) Serialize() []byte {
+ structure := p.structure
+ return p.serializer.Serialize(&structure)
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/SessionRecord.go b/vendor/go.mau.fi/libsignal/state/record/SessionRecord.go
new file mode 100644
index 00000000..01e817e4
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/SessionRecord.go
@@ -0,0 +1,197 @@
+package record
+
+import (
+ "bytes"
+)
+
+// archivedStatesMaxLength describes how many previous session
+// states we should keep track of.
+const archivedStatesMaxLength int = 40
+
+// SessionSerializer is an interface for serializing and deserializing
+// a Signal Session into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SessionSerializer interface {
+ Serialize(state *SessionStructure) []byte
+ Deserialize(serialized []byte) (*SessionStructure, error)
+}
+
+// NewSessionFromBytes will return a Signal Session from the given
+// bytes using the given serializer.
+func NewSessionFromBytes(serialized []byte, serializer SessionSerializer, stateSerializer StateSerializer) (*Session, error) {
+ // Use the given serializer to decode the session.
+ sessionStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSessionFromStructure(sessionStructure, serializer, stateSerializer)
+}
+
+// NewSession creates a new session record and uses the given session and state
+// serializers to convert the object into storeable bytes.
+func NewSession(serializer SessionSerializer, stateSerializer StateSerializer) *Session {
+ record := Session{
+ sessionState: NewState(stateSerializer),
+ previousStates: []*State{},
+ fresh: true,
+ serializer: serializer,
+ }
+
+ return &record
+}
+
+// NewSessionFromStructure will return a new Signal Session from the given
+// session structure and serializer.
+func NewSessionFromStructure(structure *SessionStructure, serializer SessionSerializer,
+ stateSerializer StateSerializer) (*Session, error) {
+
+ // Build our previous states from structure.
+ previousStates := make([]*State, len(structure.PreviousStates))
+ for i := range structure.PreviousStates {
+ var err error
+ previousStates[i], err = NewStateFromStructure(structure.PreviousStates[i], stateSerializer)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Build our current state from structure.
+ sessionState, err := NewStateFromStructure(structure.SessionState, stateSerializer)
+ if err != nil {
+ return nil, err
+ }
+
+ // Build and return our session.
+ session := &Session{
+ previousStates: previousStates,
+ sessionState: sessionState,
+ serializer: serializer,
+ fresh: false,
+ }
+
+ return session, nil
+}
+
+// NewSessionFromState creates a new session record from the given
+// session state.
+func NewSessionFromState(sessionState *State, serializer SessionSerializer) *Session {
+ record := Session{
+ sessionState: sessionState,
+ previousStates: []*State{},
+ fresh: false,
+ serializer: serializer,
+ }
+
+ return &record
+}
+
+// SessionStructure is a public, serializeable structure for Signal
+// Sessions. The states defined in the session are immuteable, as
+// they should not be changed by anyone but the serializer.
+type SessionStructure struct {
+ SessionState *StateStructure
+ PreviousStates []*StateStructure
+}
+
+// Session encapsulates the state of an ongoing session.
+type Session struct {
+ serializer SessionSerializer
+ sessionState *State
+ previousStates []*State
+ fresh bool
+}
+
+// SetState sets the session record's current state to the given
+// one.
+func (r *Session) SetState(sessionState *State) {
+ r.sessionState = sessionState
+}
+
+// IsFresh is used to determine if this is a brand new session
+// or if a session record has already existed.
+func (r *Session) IsFresh() bool {
+ return r.fresh
+}
+
+// SessionState returns the session state object of the current
+// session record.
+func (r *Session) SessionState() *State {
+ return r.sessionState
+}
+
+// PreviousSessionStates returns a list of all currently maintained
+// "previous" session states.
+func (r *Session) PreviousSessionStates() []*State {
+ return r.previousStates
+}
+
+// HasSessionState will check this record to see if the sender's
+// base key exists in the current and previous states.
+func (r *Session) HasSessionState(version int, senderBaseKey []byte) bool {
+ // Ensure the session state version is identical to this one.
+ if r.sessionState.Version() == version && (bytes.Compare(senderBaseKey, r.sessionState.SenderBaseKey()) == 0) {
+ return true
+ }
+
+ // Loop through all of our previous states and see if this
+ // exists in our state.
+ for i := range r.previousStates {
+ if r.previousStates[i].Version() == version && bytes.Compare(senderBaseKey, r.previousStates[i].SenderBaseKey()) == 0 {
+ return true
+ }
+ }
+
+ return false
+}
+
+// ArchiveCurrentState moves the current session state into the list
+// of "previous" session states, and replaces the current session state
+// with a fresh reset instance.
+func (r *Session) ArchiveCurrentState() {
+ r.PromoteState(NewState(r.sessionState.serializer))
+}
+
+// PromoteState takes the given session state and replaces it with the
+// current state, pushing the previous current state to "previousStates".
+func (r *Session) PromoteState(promotedState *State) {
+ r.previousStates = r.prependStates(r.previousStates, r.sessionState)
+ r.sessionState = promotedState
+
+ // Remove the last state if it has reached our maximum length
+ if len(r.previousStates) > archivedStatesMaxLength {
+ r.previousStates = r.removeLastState(r.previousStates)
+ }
+}
+
+// Serialize will return the session as serialized bytes so it can be
+// persistently stored.
+func (r *Session) Serialize() []byte {
+ return r.serializer.Serialize(r.Structure())
+}
+
+// prependStates takes an array/slice of states and prepends it with
+// the given session state.
+func (r *Session) prependStates(states []*State, sessionState *State) []*State {
+ return append([]*State{sessionState}, states...)
+}
+
+// removeLastState takes an array/slice of states and removes the
+// last element from it.
+func (r *Session) removeLastState(states []*State) []*State {
+ return states[:len(states)-1]
+}
+
+// Structure will return a simple serializable session structure
+// from the given structure. This is used for serialization to persistently
+// store a session record.
+func (r *Session) Structure() *SessionStructure {
+ previousStates := make([]*StateStructure, len(r.previousStates))
+ for i := range r.previousStates {
+ previousStates[i] = r.previousStates[i].structure()
+ }
+ return &SessionStructure{
+ SessionState: r.sessionState.structure(),
+ PreviousStates: previousStates,
+ }
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/SessionState.go b/vendor/go.mau.fi/libsignal/state/record/SessionState.go
new file mode 100644
index 00000000..d0f61d5c
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/SessionState.go
@@ -0,0 +1,531 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/kdf"
+ "go.mau.fi/libsignal/keys/chain"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/keys/message"
+ "go.mau.fi/libsignal/keys/root"
+ "go.mau.fi/libsignal/keys/session"
+ "go.mau.fi/libsignal/logger"
+ "go.mau.fi/libsignal/util/errorhelper"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+const maxMessageKeys int = 2000
+const maxReceiverChains int = 5
+
+// StateSerializer is an interface for serializing and deserializing
+// a Signal State into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type StateSerializer interface {
+ Serialize(state *StateStructure) []byte
+ Deserialize(serialized []byte) (*StateStructure, error)
+}
+
+// NewStateFromBytes will return a Signal State from the given
+// bytes using the given serializer.
+func NewStateFromBytes(serialized []byte, serializer StateSerializer) (*State, error) {
+ // Use the given serializer to decode the signal message.
+ stateStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewStateFromStructure(stateStructure, serializer)
+}
+
+// NewState returns a new session state.
+func NewState(serializer StateSerializer) *State {
+ return &State{serializer: serializer}
+}
+
+// NewStateFromStructure will return a new session state with the
+// given state structure.
+func NewStateFromStructure(structure *StateStructure, serializer StateSerializer) (*State, error) {
+ // Keep a list of errors, so they can be handled once.
+ errors := errorhelper.NewMultiError()
+
+ // Convert our ecc keys from bytes into object form.
+ localIdentityPublic, err := ecc.DecodePoint(structure.LocalIdentityPublic, 0)
+ errors.Add(err)
+ remoteIdentityPublic, err := ecc.DecodePoint(structure.RemoteIdentityPublic, 0)
+ errors.Add(err)
+ senderBaseKey, err := ecc.DecodePoint(structure.SenderBaseKey, 0)
+ errors.Add(err)
+ var pendingPreKey *PendingPreKey
+ if structure.PendingPreKey != nil {
+ pendingPreKey, err = NewPendingPreKeyFromStruct(structure.PendingPreKey)
+ errors.Add(err)
+ }
+ senderChain, err := NewChainFromStructure(structure.SenderChain)
+ errors.Add(err)
+
+ // Build our receiver chains from structure.
+ receiverChains := make([]*Chain, len(structure.ReceiverChains))
+ for i := range structure.ReceiverChains {
+ receiverChains[i], err = NewChainFromStructure(structure.ReceiverChains[i])
+ errors.Add(err)
+ }
+
+ // Handle any errors. The first error will always be returned if there are multiple.
+ if errors.HasErrors() {
+ return nil, errors
+ }
+
+ // Build our state object.
+ state := &State{
+ localIdentityPublic: identity.NewKey(localIdentityPublic),
+ localRegistrationID: structure.LocalRegistrationID,
+ needsRefresh: structure.NeedsRefresh,
+ pendingKeyExchange: NewPendingKeyExchangeFromStruct(structure.PendingKeyExchange),
+ pendingPreKey: pendingPreKey,
+ previousCounter: structure.PreviousCounter,
+ receiverChains: receiverChains,
+ remoteIdentityPublic: identity.NewKey(remoteIdentityPublic),
+ remoteRegistrationID: structure.RemoteRegistrationID,
+ rootKey: root.NewKey(kdf.DeriveSecrets, structure.RootKey),
+ senderBaseKey: senderBaseKey,
+ senderChain: senderChain,
+ serializer: serializer,
+ sessionVersion: structure.SessionVersion,
+ }
+
+ return state, nil
+}
+
+// StateStructure is the structure of a session state. Fields are public
+// to be used for serialization and deserialization.
+type StateStructure struct {
+ LocalIdentityPublic []byte
+ LocalRegistrationID uint32
+ NeedsRefresh bool
+ PendingKeyExchange *PendingKeyExchangeStructure
+ PendingPreKey *PendingPreKeyStructure
+ PreviousCounter uint32
+ ReceiverChains []*ChainStructure
+ RemoteIdentityPublic []byte
+ RemoteRegistrationID uint32
+ RootKey []byte
+ SenderBaseKey []byte
+ SenderChain *ChainStructure
+ SessionVersion int
+}
+
+// State is a session state that contains the structure for
+// all sessions. Session states are contained inside session records.
+// The session state is implemented as a struct rather than protobuffers
+// to allow other serialization methods.
+type State struct {
+ localIdentityPublic *identity.Key
+ localRegistrationID uint32
+ needsRefresh bool
+ pendingKeyExchange *PendingKeyExchange
+ pendingPreKey *PendingPreKey
+ previousCounter uint32
+ receiverChains []*Chain
+ remoteIdentityPublic *identity.Key
+ remoteRegistrationID uint32
+ rootKey *root.Key
+ senderBaseKey ecc.ECPublicKeyable
+ senderChain *Chain
+ serializer StateSerializer
+ sessionVersion int
+}
+
+// SenderBaseKey returns the sender's base key in bytes.
+func (s *State) SenderBaseKey() []byte {
+ if s.senderBaseKey == nil {
+ return nil
+ }
+ return s.senderBaseKey.Serialize()
+}
+
+// SetSenderBaseKey sets the sender's base key with the given bytes.
+func (s *State) SetSenderBaseKey(senderBaseKey []byte) {
+ s.senderBaseKey, _ = ecc.DecodePoint(senderBaseKey, 0)
+}
+
+// Version returns the session's version.
+func (s *State) Version() int {
+ return s.sessionVersion
+}
+
+// SetVersion sets the session state's version number.
+func (s *State) SetVersion(version int) {
+ s.sessionVersion = version
+}
+
+// RemoteIdentityKey returns the identity key of the remote user.
+func (s *State) RemoteIdentityKey() *identity.Key {
+ return s.remoteIdentityPublic
+}
+
+// SetRemoteIdentityKey sets this session's identity key for the remote
+// user.
+func (s *State) SetRemoteIdentityKey(identityKey *identity.Key) {
+ s.remoteIdentityPublic = identityKey
+}
+
+// LocalIdentityKey returns the session's identity key for the local
+// user.
+func (s *State) LocalIdentityKey() *identity.Key {
+ return s.localIdentityPublic
+}
+
+// SetLocalIdentityKey sets the session's identity key for the local
+// user.
+func (s *State) SetLocalIdentityKey(identityKey *identity.Key) {
+ s.localIdentityPublic = identityKey
+}
+
+// PreviousCounter returns the counter of the previous message.
+func (s *State) PreviousCounter() uint32 {
+ return s.previousCounter
+}
+
+// SetPreviousCounter sets the counter for the previous message.
+func (s *State) SetPreviousCounter(previousCounter uint32) {
+ s.previousCounter = previousCounter
+}
+
+// RootKey returns the root key for the session.
+func (s *State) RootKey() session.RootKeyable {
+ return s.rootKey
+}
+
+// SetRootKey sets the root key for the session.
+func (s *State) SetRootKey(rootKey session.RootKeyable) {
+ s.rootKey = rootKey.(*root.Key)
+}
+
+// SenderRatchetKey returns the public ratchet key of the sender.
+func (s *State) SenderRatchetKey() ecc.ECPublicKeyable {
+ return s.senderChain.senderRatchetKeyPair.PublicKey()
+}
+
+// SenderRatchetKeyPair returns the public/private ratchet key pair
+// of the sender.
+func (s *State) SenderRatchetKeyPair() *ecc.ECKeyPair {
+ return s.senderChain.senderRatchetKeyPair
+}
+
+// HasReceiverChain will check to see if the session state has
+// the given ephemeral key.
+func (s *State) HasReceiverChain(senderEphemeral ecc.ECPublicKeyable) bool {
+ return s.receiverChain(senderEphemeral) != nil
+}
+
+// HasSenderChain will check to see if the session state has a
+// sender chain.
+func (s *State) HasSenderChain() bool {
+ return s.senderChain != nil
+}
+
+// receiverChain will loop through the session state's receiver chains
+// and compare the given ephemeral key. If it is found, then the chain
+// and index will be returned as a pair.
+func (s *State) receiverChain(senderEphemeral ecc.ECPublicKeyable) *ReceiverChainPair {
+ receiverChains := s.receiverChains
+
+ for i, receiverChain := range receiverChains {
+ chainSenderRatchetKey, err := ecc.DecodePoint(receiverChain.senderRatchetKeyPair.PublicKey().Serialize(), 0)
+ if err != nil {
+ logger.Error("Error getting receiverchain: ", err)
+ }
+
+ // If the chainSenderRatchetKey equals our senderEphemeral key, return it.
+ if chainSenderRatchetKey.PublicKey() == senderEphemeral.PublicKey() {
+ return NewReceiverChainPair(receiverChain, i)
+ }
+ }
+
+ return nil
+}
+
+// ReceiverChainKey will use the given ephemeral key to generate a new
+// chain key.
+func (s *State) ReceiverChainKey(senderEphemeral ecc.ECPublicKeyable) *chain.Key {
+ receiverChainAndIndex := s.receiverChain(senderEphemeral)
+ receiverChain := receiverChainAndIndex.ReceiverChain
+
+ if receiverChainAndIndex == nil || receiverChain == nil {
+ return nil
+ }
+
+ return chain.NewKey(
+ kdf.DeriveSecrets,
+ receiverChain.chainKey.Key(),
+ receiverChain.chainKey.Index(),
+ )
+}
+
+// AddReceiverChain will add the given ratchet key and chain key to the session
+// state.
+func (s *State) AddReceiverChain(senderRatchetKey ecc.ECPublicKeyable, chainKey session.ChainKeyable) {
+ // Create a keypair structure with our sender ratchet key.
+ senderKey := ecc.NewECKeyPair(senderRatchetKey, nil)
+
+ // Create a Chain state object that will hold our sender key, chain key, and
+ // message keys.
+ chain := NewChain(senderKey, chainKey.(*chain.Key), []*message.Keys{})
+
+ // Add the Chain state to our list of receiver chain states.
+ s.receiverChains = append(s.receiverChains, chain)
+
+ // If our list of receiver chains is too big, delete the oldest entry.
+ if len(s.receiverChains) > maxReceiverChains {
+ i := 0
+ s.receiverChains = append(s.receiverChains[:i], s.receiverChains[i+1:]...)
+ }
+}
+
+// SetSenderChain will set the given ratchet key pair and chain key for this session
+// state.
+func (s *State) SetSenderChain(senderRatchetKeyPair *ecc.ECKeyPair, chainKey session.ChainKeyable) {
+ // Create a Chain state object that will hold our sender key, chain key, and
+ // message keys.
+ chain := NewChain(senderRatchetKeyPair, chainKey.(*chain.Key), []*message.Keys{})
+
+ // Set the sender chain.
+ s.senderChain = chain
+}
+
+// SenderChainKey will return the chain key of the session state.
+func (s *State) SenderChainKey() session.ChainKeyable {
+ chainKey := s.senderChain.chainKey
+ return chain.NewKey(kdf.DeriveSecrets, chainKey.Key(), chainKey.Index())
+}
+
+// SetSenderChainKey will set the chain key in the chain state for this session to
+// the given chain key.
+func (s *State) SetSenderChainKey(nextChainKey session.ChainKeyable) {
+ senderChain := s.senderChain
+ senderChain.SetChainKey(nextChainKey.(*chain.Key))
+}
+
+// HasMessageKeys returns true if we have message keys associated with the given
+// sender key and counter.
+func (s *State) HasMessageKeys(senderEphemeral ecc.ECPublicKeyable, counter uint32) bool {
+ // Get our chain state that has our chain key.
+ chainAndIndex := s.receiverChain(senderEphemeral)
+ receiverChain := chainAndIndex.ReceiverChain
+
+ // If the chain is empty, we don't have any message keys.
+ if receiverChain == nil {
+ return false
+ }
+
+ // Get our message keys from our receiver chain.
+ messageKeyList := receiverChain.MessageKeys()
+
+ // Loop through our message keys and compare its index with the
+ // given counter.
+ for _, messageKey := range messageKeyList {
+ if messageKey.Index() == counter {
+ return true
+ }
+ }
+
+ return false
+}
+
+// RemoveMessageKeys removes the message key with the given sender key and
+// counter. It will return the removed message key.
+func (s *State) RemoveMessageKeys(senderEphemeral ecc.ECPublicKeyable, counter uint32) *message.Keys {
+ // Get our chain state that has our chain key.
+ chainAndIndex := s.receiverChain(senderEphemeral)
+ chainKey := chainAndIndex.ReceiverChain
+
+ // If the chain is empty, we don't have any message keys.
+ if chainKey == nil {
+ return nil
+ }
+
+ // Get our message keys from our receiver chain.
+ messageKeyList := chainKey.MessageKeys()
+
+ // Loop through our message keys and compare its index with the
+ // given counter. When we find a match, remove it from our list.
+ var rmIndex int
+ for i, messageKey := range messageKeyList {
+ if messageKey.Index() == counter {
+ rmIndex = i
+ break
+ }
+ }
+
+ // Retrive the message key
+ messageKey := chainKey.messageKeys[rmIndex]
+
+ // Delete the message key from the given position.
+ chainKey.messageKeys = append(chainKey.messageKeys[:rmIndex], chainKey.messageKeys[rmIndex+1:]...)
+
+ return message.NewKeys(
+ messageKey.CipherKey(),
+ messageKey.MacKey(),
+ messageKey.Iv(),
+ messageKey.Index(),
+ )
+}
+
+// SetMessageKeys will update the chain associated with the given sender key with
+// the given message keys.
+func (s *State) SetMessageKeys(senderEphemeral ecc.ECPublicKeyable, messageKeys *message.Keys) {
+ chainAndIndex := s.receiverChain(senderEphemeral)
+ chainState := chainAndIndex.ReceiverChain
+
+ // Add the message keys to our chain state.
+ chainState.AddMessageKeys(
+ message.NewKeys(
+ messageKeys.CipherKey(),
+ messageKeys.MacKey(),
+ messageKeys.Iv(),
+ messageKeys.Index(),
+ ),
+ )
+
+ if len(chainState.MessageKeys()) > maxMessageKeys {
+ chainState.PopFirstMessageKeys()
+ }
+}
+
+// SetReceiverChainKey sets the session's receiver chain key with the given chain key
+// associated with the given senderEphemeral key.
+func (s *State) SetReceiverChainKey(senderEphemeral ecc.ECPublicKeyable, chainKey session.ChainKeyable) {
+ chainAndIndex := s.receiverChain(senderEphemeral)
+ chainState := chainAndIndex.ReceiverChain
+ chainState.SetChainKey(chainKey.(*chain.Key))
+}
+
+// SetPendingKeyExchange will set the session's pending key exchange state to the given
+// sequence and key pairs.
+func (s *State) SetPendingKeyExchange(sequence uint32, ourBaseKey, ourRatchetKey *ecc.ECKeyPair,
+ ourIdentityKey *identity.KeyPair) {
+
+ s.pendingKeyExchange = NewPendingKeyExchange(
+ sequence,
+ ourBaseKey,
+ ourRatchetKey,
+ ourIdentityKey,
+ )
+}
+
+// PendingKeyExchangeSequence will return the session's pending key exchange sequence
+// number.
+func (s *State) PendingKeyExchangeSequence() uint32 {
+ return s.pendingKeyExchange.sequence
+}
+
+// PendingKeyExchangeBaseKeyPair will return the session's pending key exchange base keypair.
+func (s *State) PendingKeyExchangeBaseKeyPair() *ecc.ECKeyPair {
+ return s.pendingKeyExchange.localBaseKeyPair
+}
+
+// PendingKeyExchangeRatchetKeyPair will return the session's pending key exchange ratchet
+// keypair.
+func (s *State) PendingKeyExchangeRatchetKeyPair() *ecc.ECKeyPair {
+ return s.pendingKeyExchange.localRatchetKeyPair
+}
+
+// PendingKeyExchangeIdentityKeyPair will return the session's pending key exchange identity
+// keypair.
+func (s *State) PendingKeyExchangeIdentityKeyPair() *identity.KeyPair {
+ return s.pendingKeyExchange.localIdentityKeyPair
+}
+
+// HasPendingKeyExchange will return true if there is a valid pending key exchange waiting.
+func (s *State) HasPendingKeyExchange() bool {
+ return s.pendingKeyExchange != nil
+}
+
+// SetUnacknowledgedPreKeyMessage will return unacknowledged pre key message with the
+// given key ids and base key.
+func (s *State) SetUnacknowledgedPreKeyMessage(preKeyID *optional.Uint32, signedPreKeyID uint32, baseKey ecc.ECPublicKeyable) {
+ s.pendingPreKey = NewPendingPreKey(
+ preKeyID,
+ signedPreKeyID,
+ baseKey,
+ )
+}
+
+// HasUnacknowledgedPreKeyMessage will return true if this session has an unacknowledged
+// pre key message.
+func (s *State) HasUnacknowledgedPreKeyMessage() bool {
+ return s.pendingPreKey != nil
+}
+
+// UnackPreKeyMessageItems will return the session's unacknowledged pre key messages.
+func (s *State) UnackPreKeyMessageItems() (*UnackPreKeyMessageItems, error) {
+ preKeyID := s.pendingPreKey.preKeyID
+ signedPreKeyID := s.pendingPreKey.signedPreKeyID
+ baseKey, err := ecc.DecodePoint(s.pendingPreKey.baseKey.Serialize(), 0)
+ if err != nil {
+ return nil, err
+ }
+ return NewUnackPreKeyMessageItems(preKeyID, signedPreKeyID, baseKey), nil
+}
+
+// ClearUnackPreKeyMessage will clear the session's pending pre key.
+func (s *State) ClearUnackPreKeyMessage() {
+ s.pendingPreKey = nil
+}
+
+// SetRemoteRegistrationID sets the remote user's registration id.
+func (s *State) SetRemoteRegistrationID(registrationID uint32) {
+ s.remoteRegistrationID = registrationID
+}
+
+// RemoteRegistrationID returns the remote user's registration id.
+func (s *State) RemoteRegistrationID() uint32 {
+ return s.remoteRegistrationID
+}
+
+// SetLocalRegistrationID sets the local user's registration id.
+func (s *State) SetLocalRegistrationID(registrationID uint32) {
+ s.localRegistrationID = registrationID
+}
+
+// LocalRegistrationID returns the local user's registration id.
+func (s *State) LocalRegistrationID() uint32 {
+ return s.localRegistrationID
+}
+
+// Serialize will return the state as bytes using the given serializer.
+func (s *State) Serialize() []byte {
+ return s.serializer.Serialize(s.structure())
+}
+
+// structure will return a serializable structure of the
+// the given state so it can be persistently stored.
+func (s *State) structure() *StateStructure {
+ // Convert our receiver chains into a serializeable structure
+ receiverChains := make([]*ChainStructure, len(s.receiverChains))
+ for i := range s.receiverChains {
+ receiverChains[i] = s.receiverChains[i].structure()
+ }
+
+ // Convert our pending key exchange into a serializeable structure
+ var pendingKeyExchange *PendingKeyExchangeStructure
+ if s.pendingKeyExchange != nil {
+ pendingKeyExchange = s.pendingKeyExchange.structure()
+ }
+
+ // Build and return our state structure.
+ return &StateStructure{
+ LocalIdentityPublic: s.localIdentityPublic.Serialize(),
+ LocalRegistrationID: s.localRegistrationID,
+ NeedsRefresh: s.needsRefresh,
+ PendingKeyExchange: pendingKeyExchange,
+ PendingPreKey: s.pendingPreKey.structure(),
+ PreviousCounter: s.previousCounter,
+ ReceiverChains: receiverChains,
+ RemoteIdentityPublic: s.remoteIdentityPublic.Serialize(),
+ RemoteRegistrationID: s.remoteRegistrationID,
+ RootKey: s.rootKey.Bytes(),
+ SenderBaseKey: s.senderBaseKey.Serialize(),
+ SenderChain: s.senderChain.structure(),
+ SessionVersion: s.sessionVersion,
+ }
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/SignedPreKeyRecord.go b/vendor/go.mau.fi/libsignal/state/record/SignedPreKeyRecord.go
new file mode 100644
index 00000000..f11ab088
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/SignedPreKeyRecord.go
@@ -0,0 +1,112 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/util/bytehelper"
+)
+
+// SignedPreKeySerializer is an interface for serializing and deserializing
+// SignedPreKey objects into bytes. An implementation of this interface should be
+// used to encode/decode the object into JSON, Protobuffers, etc.
+type SignedPreKeySerializer interface {
+ Serialize(signedPreKey *SignedPreKeyStructure) []byte
+ Deserialize(serialized []byte) (*SignedPreKeyStructure, error)
+}
+
+// NewSignedPreKeyFromBytes will return a signed prekey record from the given
+// bytes using the given serializer.
+func NewSignedPreKeyFromBytes(serialized []byte, serializer SignedPreKeySerializer) (*SignedPreKey, error) {
+ // Use the given serializer to decode the signal message.
+ signedPreKeyStructure, err := serializer.Deserialize(serialized)
+ if err != nil {
+ return nil, err
+ }
+
+ return NewSignedPreKeyFromStruct(signedPreKeyStructure, serializer)
+}
+
+// NewSignedPreKeyFromStruct returns a SignedPreKey record using the given
+// serializable structure.
+func NewSignedPreKeyFromStruct(structure *SignedPreKeyStructure,
+ serializer SignedPreKeySerializer) (*SignedPreKey, error) {
+
+ // Create the signed prekey record from the structure.
+ signedPreKey := &SignedPreKey{
+ structure: *structure,
+ serializer: serializer,
+ signature: bytehelper.SliceToArray64(structure.Signature),
+ }
+
+ // Generate the ECC key from bytes.
+ publicKey := ecc.NewDjbECPublicKey(bytehelper.SliceToArray(structure.PublicKey))
+ privateKey := ecc.NewDjbECPrivateKey(bytehelper.SliceToArray(structure.PrivateKey))
+ keyPair := ecc.NewECKeyPair(publicKey, privateKey)
+ signedPreKey.keyPair = keyPair
+
+ return signedPreKey, nil
+}
+
+// NewSignedPreKey record creates a new signed pre key record
+// with the given properties.
+func NewSignedPreKey(id uint32, timestamp int64, keyPair *ecc.ECKeyPair,
+ sig [64]byte, serializer SignedPreKeySerializer) *SignedPreKey {
+
+ return &SignedPreKey{
+ structure: SignedPreKeyStructure{
+ ID: id,
+ Timestamp: timestamp,
+ PublicKey: keyPair.PublicKey().Serialize(),
+ PrivateKey: bytehelper.ArrayToSlice(keyPair.PrivateKey().Serialize()),
+ Signature: bytehelper.ArrayToSlice64(sig),
+ },
+ keyPair: keyPair,
+ signature: sig,
+ serializer: serializer,
+ }
+}
+
+// SignedPreKeyStructure is a flat structure of a signed pre key, used
+// for serialization and deserialization.
+type SignedPreKeyStructure struct {
+ ID uint32
+ PublicKey []byte
+ PrivateKey []byte
+ Signature []byte
+ Timestamp int64
+}
+
+// SignedPreKey record is a structure for storing a signed
+// pre key in a SignedPreKey store.
+type SignedPreKey struct {
+ structure SignedPreKeyStructure
+ keyPair *ecc.ECKeyPair
+ signature [64]byte
+ serializer SignedPreKeySerializer
+}
+
+// ID returns the record's id.
+func (s *SignedPreKey) ID() uint32 {
+ return s.structure.ID
+}
+
+// Timestamp returns the record's timestamp
+func (s *SignedPreKey) Timestamp() int64 {
+ return s.structure.Timestamp
+}
+
+// KeyPair returns the signed pre key record's key pair.
+func (s *SignedPreKey) KeyPair() *ecc.ECKeyPair {
+ return s.keyPair
+}
+
+// Signature returns the record's signed prekey signature.
+func (s *SignedPreKey) Signature() [64]byte {
+ return s.signature
+}
+
+// Serialize uses the SignedPreKey serializer to return the SignedPreKey
+// as serialized bytes.
+func (s *SignedPreKey) Serialize() []byte {
+ structure := s.structure
+ return s.serializer.Serialize(&structure)
+}
diff --git a/vendor/go.mau.fi/libsignal/state/record/UnacknowledgedPreKey.go b/vendor/go.mau.fi/libsignal/state/record/UnacknowledgedPreKey.go
new file mode 100644
index 00000000..61fe0644
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/record/UnacknowledgedPreKey.go
@@ -0,0 +1,69 @@
+package record
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/util/optional"
+)
+
+// NewUnackPreKeyMessageItems returns message items that are unacknowledged.
+func NewUnackPreKeyMessageItems(preKeyID *optional.Uint32, signedPreKeyID uint32,
+ baseKey ecc.ECPublicKeyable) *UnackPreKeyMessageItems {
+
+ return &UnackPreKeyMessageItems{
+ preKeyID: preKeyID,
+ signedPreKeyID: signedPreKeyID,
+ baseKey: baseKey,
+ }
+}
+
+// NewUnackPreKeyMessageItemsFromStruct will return a new unacknowledged prekey
+// message items object from the given structure.
+func NewUnackPreKeyMessageItemsFromStruct(structure *UnackPreKeyMessageItemsStructure) *UnackPreKeyMessageItems {
+ baseKey, _ := ecc.DecodePoint(structure.BaseKey, 0)
+ return NewUnackPreKeyMessageItems(
+ structure.PreKeyID,
+ structure.SignedPreKeyID,
+ baseKey,
+ )
+}
+
+// UnackPreKeyMessageItemsStructure is a serializable structure for unackowledged
+// prekey message items.
+type UnackPreKeyMessageItemsStructure struct {
+ PreKeyID *optional.Uint32
+ SignedPreKeyID uint32
+ BaseKey []byte
+}
+
+// UnackPreKeyMessageItems is a structure for messages that have not been
+// acknowledged.
+type UnackPreKeyMessageItems struct {
+ preKeyID *optional.Uint32
+ signedPreKeyID uint32
+ baseKey ecc.ECPublicKeyable
+}
+
+// PreKeyID returns the prekey id of the unacknowledged message.
+func (u *UnackPreKeyMessageItems) PreKeyID() *optional.Uint32 {
+ return u.preKeyID
+}
+
+// SignedPreKeyID returns the signed prekey id of the unacknowledged message.
+func (u *UnackPreKeyMessageItems) SignedPreKeyID() uint32 {
+ return u.signedPreKeyID
+}
+
+// BaseKey returns the ECC public key of the unacknowledged message.
+func (u *UnackPreKeyMessageItems) BaseKey() ecc.ECPublicKeyable {
+ return u.baseKey
+}
+
+// structure will return a serializable base structure
+// for unacknowledged prekey message items.
+func (u *UnackPreKeyMessageItems) structure() *UnackPreKeyMessageItemsStructure {
+ return &UnackPreKeyMessageItemsStructure{
+ PreKeyID: u.preKeyID,
+ SignedPreKeyID: u.signedPreKeyID,
+ BaseKey: u.baseKey.Serialize(),
+ }
+}
diff --git a/vendor/go.mau.fi/libsignal/state/store/Doc.go b/vendor/go.mau.fi/libsignal/state/store/Doc.go
new file mode 100644
index 00000000..9a018d3d
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/Doc.go
@@ -0,0 +1,3 @@
+// Package store provides the storage interfaces for storing the state of
+// ongoing double ratchet sessions and keys.
+package store
diff --git a/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go b/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go
new file mode 100644
index 00000000..05ad8d1e
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go
@@ -0,0 +1,29 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/protocol"
+)
+
+// IdentityKey provides an interface to identity information.
+type IdentityKey interface {
+ // Get the local client's identity key pair.
+ GetIdentityKeyPair() *identity.KeyPair
+
+ // Return the local client's registration ID.
+ //
+ // Clients should maintain a registration ID, a random number between 1 and 16380
+ // that's generated once at install time.
+ GetLocalRegistrationId() uint32
+
+ // Save a remote client's identity key in our identity store.
+ SaveIdentity(address *protocol.SignalAddress, identityKey *identity.Key)
+
+ // Verify a remote client's identity key.
+ //
+ // Determine whether a remote client's identity is trusted. Trust is based on
+ // 'trust on first use'. This means that an identity key is considered 'trusted'
+ // if there is no entry for the recipient in the local store, or if it matches the
+ // saved key for a recipient in the local store.
+ IsTrustedIdentity(address *protocol.SignalAddress, identityKey *identity.Key) bool
+}
diff --git a/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go b/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go
new file mode 100644
index 00000000..fea2eed0
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go
@@ -0,0 +1,21 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/keys/message"
+)
+
+// MessageKey store is an interface describing the optional local storage
+// of message keys.
+type MessageKey interface {
+ // Load a local message key by id
+ LoadMessageKey(keyID uint32) *message.Keys
+
+ // Store a local message key
+ StoreMessageKey(keyID uint32, key *message.Keys)
+
+ // Check to see if the store contains a message key with id.
+ ContainsMessageKey(keyID uint32) bool
+
+ // Delete a message key from local storage.
+ RemoveMessageKey(keyID uint32)
+}
diff --git a/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go b/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go
new file mode 100644
index 00000000..a132be65
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go
@@ -0,0 +1,21 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/state/record"
+)
+
+// PreKey store is an interface describing the local storage
+// of PreKeyRecords
+type PreKey interface {
+ // Load a local PreKeyRecord
+ LoadPreKey(preKeyID uint32) *record.PreKey
+
+ // Store a local PreKeyRecord
+ StorePreKey(preKeyID uint32, preKeyRecord *record.PreKey)
+
+ // Check to see if the store contains a PreKeyRecord
+ ContainsPreKey(preKeyID uint32) bool
+
+ // Delete a PreKeyRecord from local storage.
+ RemovePreKey(preKeyID uint32)
+}
diff --git a/vendor/go.mau.fi/libsignal/state/store/SessionStore.go b/vendor/go.mau.fi/libsignal/state/store/SessionStore.go
new file mode 100644
index 00000000..e18fc024
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/SessionStore.go
@@ -0,0 +1,17 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/state/record"
+)
+
+// Session store is an interface for the persistent storage of session
+// state information for remote clients.
+type Session interface {
+ LoadSession(address *protocol.SignalAddress) *record.Session
+ GetSubDeviceSessions(name string) []uint32
+ StoreSession(remoteAddress *protocol.SignalAddress, record *record.Session)
+ ContainsSession(remoteAddress *protocol.SignalAddress) bool
+ DeleteSession(remoteAddress *protocol.SignalAddress)
+ DeleteAllSessions()
+}
diff --git a/vendor/go.mau.fi/libsignal/state/store/SignalProtocolStore.go b/vendor/go.mau.fi/libsignal/state/store/SignalProtocolStore.go
new file mode 100644
index 00000000..081e0380
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/SignalProtocolStore.go
@@ -0,0 +1,15 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/groups/state/store"
+)
+
+// SignalProtocol store is an interface that implements the
+// methods for all stores needed in the Signal Protocol.
+type SignalProtocol interface {
+ IdentityKey
+ PreKey
+ Session
+ SignedPreKey
+ store.SenderKey
+}
diff --git a/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go b/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go
new file mode 100644
index 00000000..058cd670
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go
@@ -0,0 +1,24 @@
+package store
+
+import (
+ "go.mau.fi/libsignal/state/record"
+)
+
+// SignedPreKey store is an interface that describes how to persistently
+// store signed PreKeys.
+type SignedPreKey interface {
+ // LoadSignedPreKey loads a local SignedPreKeyRecord
+ LoadSignedPreKey(signedPreKeyID uint32) *record.SignedPreKey
+
+ // LoadSignedPreKeys loads all local SignedPreKeyRecords
+ LoadSignedPreKeys() []*record.SignedPreKey
+
+ // Store a local SignedPreKeyRecord
+ StoreSignedPreKey(signedPreKeyID uint32, record *record.SignedPreKey)
+
+ // Check to see if store contains the given record
+ ContainsSignedPreKey(signedPreKeyID uint32) bool
+
+ // Delete a SignedPreKeyRecord from local storage
+ RemoveSignedPreKey(signedPreKeyID uint32)
+}
diff --git a/vendor/go.mau.fi/libsignal/util/bytehelper/ByteHelper.go b/vendor/go.mau.fi/libsignal/util/bytehelper/ByteHelper.go
new file mode 100644
index 00000000..78f71ae4
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/util/bytehelper/ByteHelper.go
@@ -0,0 +1,97 @@
+package bytehelper
+
+import (
+ "errors"
+)
+
+// SliceToArray will convert byte slice to a 32 byte array
+func SliceToArray(bytes []byte) [32]byte {
+ var byteArray [32]byte
+ copy(byteArray[:], bytes)
+ return byteArray
+}
+
+// SliceToArray64 will convert byte slice to a 64 byte array
+func SliceToArray64(bytes []byte) [64]byte {
+ var byteArray [64]byte
+ copy(byteArray[:], bytes)
+ return byteArray
+}
+
+// ArrayToSlice will convert a 32 byte array to byte slice
+func ArrayToSlice(bytes [32]byte) []byte {
+ return bytes[:]
+}
+
+// ArrayToSlice64 will convert a 64 byte array to byte slice
+func ArrayToSlice64(bytes [64]byte) []byte {
+ return bytes[:]
+}
+
+// Split will take the given byte array and split it into half,
+// with the first half being "firstLength" in size and the second
+// half "secondLength" in size.
+func Split(input []byte, firstLength, secondLength int) [][]byte {
+ parts := make([][]byte, 2)
+
+ parts[0] = make([]byte, firstLength)
+ copy(parts[0], input[:firstLength])
+
+ parts[1] = make([]byte, secondLength)
+ copy(parts[1], input[firstLength:])
+
+ return parts
+}
+
+// SplitThree will take the given byte array and split it into thirds,
+// with the first third being "firstLength" in size, the second third
+// being "secondLength" in size, and the last third being "thirdLength"
+// in size.
+func SplitThree(input []byte, firstLength, secondLength, thirdLength int) ([][]byte, error) {
+ if input == nil || firstLength < 0 || secondLength < 0 || thirdLength < 0 ||
+ len(input) < firstLength+secondLength+thirdLength {
+
+ return nil, errors.New("Input too small: " + string(input))
+ }
+
+ parts := make([][]byte, 3)
+
+ parts[0] = make([]byte, firstLength)
+ copy(parts[0], input[:firstLength])
+
+ parts[1] = make([]byte, secondLength)
+ copy(parts[1], input[firstLength:][:secondLength])
+
+ parts[2] = make([]byte, thirdLength)
+ copy(parts[2], input[firstLength+secondLength:])
+
+ return parts, nil
+}
+
+// Trim will trim the given byte array to the given length.
+func Trim(input []byte, length int) []byte {
+ result := make([]byte, length)
+ copy(result, input[:length])
+
+ return result
+}
+
+// Bytes5ToInt64 will convert the given byte array and offset to an int64.
+func Bytes5ToInt64(bytes []byte, offset int) int64 {
+
+ value := (int64(bytes[offset]&0xff) << 32) |
+ (int64(bytes[offset+1]&0xff) << 24) |
+ (int64(bytes[offset+2]&0xff) << 16) |
+ (int64(bytes[offset+3]&0xff) << 8) |
+ int64(bytes[offset+4]&0xff)
+
+ return value
+}
+
+// CopySlice returns a copy of the given bytes.
+func CopySlice(bytes []byte) []byte {
+ cp := make([]byte, len(bytes))
+ copy(cp, bytes)
+
+ return cp
+}
diff --git a/vendor/go.mau.fi/libsignal/util/errorhelper/ErrorHelper.go b/vendor/go.mau.fi/libsignal/util/errorhelper/ErrorHelper.go
new file mode 100644
index 00000000..b30adb0a
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/util/errorhelper/ErrorHelper.go
@@ -0,0 +1,40 @@
+package errorhelper
+
+// NewMultiError returns a new MultiError object.
+func NewMultiError() *MultiError {
+ return &MultiError{
+ errors: []error{},
+ }
+}
+
+// MultiError is a structure for holding multiple errors so they
+// can be checked at a later point.
+type MultiError struct {
+ errors []error
+}
+
+// Add will add the given error if it is not nil.
+func (m *MultiError) Add(err error) {
+ if err != nil {
+ m.errors = append(m.errors, err)
+ }
+}
+
+// HasErrors will return true if any non-nil errors have been
+// added.
+func (m *MultiError) HasErrors() bool {
+ if len(m.errors) > 0 {
+ return true
+ }
+
+ return false
+}
+
+// Error will print the first error is encountered.
+func (m *MultiError) Error() string {
+ if !m.HasErrors() {
+ return ""
+ }
+
+ return m.errors[0].Error()
+}
diff --git a/vendor/go.mau.fi/libsignal/util/keyhelper/KeyHelper.go b/vendor/go.mau.fi/libsignal/util/keyhelper/KeyHelper.go
new file mode 100644
index 00000000..62481cc1
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/util/keyhelper/KeyHelper.go
@@ -0,0 +1,95 @@
+// Package keyhelper is based on: https://github.com/WhisperSystems/libsignal-protocol-java/blob/master/java/src/main/java/org/whispersystems/libsignal/util/KeyHelper.java
+package keyhelper
+
+import (
+ "crypto/rand"
+ "encoding/binary"
+ "time"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/state/record"
+)
+
+// GenerateIdentityKeyPair generates an identity keypair used for
+// signing. Clients should only do this once at install time.
+func GenerateIdentityKeyPair() (*identity.KeyPair, error) {
+ keyPair, err := ecc.GenerateKeyPair()
+ if err != nil {
+ return nil, err
+ }
+
+ publicKey := identity.NewKey(keyPair.PublicKey())
+ return identity.NewKeyPair(publicKey, keyPair.PrivateKey()), nil
+}
+
+// GeneratePreKeys generates a list of PreKeys. Client shsould do this at
+// install time, and subsequently any time the list of PreKeys stored on
+// the server runs low.
+//
+// PreKeys IDs are shorts, so they will eventually be repeated. Clients
+// should store PreKeys in a circular buffer, so that they are repeated
+// as infrequently as possible.
+func GeneratePreKeys(start int, count int, serializer record.PreKeySerializer) ([]*record.PreKey, error) {
+ var preKeys []*record.PreKey
+
+ for i := start; i <= count; i++ {
+ key, err := ecc.GenerateKeyPair()
+ if err != nil {
+ return nil, err
+ }
+ preKeys = append(preKeys, record.NewPreKey(uint32(i), key, serializer))
+ }
+
+ return preKeys, nil
+}
+
+// GenerateLastResortKey will generate the last resort PreKey. Clients should
+// do this only once, at install time, and durably store it for the length
+// of the install.
+func GenerateLastResortKey(serializer record.PreKeySerializer) (*record.PreKey, error) {
+ keyPair, err := ecc.GenerateKeyPair()
+ if err != nil {
+ return nil, err
+ }
+ return record.NewPreKey(0, keyPair, serializer), nil
+}
+
+// GenerateSignedPreKey generates a signed PreKey.
+func GenerateSignedPreKey(identityKeyPair *identity.KeyPair, signedPreKeyID uint32, serializer record.SignedPreKeySerializer) (*record.SignedPreKey, error) {
+ keyPair, err := ecc.GenerateKeyPair()
+ if err != nil {
+ return nil, err
+ }
+ signature := ecc.CalculateSignature(identityKeyPair.PrivateKey(), keyPair.PublicKey().Serialize())
+ timestamp := time.Now().Unix()
+
+ return record.NewSignedPreKey(signedPreKeyID, timestamp, keyPair, signature, serializer), nil
+}
+
+// GenerateRegistrationID generates a registration ID. Clients should only do
+// this once, at install time.
+func GenerateRegistrationID() uint32 {
+ var n uint32
+ binary.Read(rand.Reader, binary.LittleEndian, &n)
+
+ return n
+}
+
+//---------- Group Stuff ----------------
+
+func GenerateSenderSigningKey() (*ecc.ECKeyPair, error) {
+ return ecc.GenerateKeyPair()
+}
+
+func GenerateSenderKey() []byte {
+ randBytes := make([]byte, 32)
+ rand.Read(randBytes)
+ return randBytes
+}
+
+func GenerateSenderKeyID() uint32 {
+ return GenerateRegistrationID()
+}
+
+//---------- End Group Stuff --------------
diff --git a/vendor/go.mau.fi/libsignal/util/medium/Medium.go b/vendor/go.mau.fi/libsignal/util/medium/Medium.go
new file mode 100644
index 00000000..7a509a8e
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/util/medium/Medium.go
@@ -0,0 +1,4 @@
+package medium
+
+// MaxValue is the maximum possible integer value.
+const MaxValue uint32 = 0xFFFFFF
diff --git a/vendor/go.mau.fi/libsignal/util/optional/Integer.go b/vendor/go.mau.fi/libsignal/util/optional/Integer.go
new file mode 100644
index 00000000..9e43af46
--- /dev/null
+++ b/vendor/go.mau.fi/libsignal/util/optional/Integer.go
@@ -0,0 +1,17 @@
+package optional
+
+// NewOptionalUint32 returns an optional Uint32 structure.
+func NewOptionalUint32(value uint32) *Uint32 {
+ return &Uint32{Value: value, IsEmpty: false}
+}
+
+func NewEmptyUint32() *Uint32 {
+ return &Uint32{IsEmpty: true}
+}
+
+// Uint32 is a simple structure for Uint32 values that can
+// optionally be nil.
+type Uint32 struct {
+ Value uint32
+ IsEmpty bool
+}
diff --git a/vendor/go.mau.fi/whatsmeow/LICENSE b/vendor/go.mau.fi/whatsmeow/LICENSE
new file mode 100644
index 00000000..52d13511
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/LICENSE
@@ -0,0 +1,374 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
diff --git a/vendor/go.mau.fi/whatsmeow/README.md b/vendor/go.mau.fi/whatsmeow/README.md
new file mode 100644
index 00000000..2ddf7d44
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/README.md
@@ -0,0 +1,39 @@
+# whatsmeow
+[![godocs.io](https://godocs.io/go.mau.fi/whatsmeow?status.svg)](https://godocs.io/go.mau.fi/whatsmeow)
+
+whatsmeow is a Go library for the WhatsApp web multidevice API.
+
+This was initially forked from [go-whatsapp] (MIT license), but large parts of
+the code have been rewritten for multidevice support. Parts of the code are
+ported from [WhatsappWeb4j] and [Baileys] (also MIT license).
+
+[go-whatsapp]: https://github.com/Rhymen/go-whatsapp
+[WhatsappWeb4j]: https://github.com/Auties00/WhatsappWeb4j
+[Baileys]: https://github.com/adiwajshing/Baileys
+
+## Discussion
+Matrix room: [#whatsmeow:maunium.net](https://matrix.to/#/#whatsmeow:maunium.net)
+
+## Usage
+The [godoc](https://godocs.io/go.mau.fi/whatsmeow) includes docs for all methods and event types.
+There's also a [simple example](https://godocs.io/go.mau.fi/whatsmeow#example-package) at the top.
+
+Also see [mdtest](./mdtest) for a CLI tool you can easily try out whatsmeow with.
+
+## Features
+Most core features are already present:
+
+* Sending messages to private chats and groups (both text and media)
+* Receiving all messages
+* Managing groups and receiving group change events
+* Joining via invite messages, using and creating invite links
+* Sending and receiving typing notifications
+* Sending and receiving delivery and read receipts
+* Reading app state (contact list, chat pin/mute status, etc)
+* Sending and handling retry receipts if message decryption fails
+
+Things that are not yet implemented:
+
+* Writing app state (contact list, chat pin/mute status, etc)
+* Sending status messages or broadcast list messages (this is not supported on WhatsApp web either)
+* Calls
diff --git a/vendor/go.mau.fi/whatsmeow/appstate.go b/vendor/go.mau.fi/whatsmeow/appstate.go
new file mode 100644
index 00000000..9a4c6c00
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/appstate.go
@@ -0,0 +1,193 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "fmt"
+ "time"
+
+ "go.mau.fi/whatsmeow/appstate"
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+// FetchAppState fetches updates to the given type of app state. If fullSync is true, the current
+// cached state will be removed and all app state patches will be re-fetched from the server.
+func (cli *Client) FetchAppState(name appstate.WAPatchName, fullSync, onlyIfNotSynced bool) error {
+ cli.appStateSyncLock.Lock()
+ defer cli.appStateSyncLock.Unlock()
+ if fullSync {
+ err := cli.Store.AppState.DeleteAppStateVersion(string(name))
+ if err != nil {
+ return fmt.Errorf("failed to reset app state %s version: %w", name, err)
+ }
+ }
+ version, hash, err := cli.Store.AppState.GetAppStateVersion(string(name))
+ if err != nil {
+ return fmt.Errorf("failed to get app state %s version: %w", name, err)
+ }
+ if version == 0 {
+ fullSync = true
+ } else if onlyIfNotSynced {
+ return nil
+ }
+
+ state := appstate.HashState{Version: version, Hash: hash}
+
+ hasMore := true
+ wantSnapshot := fullSync
+ for hasMore {
+ patches, err := cli.fetchAppStatePatches(name, state.Version, wantSnapshot)
+ wantSnapshot = false
+ if err != nil {
+ return fmt.Errorf("failed to fetch app state %s patches: %w", name, err)
+ }
+ hasMore = patches.HasMorePatches
+
+ mutations, newState, err := cli.appStateProc.DecodePatches(patches, state, true)
+ if err != nil {
+ return fmt.Errorf("failed to decode app state %s patches: %w", name, err)
+ }
+ state = newState
+ for _, mutation := range mutations {
+ cli.dispatchAppState(mutation, !fullSync || cli.EmitAppStateEventsOnFullSync)
+ }
+ }
+ if fullSync {
+ cli.Log.Debugf("Full sync of app state %s completed. Current version: %d", name, state.Version)
+ cli.dispatchEvent(&events.AppStateSyncComplete{Name: name})
+ } else {
+ cli.Log.Debugf("Synced app state %s from version %d to %d", name, version, state.Version)
+ }
+ return nil
+}
+
+func (cli *Client) dispatchAppState(mutation appstate.Mutation, dispatchEvts bool) {
+ if mutation.Operation != waProto.SyncdMutation_SET {
+ return
+ }
+
+ if dispatchEvts {
+ cli.dispatchEvent(&events.AppState{Index: mutation.Index, SyncActionValue: mutation.Action})
+ }
+
+ var jid types.JID
+ if len(mutation.Index) > 1 {
+ jid, _ = types.ParseJID(mutation.Index[1])
+ }
+ ts := time.Unix(mutation.Action.GetTimestamp(), 0)
+
+ var storeUpdateError error
+ var eventToDispatch interface{}
+ switch mutation.Index[0] {
+ case "mute":
+ act := mutation.Action.GetMuteAction()
+ eventToDispatch = &events.Mute{JID: jid, Timestamp: ts, Action: act}
+ var mutedUntil time.Time
+ if act.GetMuted() {
+ mutedUntil = time.Unix(act.GetMuteEndTimestamp(), 0)
+ }
+ if cli.Store.ChatSettings != nil {
+ storeUpdateError = cli.Store.ChatSettings.PutMutedUntil(jid, mutedUntil)
+ }
+ case "pin_v1":
+ act := mutation.Action.GetPinAction()
+ eventToDispatch = &events.Pin{JID: jid, Timestamp: ts, Action: act}
+ if cli.Store.ChatSettings != nil {
+ storeUpdateError = cli.Store.ChatSettings.PutPinned(jid, act.GetPinned())
+ }
+ case "archive":
+ act := mutation.Action.GetArchiveChatAction()
+ eventToDispatch = &events.Archive{JID: jid, Timestamp: ts, Action: act}
+ if cli.Store.ChatSettings != nil {
+ storeUpdateError = cli.Store.ChatSettings.PutArchived(jid, act.GetArchived())
+ }
+ case "contact":
+ act := mutation.Action.GetContactAction()
+ eventToDispatch = &events.Contact{JID: jid, Timestamp: ts, Action: act}
+ if cli.Store.Contacts != nil {
+ storeUpdateError = cli.Store.Contacts.PutContactName(jid, act.GetFirstName(), act.GetFullName())
+ }
+ case "star":
+ if len(mutation.Index) < 5 {
+ return
+ }
+ evt := events.Star{
+ ChatJID: jid,
+ MessageID: mutation.Index[2],
+ Timestamp: ts,
+ Action: mutation.Action.GetStarAction(),
+ IsFromMe: mutation.Index[3] == "1",
+ }
+ if mutation.Index[4] != "0" {
+ evt.SenderJID, _ = types.ParseJID(mutation.Index[4])
+ }
+ eventToDispatch = &evt
+ case "deleteMessageForMe":
+ if len(mutation.Index) < 5 {
+ return
+ }
+ evt := events.DeleteForMe{
+ ChatJID: jid,
+ MessageID: mutation.Index[2],
+ Timestamp: ts,
+ Action: mutation.Action.GetDeleteMessageForMeAction(),
+ IsFromMe: mutation.Index[3] == "1",
+ }
+ if mutation.Index[4] != "0" {
+ evt.SenderJID, _ = types.ParseJID(mutation.Index[4])
+ }
+ eventToDispatch = &evt
+ case "setting_pushName":
+ eventToDispatch = &events.PushNameSetting{Timestamp: ts, Action: mutation.Action.GetPushNameSetting()}
+ cli.Store.PushName = mutation.Action.GetPushNameSetting().GetName()
+ err := cli.Store.Save()
+ if err != nil {
+ cli.Log.Errorf("Failed to save device store after updating push name: %v", err)
+ }
+ case "setting_unarchiveChats":
+ eventToDispatch = &events.UnarchiveChatsSetting{Timestamp: ts, Action: mutation.Action.GetUnarchiveChatsSetting()}
+ }
+ if storeUpdateError != nil {
+ cli.Log.Errorf("Failed to update device store after app state mutation: %v", storeUpdateError)
+ }
+ if dispatchEvts && eventToDispatch != nil {
+ cli.dispatchEvent(eventToDispatch)
+ }
+}
+
+func (cli *Client) downloadExternalAppStateBlob(ref *waProto.ExternalBlobReference) ([]byte, error) {
+ return cli.Download(ref)
+}
+
+func (cli *Client) fetchAppStatePatches(name appstate.WAPatchName, fromVersion uint64, snapshot bool) (*appstate.PatchList, error) {
+ attrs := waBinary.Attrs{
+ "name": string(name),
+ "return_snapshot": snapshot,
+ }
+ if !snapshot {
+ attrs["version"] = fromVersion
+ }
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "w:sync:app:state",
+ Type: "set",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{
+ Tag: "sync",
+ Content: []waBinary.Node{{
+ Tag: "collection",
+ Attrs: attrs,
+ }},
+ }},
+ })
+ if err != nil {
+ return nil, err
+ }
+ return appstate.ParsePatchList(resp, cli.downloadExternalAppStateBlob)
+}
diff --git a/vendor/go.mau.fi/whatsmeow/appstate/decode.go b/vendor/go.mau.fi/whatsmeow/appstate/decode.go
new file mode 100644
index 00000000..5c895470
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/appstate/decode.go
@@ -0,0 +1,310 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package appstate
+
+import (
+ "bytes"
+ "crypto/sha256"
+ "encoding/json"
+ "fmt"
+
+ "google.golang.org/protobuf/proto"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/store"
+ "go.mau.fi/whatsmeow/util/cbcutil"
+)
+
+// PatchList represents a decoded response to getting app state patches from the WhatsApp servers.
+type PatchList struct {
+ Name WAPatchName
+ HasMorePatches bool
+ Patches []*waProto.SyncdPatch
+ Snapshot *waProto.SyncdSnapshot
+}
+
+// DownloadExternalFunc is a function that can download a blob of external app state patches.
+type DownloadExternalFunc func(*waProto.ExternalBlobReference) ([]byte, error)
+
+func parseSnapshotInternal(collection *waBinary.Node, downloadExternal DownloadExternalFunc) (*waProto.SyncdSnapshot, error) {
+ snapshotNode := collection.GetChildByTag("snapshot")
+ rawSnapshot, ok := snapshotNode.Content.([]byte)
+ if snapshotNode.Tag != "snapshot" || !ok {
+ return nil, nil
+ }
+ var snapshot waProto.ExternalBlobReference
+ err := proto.Unmarshal(rawSnapshot, &snapshot)
+ if err != nil {
+ return nil, fmt.Errorf("failed to unmarshal snapshot: %w", err)
+ }
+ var rawData []byte
+ rawData, err = downloadExternal(&snapshot)
+ if err != nil {
+ return nil, fmt.Errorf("failed to download external mutations: %w", err)
+ }
+ var downloaded waProto.SyncdSnapshot
+ err = proto.Unmarshal(rawData, &downloaded)
+ if err != nil {
+ return nil, fmt.Errorf("failed to unmarshal mutation list: %w", err)
+ }
+ return &downloaded, nil
+}
+
+func parsePatchListInternal(collection *waBinary.Node, downloadExternal DownloadExternalFunc) ([]*waProto.SyncdPatch, error) {
+ patchesNode := collection.GetChildByTag("patches")
+ patchNodes := patchesNode.GetChildren()
+ patches := make([]*waProto.SyncdPatch, 0, len(patchNodes))
+ for i, patchNode := range patchNodes {
+ rawPatch, ok := patchNode.Content.([]byte)
+ if patchNode.Tag != "patch" || !ok {
+ continue
+ }
+ var patch waProto.SyncdPatch
+ err := proto.Unmarshal(rawPatch, &patch)
+ if err != nil {
+ return nil, fmt.Errorf("failed to unmarshal patch #%d: %w", i+1, err)
+ }
+ if patch.GetExternalMutations() != nil && downloadExternal != nil {
+ var rawData []byte
+ rawData, err = downloadExternal(patch.GetExternalMutations())
+ if err != nil {
+ return nil, fmt.Errorf("failed to download external mutations: %w", err)
+ }
+ var downloaded waProto.SyncdMutations
+ err = proto.Unmarshal(rawData, &downloaded)
+ if err != nil {
+ return nil, fmt.Errorf("failed to unmarshal mutation list: %w", err)
+ } else if len(downloaded.GetMutations()) == 0 {
+ return nil, fmt.Errorf("didn't get any mutations from download")
+ }
+ patch.Mutations = downloaded.Mutations
+ }
+ patches = append(patches, &patch)
+ }
+ return patches, nil
+}
+
+// ParsePatchList will decode an XML node containing app state patches, including downloading any external blobs.
+func ParsePatchList(node *waBinary.Node, downloadExternal DownloadExternalFunc) (*PatchList, error) {
+ collection := node.GetChildByTag("sync", "collection")
+ ag := collection.AttrGetter()
+ snapshot, err := parseSnapshotInternal(&collection, downloadExternal)
+ if err != nil {
+ return nil, err
+ }
+ patches, err := parsePatchListInternal(&collection, downloadExternal)
+ if err != nil {
+ return nil, err
+ }
+ list := &PatchList{
+ Name: WAPatchName(ag.String("name")),
+ HasMorePatches: ag.OptionalBool("has_more_patches"),
+ Patches: patches,
+ Snapshot: snapshot,
+ }
+ return list, ag.Error()
+}
+
+type patchOutput struct {
+ RemovedMACs [][]byte
+ AddedMACs []store.AppStateMutationMAC
+ Mutations []Mutation
+}
+
+func (proc *Processor) decodeMutations(mutations []*waProto.SyncdMutation, out *patchOutput, validateMACs bool) error {
+ for i, mutation := range mutations {
+ keyID := mutation.GetRecord().GetKeyId().GetId()
+ keys, err := proc.getAppStateKey(keyID)
+ if err != nil {
+ return fmt.Errorf("failed to get key %X to decode mutation: %w", keyID, err)
+ }
+ content := mutation.GetRecord().GetValue().GetBlob()
+ content, valueMAC := content[:len(content)-32], content[len(content)-32:]
+ if validateMACs {
+ expectedValueMAC := generateContentMAC(mutation.GetOperation(), content, keyID, keys.ValueMAC)
+ if !bytes.Equal(expectedValueMAC, valueMAC) {
+ return fmt.Errorf("failed to verify mutation #%d: %w", i+1, ErrMismatchingContentMAC)
+ }
+ }
+ iv, content := content[:16], content[16:]
+ plaintext, err := cbcutil.Decrypt(keys.ValueEncryption, iv, content)
+ if err != nil {
+ return fmt.Errorf("failed to decrypt mutation #%d: %w", i+1, err)
+ }
+ var syncAction waProto.SyncActionData
+ err = proto.Unmarshal(plaintext, &syncAction)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal mutation #%d: %w", i+1, err)
+ }
+ indexMAC := mutation.GetRecord().GetIndex().GetBlob()
+ if validateMACs {
+ expectedIndexMAC := concatAndHMAC(sha256.New, keys.Index, syncAction.Index)
+ if !bytes.Equal(expectedIndexMAC, indexMAC) {
+ return fmt.Errorf("failed to verify mutation #%d: %w", i+1, ErrMismatchingIndexMAC)
+ }
+ }
+ var index []string
+ err = json.Unmarshal(syncAction.GetIndex(), &index)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal index of mutation #%d: %w", i+1, err)
+ }
+ if mutation.GetOperation() == waProto.SyncdMutation_REMOVE {
+ out.RemovedMACs = append(out.RemovedMACs, indexMAC)
+ } else if mutation.GetOperation() == waProto.SyncdMutation_SET {
+ out.AddedMACs = append(out.AddedMACs, store.AppStateMutationMAC{
+ IndexMAC: indexMAC,
+ ValueMAC: valueMAC,
+ })
+ }
+ out.Mutations = append(out.Mutations, Mutation{
+ Operation: mutation.GetOperation(),
+ Action: syncAction.GetValue(),
+ Index: index,
+ IndexMAC: indexMAC,
+ ValueMAC: valueMAC,
+ })
+ }
+ return nil
+}
+
+func (proc *Processor) storeMACs(name WAPatchName, currentState HashState, out *patchOutput) {
+ err := proc.Store.AppState.PutAppStateVersion(string(name), currentState.Version, currentState.Hash)
+ if err != nil {
+ proc.Log.Errorf("Failed to update app state version in the database: %v", err)
+ }
+ err = proc.Store.AppState.DeleteAppStateMutationMACs(string(name), out.RemovedMACs)
+ if err != nil {
+ proc.Log.Errorf("Failed to remove deleted mutation MACs from the database: %v", err)
+ }
+ err = proc.Store.AppState.PutAppStateMutationMACs(string(name), currentState.Version, out.AddedMACs)
+ if err != nil {
+ proc.Log.Errorf("Failed to insert added mutation MACs to the database: %v", err)
+ }
+}
+
+func (proc *Processor) validateSnapshotMAC(name WAPatchName, currentState HashState, keyID, expectedSnapshotMAC []byte) (keys ExpandedAppStateKeys, err error) {
+ keys, err = proc.getAppStateKey(keyID)
+ if err != nil {
+ err = fmt.Errorf("failed to get key %X to verify patch v%d MACs: %w", keyID, currentState.Version, err)
+ return
+ }
+ snapshotMAC := currentState.generateSnapshotMAC(name, keys.SnapshotMAC)
+ if !bytes.Equal(snapshotMAC, expectedSnapshotMAC) {
+ err = fmt.Errorf("failed to verify patch v%d: %w", currentState.Version, ErrMismatchingLTHash)
+ }
+ return
+}
+
+func (proc *Processor) decodeSnapshot(name WAPatchName, ss *waProto.SyncdSnapshot, initialState HashState, validateMACs bool, newMutationsInput []Mutation) (newMutations []Mutation, currentState HashState, err error) {
+ currentState = initialState
+ currentState.Version = ss.GetVersion().GetVersion()
+
+ encryptedMutations := make([]*waProto.SyncdMutation, len(ss.GetRecords()))
+ for i, record := range ss.GetRecords() {
+ encryptedMutations[i] = &waProto.SyncdMutation{
+ Operation: waProto.SyncdMutation_SET.Enum(),
+ Record: record,
+ }
+ }
+
+ var warn []error
+ warn, err = currentState.updateHash(encryptedMutations, func(indexMAC []byte, maxIndex int) ([]byte, error) {
+ return nil, nil
+ })
+ if len(warn) > 0 {
+ proc.Log.Warnf("Warnings while updating hash for %s: %+v", name, warn)
+ }
+ if err != nil {
+ err = fmt.Errorf("failed to update state hash: %w", err)
+ return
+ }
+
+ if validateMACs {
+ _, err = proc.validateSnapshotMAC(name, currentState, ss.GetKeyId().GetId(), ss.GetMac())
+ if err != nil {
+ return
+ }
+ }
+
+ var out patchOutput
+ out.Mutations = newMutationsInput
+ err = proc.decodeMutations(encryptedMutations, &out, validateMACs)
+ if err != nil {
+ err = fmt.Errorf("failed to decode snapshot of v%d: %w", currentState.Version, err)
+ return
+ }
+ proc.storeMACs(name, currentState, &out)
+ newMutations = out.Mutations
+ return
+}
+
+// DecodePatches will decode all the patches in a PatchList into a list of app state mutations.
+func (proc *Processor) DecodePatches(list *PatchList, initialState HashState, validateMACs bool) (newMutations []Mutation, currentState HashState, err error) {
+ currentState = initialState
+ var expectedLength int
+ if list.Snapshot != nil {
+ expectedLength = len(list.Snapshot.GetRecords())
+ }
+ for _, patch := range list.Patches {
+ expectedLength += len(patch.GetMutations())
+ }
+ newMutations = make([]Mutation, 0, expectedLength)
+
+ if list.Snapshot != nil {
+ newMutations, currentState, err = proc.decodeSnapshot(list.Name, list.Snapshot, currentState, validateMACs, newMutations)
+ if err != nil {
+ return
+ }
+ }
+
+ for _, patch := range list.Patches {
+ version := patch.GetVersion().GetVersion()
+ currentState.Version = version
+ var warn []error
+ warn, err = currentState.updateHash(patch.GetMutations(), func(indexMAC []byte, maxIndex int) ([]byte, error) {
+ for i := maxIndex - 1; i >= 0; i-- {
+ if bytes.Equal(patch.Mutations[i].GetRecord().GetIndex().GetBlob(), indexMAC) {
+ value := patch.Mutations[i].GetRecord().GetValue().GetBlob()
+ return value[len(value)-32:], nil
+ }
+ }
+ // Previous value not found in current patch, look in the database
+ return proc.Store.AppState.GetAppStateMutationMAC(string(list.Name), indexMAC)
+ })
+ if len(warn) > 0 {
+ proc.Log.Warnf("Warnings while updating hash for %s: %+v", list.Name, warn)
+ }
+ if err != nil {
+ err = fmt.Errorf("failed to update state hash: %w", err)
+ return
+ }
+
+ if validateMACs {
+ var keys ExpandedAppStateKeys
+ keys, err = proc.validateSnapshotMAC(list.Name, currentState, patch.GetKeyId().GetId(), patch.GetSnapshotMac())
+ if err != nil {
+ return
+ }
+ patchMAC := generatePatchMAC(patch, list.Name, keys.PatchMAC)
+ if !bytes.Equal(patchMAC, patch.GetPatchMac()) {
+ err = fmt.Errorf("failed to verify patch v%d: %w", version, ErrMismatchingPatchMAC)
+ return
+ }
+ }
+
+ var out patchOutput
+ out.Mutations = newMutations
+ err = proc.decodeMutations(patch.GetMutations(), &out, validateMACs)
+ if err != nil {
+ return
+ }
+ proc.storeMACs(list.Name, currentState, &out)
+ newMutations = out.Mutations
+ }
+ return
+}
diff --git a/vendor/go.mau.fi/whatsmeow/appstate/errors.go b/vendor/go.mau.fi/whatsmeow/appstate/errors.go
new file mode 100644
index 00000000..0668d86a
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/appstate/errors.go
@@ -0,0 +1,19 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package appstate
+
+import "errors"
+
+// Errors that this package can return.
+var (
+ ErrMissingPreviousSetValueOperation = errors.New("missing value MAC of previous SET operation")
+ ErrMismatchingLTHash = errors.New("mismatching LTHash")
+ ErrMismatchingPatchMAC = errors.New("mismatching patch MAC")
+ ErrMismatchingContentMAC = errors.New("mismatching content MAC")
+ ErrMismatchingIndexMAC = errors.New("mismatching index MAC")
+ ErrKeyNotFound = errors.New("didn't find app state key")
+)
diff --git a/vendor/go.mau.fi/whatsmeow/appstate/hash.go b/vendor/go.mau.fi/whatsmeow/appstate/hash.go
new file mode 100644
index 00000000..4fdbabf6
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/appstate/hash.go
@@ -0,0 +1,96 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package appstate
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+ "crypto/sha512"
+ "encoding/binary"
+ "fmt"
+ "hash"
+
+ "go.mau.fi/whatsmeow/appstate/lthash"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+)
+
+type Mutation struct {
+ Operation waProto.SyncdMutation_SyncdMutationSyncdOperation
+ Action *waProto.SyncActionValue
+ Index []string
+ IndexMAC []byte
+ ValueMAC []byte
+}
+
+type HashState struct {
+ Version uint64
+ Hash [128]byte
+}
+
+func (hs *HashState) updateHash(mutations []*waProto.SyncdMutation, getPrevSetValueMAC func(indexMAC []byte, maxIndex int) ([]byte, error)) ([]error, error) {
+ var added, removed [][]byte
+ var warnings []error
+
+ for i, mutation := range mutations {
+ if mutation.GetOperation() == waProto.SyncdMutation_SET {
+ value := mutation.GetRecord().GetValue().GetBlob()
+ added = append(added, value[len(value)-32:])
+ }
+ indexMAC := mutation.GetRecord().GetIndex().GetBlob()
+ removal, err := getPrevSetValueMAC(indexMAC, i)
+ if err != nil {
+ return warnings, fmt.Errorf("failed to get value MAC of previous SET operation: %w", err)
+ } else if removal != nil {
+ removed = append(removed, removal)
+ } else if mutation.GetOperation() == waProto.SyncdMutation_REMOVE {
+ // TODO figure out if there are certain cases that are safe to ignore and others that aren't
+ // At least removing contact access from WhatsApp seems to create a REMOVE op for your own JID
+ // that points to a non-existent index and is safe to ignore here. Other keys might not be safe to ignore.
+ warnings = append(warnings, fmt.Errorf("%w for %X", ErrMissingPreviousSetValueOperation, indexMAC))
+ //return ErrMissingPreviousSetValueOperation
+ }
+ }
+
+ lthash.WAPatchIntegrity.SubtractThenAddInPlace(hs.Hash[:], removed, added)
+ return warnings, nil
+}
+
+func uint64ToBytes(val uint64) []byte {
+ data := make([]byte, 8)
+ binary.BigEndian.PutUint64(data, val)
+ return data
+}
+
+func concatAndHMAC(alg func() hash.Hash, key []byte, data ...[]byte) []byte {
+ h := hmac.New(alg, key)
+ for _, item := range data {
+ h.Write(item)
+ }
+ return h.Sum(nil)
+}
+
+func (hs *HashState) generateSnapshotMAC(name WAPatchName, key []byte) []byte {
+ return concatAndHMAC(sha256.New, key, hs.Hash[:], uint64ToBytes(hs.Version), []byte(name))
+}
+
+func generatePatchMAC(patch *waProto.SyncdPatch, name WAPatchName, key []byte) []byte {
+ dataToHash := make([][]byte, len(patch.GetMutations())+3)
+ dataToHash[0] = patch.GetSnapshotMac()
+ for i, mutation := range patch.Mutations {
+ val := mutation.GetRecord().GetValue().GetBlob()
+ dataToHash[i+1] = val[len(val)-32:]
+ }
+ dataToHash[len(dataToHash)-2] = uint64ToBytes(patch.GetVersion().GetVersion())
+ dataToHash[len(dataToHash)-1] = []byte(name)
+ return concatAndHMAC(sha256.New, key, dataToHash...)
+}
+
+func generateContentMAC(operation waProto.SyncdMutation_SyncdMutationSyncdOperation, data, keyID, key []byte) []byte {
+ operationBytes := []byte{byte(operation) + 1}
+ keyDataLength := uint64ToBytes(uint64(len(keyID) + 1))
+ return concatAndHMAC(sha512.New, key, operationBytes, keyID, data, keyDataLength)[:32]
+}
diff --git a/vendor/go.mau.fi/whatsmeow/appstate/keys.go b/vendor/go.mau.fi/whatsmeow/appstate/keys.go
new file mode 100644
index 00000000..30ecbcc4
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/appstate/keys.go
@@ -0,0 +1,85 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package appstate implements encoding and decoding WhatsApp's app state patches.
+package appstate
+
+import (
+ "encoding/base64"
+ "sync"
+
+ "go.mau.fi/whatsmeow/store"
+ "go.mau.fi/whatsmeow/util/hkdfutil"
+ waLog "go.mau.fi/whatsmeow/util/log"
+)
+
+// WAPatchName represents a type of app state patch.
+type WAPatchName string
+
+const (
+ // WAPatchCriticalBlock contains the user's settings like push name and locale.
+ WAPatchCriticalBlock WAPatchName = "critical_block"
+ // WAPatchCriticalUnblockLow contains the user's contact list.
+ WAPatchCriticalUnblockLow WAPatchName = "critical_unblock_low"
+ // WAPatchRegularLow contains some local chat settings like pin, archive status, and the setting of whether to unarchive chats when messages come in.
+ WAPatchRegularLow WAPatchName = "regular_low"
+ // WAPatchRegularHigh contains more local chat settings like mute status and starred messages.
+ WAPatchRegularHigh WAPatchName = "regular_high"
+ // WAPatchRegular contains protocol info about app state patches like key expiration.
+ WAPatchRegular WAPatchName = "regular"
+)
+
+// AllPatchNames contains all currently known patch state names.
+var AllPatchNames = [...]WAPatchName{WAPatchCriticalBlock, WAPatchCriticalUnblockLow, WAPatchRegularHigh, WAPatchRegular, WAPatchRegularLow}
+
+type Processor struct {
+ keyCache map[string]ExpandedAppStateKeys
+ keyCacheLock sync.Mutex
+ Store *store.Device
+ Log waLog.Logger
+}
+
+func NewProcessor(store *store.Device, log waLog.Logger) *Processor {
+ return &Processor{
+ keyCache: make(map[string]ExpandedAppStateKeys),
+ Store: store,
+ Log: log,
+ }
+}
+
+type ExpandedAppStateKeys struct {
+ Index []byte
+ ValueEncryption []byte
+ ValueMAC []byte
+ SnapshotMAC []byte
+ PatchMAC []byte
+}
+
+func expandAppStateKeys(keyData []byte) (keys ExpandedAppStateKeys) {
+ appStateKeyExpanded := hkdfutil.SHA256(keyData, nil, []byte("WhatsApp Mutation Keys"), 160)
+ return ExpandedAppStateKeys{appStateKeyExpanded[0:32], appStateKeyExpanded[32:64], appStateKeyExpanded[64:96], appStateKeyExpanded[96:128], appStateKeyExpanded[128:160]}
+}
+
+func (proc *Processor) getAppStateKey(keyID []byte) (keys ExpandedAppStateKeys, err error) {
+ keyCacheID := base64.RawStdEncoding.EncodeToString(keyID)
+ var ok bool
+
+ proc.keyCacheLock.Lock()
+ defer proc.keyCacheLock.Unlock()
+
+ keys, ok = proc.keyCache[keyCacheID]
+ if !ok {
+ var keyData *store.AppStateSyncKey
+ keyData, err = proc.Store.AppStateKeys.GetAppStateSyncKey(keyID)
+ if keyData != nil {
+ keys = expandAppStateKeys(keyData.Data)
+ proc.keyCache[keyCacheID] = keys
+ } else if err == nil {
+ err = ErrKeyNotFound
+ }
+ }
+ return
+}
diff --git a/vendor/go.mau.fi/whatsmeow/appstate/lthash/lthash.go b/vendor/go.mau.fi/whatsmeow/appstate/lthash/lthash.go
new file mode 100644
index 00000000..8d3045d6
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/appstate/lthash/lthash.go
@@ -0,0 +1,58 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package lthash implements a summation based hash algorithm that maintains the
+// integrity of a piece of data over a series of mutations. You can add/remove
+// mutations, and it'll return a hash equal to if the same series of mutations
+// was made sequentially.
+package lthash
+
+import (
+ "encoding/binary"
+
+ "go.mau.fi/whatsmeow/util/hkdfutil"
+)
+
+type LTHash struct {
+ HKDFInfo []byte
+ HKDFSize uint8
+}
+
+// WAPatchIntegrity is a LTHash instance initialized with the details used for verifying integrity of WhatsApp app state sync patches.
+var WAPatchIntegrity = LTHash{[]byte("WhatsApp Patch Integrity"), 128}
+
+func (lth LTHash) SubtractThenAdd(base []byte, subtract, add [][]byte) []byte {
+ output := make([]byte, len(base))
+ copy(output, base)
+ lth.SubtractThenAddInPlace(output, subtract, add)
+ return output
+}
+
+func (lth LTHash) SubtractThenAddInPlace(base []byte, subtract, add [][]byte) {
+ lth.multipleOp(base, subtract, true)
+ lth.multipleOp(base, add, false)
+}
+
+func (lth LTHash) multipleOp(base []byte, input [][]byte, subtract bool) {
+ for _, item := range input {
+ performPointwiseWithOverflow(base, hkdfutil.SHA256(item, nil, lth.HKDFInfo, lth.HKDFSize), subtract)
+ }
+}
+
+func performPointwiseWithOverflow(base, input []byte, subtract bool) []byte {
+ for i := 0; i < len(base); i += 2 {
+ x := binary.LittleEndian.Uint16(base[i : i+2])
+ y := binary.LittleEndian.Uint16(input[i : i+2])
+ var result uint16
+ if subtract {
+ result = x - y
+ } else {
+ result = x + y
+ }
+ binary.LittleEndian.PutUint16(base[i:i+2], result)
+ }
+ return base
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/attrs.go b/vendor/go.mau.fi/whatsmeow/binary/attrs.go
new file mode 100644
index 00000000..35acd396
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/attrs.go
@@ -0,0 +1,177 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package binary
+
+import (
+ "fmt"
+ "strconv"
+
+ "go.mau.fi/whatsmeow/types"
+)
+
+// AttrUtility is a helper struct for reading multiple XML attributes and checking for errors afterwards.
+//
+// The functions return values directly and append any decoding errors to the Errors slice. The
+// slice can then be checked after all necessary attributes are read, instead of having to check
+// each attribute for errors separately.
+type AttrUtility struct {
+ Attrs Attrs
+ Errors []error
+}
+
+// AttrGetter returns the AttrUtility for this Node.
+func (n *Node) AttrGetter() *AttrUtility {
+ return &AttrUtility{Attrs: n.Attrs, Errors: make([]error, 0)}
+}
+
+func (au *AttrUtility) GetJID(key string, require bool) (jidVal types.JID, ok bool) {
+ var val interface{}
+ if val, ok = au.Attrs[key]; !ok {
+ if require {
+ au.Errors = append(au.Errors, fmt.Errorf("didn't find required JID attribute '%s'", key))
+ }
+ } else if jidVal, ok = val.(types.JID); !ok {
+ au.Errors = append(au.Errors, fmt.Errorf("expected attribute '%s' to be JID, but was %T", key, val))
+ }
+ return
+}
+
+// OptionalJID returns the JID under the given key. If there's no valid JID under the given key, this will return nil.
+// However, if the attribute is completely missing, this will not store an error.
+func (au *AttrUtility) OptionalJID(key string) *types.JID {
+ jid, ok := au.GetJID(key, false)
+ if ok {
+ return &jid
+ }
+ return nil
+}
+
+// OptionalJIDOrEmpty returns the JID under the given key. If there's no valid JID under the given key, this will return an empty JID.
+// However, if the attribute is completely missing, this will not store an error.
+func (au *AttrUtility) OptionalJIDOrEmpty(key string) types.JID {
+ jid, ok := au.GetJID(key, false)
+ if ok {
+ return jid
+ }
+ return types.EmptyJID
+}
+
+// JID returns the JID under the given key.
+// If there's no valid JID under the given key, an error will be stored and a blank JID struct will be returned.
+func (au *AttrUtility) JID(key string) types.JID {
+ jid, _ := au.GetJID(key, true)
+ return jid
+}
+
+func (au *AttrUtility) GetString(key string, require bool) (strVal string, ok bool) {
+ var val interface{}
+ if val, ok = au.Attrs[key]; !ok {
+ if require {
+ au.Errors = append(au.Errors, fmt.Errorf("didn't find required attribute '%s'", key))
+ }
+ } else if strVal, ok = val.(string); !ok {
+ au.Errors = append(au.Errors, fmt.Errorf("expected attribute '%s' to be string, but was %T", key, val))
+ }
+ return
+}
+
+func (au *AttrUtility) GetInt64(key string, require bool) (int64, bool) {
+ if strVal, ok := au.GetString(key, require); !ok {
+ return 0, false
+ } else if intVal, err := strconv.ParseInt(strVal, 10, 64); err != nil {
+ au.Errors = append(au.Errors, fmt.Errorf("failed to parse int in attribute '%s': %w", key, err))
+ return 0, false
+ } else {
+ return intVal, true
+ }
+}
+
+func (au *AttrUtility) GetUint64(key string, require bool) (uint64, bool) {
+ if strVal, ok := au.GetString(key, require); !ok {
+ return 0, false
+ } else if intVal, err := strconv.ParseUint(strVal, 10, 64); err != nil {
+ au.Errors = append(au.Errors, fmt.Errorf("failed to parse uint in attribute '%s': %w", key, err))
+ return 0, false
+ } else {
+ return intVal, true
+ }
+}
+
+func (au *AttrUtility) GetBool(key string, require bool) (bool, bool) {
+ if strVal, ok := au.GetString(key, require); !ok {
+ return false, false
+ } else if boolVal, err := strconv.ParseBool(strVal); err != nil {
+ au.Errors = append(au.Errors, fmt.Errorf("failed to parse bool in attribute '%s': %w", key, err))
+ return false, false
+ } else {
+ return boolVal, true
+ }
+}
+
+// OptionalString returns the string under the given key.
+func (au *AttrUtility) OptionalString(key string) string {
+ strVal, _ := au.GetString(key, false)
+ return strVal
+}
+
+// String returns the string under the given key.
+// If there's no valid string under the given key, an error will be stored and an empty string will be returned.
+func (au *AttrUtility) String(key string) string {
+ strVal, _ := au.GetString(key, true)
+ return strVal
+}
+
+func (au *AttrUtility) OptionalInt(key string) int {
+ val, _ := au.GetInt64(key, false)
+ return int(val)
+}
+
+func (au *AttrUtility) Int(key string) int {
+ val, _ := au.GetInt64(key, true)
+ return int(val)
+}
+
+func (au *AttrUtility) Int64(key string) int64 {
+ val, _ := au.GetInt64(key, true)
+ return val
+}
+
+func (au *AttrUtility) Uint64(key string) uint64 {
+ val, _ := au.GetUint64(key, true)
+ return val
+}
+
+func (au *AttrUtility) OptionalBool(key string) bool {
+ val, _ := au.GetBool(key, false)
+ return val
+}
+
+func (au *AttrUtility) Bool(key string) bool {
+ val, _ := au.GetBool(key, true)
+ return val
+}
+
+// OK returns true if there are no errors.
+func (au *AttrUtility) OK() bool {
+ return len(au.Errors) == 0
+}
+
+// Error returns the list of errors as a single error interface, or nil if there are no errors.
+func (au *AttrUtility) Error() error {
+ if au.OK() {
+ return nil
+ }
+ return ErrorList(au.Errors)
+}
+
+// ErrorList is a list of errors that implements the error interface itself.
+type ErrorList []error
+
+// Error returns all the errors in the list as a string.
+func (el ErrorList) Error() string {
+ return fmt.Sprintf("%+v", []error(el))
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/decoder.go b/vendor/go.mau.fi/whatsmeow/binary/decoder.go
new file mode 100644
index 00000000..f13f9b42
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/decoder.go
@@ -0,0 +1,353 @@
+package binary
+
+import (
+ "fmt"
+ "io"
+ "strings"
+
+ "go.mau.fi/whatsmeow/binary/token"
+ "go.mau.fi/whatsmeow/types"
+)
+
+type binaryDecoder struct {
+ data []byte
+ index int
+}
+
+func newDecoder(data []byte) *binaryDecoder {
+ return &binaryDecoder{data, 0}
+}
+
+func (r *binaryDecoder) checkEOS(length int) error {
+ if r.index+length > len(r.data) {
+ return io.EOF
+ }
+
+ return nil
+}
+
+func (r *binaryDecoder) readByte() (byte, error) {
+ if err := r.checkEOS(1); err != nil {
+ return 0, err
+ }
+
+ b := r.data[r.index]
+ r.index++
+
+ return b, nil
+}
+
+func (r *binaryDecoder) readIntN(n int, littleEndian bool) (int, error) {
+ if err := r.checkEOS(n); err != nil {
+ return 0, err
+ }
+
+ var ret int
+
+ for i := 0; i < n; i++ {
+ var curShift int
+ if littleEndian {
+ curShift = i
+ } else {
+ curShift = n - i - 1
+ }
+ ret |= int(r.data[r.index+i]) << uint(curShift*8)
+ }
+
+ r.index += n
+ return ret, nil
+}
+
+func (r *binaryDecoder) readInt8(littleEndian bool) (int, error) {
+ return r.readIntN(1, littleEndian)
+}
+
+func (r *binaryDecoder) readInt16(littleEndian bool) (int, error) {
+ return r.readIntN(2, littleEndian)
+}
+
+func (r *binaryDecoder) readInt20() (int, error) {
+ if err := r.checkEOS(3); err != nil {
+ return 0, err
+ }
+
+ ret := ((int(r.data[r.index]) & 15) << 16) + (int(r.data[r.index+1]) << 8) + int(r.data[r.index+2])
+ r.index += 3
+ return ret, nil
+}
+
+func (r *binaryDecoder) readInt32(littleEndian bool) (int, error) {
+ return r.readIntN(4, littleEndian)
+}
+
+func (r *binaryDecoder) readPacked8(tag int) (string, error) {
+ startByte, err := r.readByte()
+ if err != nil {
+ return "", err
+ }
+
+ var build strings.Builder
+
+ for i := 0; i < int(startByte&127); i++ {
+ currByte, err := r.readByte()
+ if err != nil {
+ return "", err
+ }
+
+ lower, err := unpackByte(tag, currByte&0xF0>>4)
+ if err != nil {
+ return "", err
+ }
+
+ upper, err := unpackByte(tag, currByte&0x0F)
+ if err != nil {
+ return "", err
+ }
+
+ build.WriteByte(lower)
+ build.WriteByte(upper)
+ }
+
+ ret := build.String()
+ if startByte>>7 != 0 {
+ ret = ret[:len(ret)-1]
+ }
+ return ret, nil
+}
+
+func unpackByte(tag int, value byte) (byte, error) {
+ switch tag {
+ case token.Nibble8:
+ return unpackNibble(value)
+ case token.Hex8:
+ return unpackHex(value)
+ default:
+ return 0, fmt.Errorf("unpackByte with unknown tag %d", tag)
+ }
+}
+
+func unpackNibble(value byte) (byte, error) {
+ switch {
+ case value < 10:
+ return '0' + value, nil
+ case value == 10:
+ return '-', nil
+ case value == 11:
+ return '.', nil
+ case value == 15:
+ return 0, nil
+ default:
+ return 0, fmt.Errorf("unpackNibble with value %d", value)
+ }
+}
+
+func unpackHex(value byte) (byte, error) {
+ switch {
+ case value < 10:
+ return '0' + value, nil
+ case value < 16:
+ return 'A' + value - 10, nil
+ default:
+ return 0, fmt.Errorf("unpackHex with value %d", value)
+ }
+}
+
+func (r *binaryDecoder) readListSize(tag int) (int, error) {
+ switch tag {
+ case token.ListEmpty:
+ return 0, nil
+ case token.List8:
+ return r.readInt8(false)
+ case token.List16:
+ return r.readInt16(false)
+ default:
+ return 0, fmt.Errorf("readListSize with unknown tag %d at position %d", tag, r.index)
+ }
+}
+
+func (r *binaryDecoder) read(string bool) (interface{}, error) {
+ tagByte, err := r.readByte()
+ if err != nil {
+ return nil, err
+ }
+ tag := int(tagByte)
+ switch tag {
+ case token.ListEmpty:
+ return nil, nil
+ case token.List8, token.List16:
+ return r.readList(tag)
+ case token.Binary8:
+ size, err := r.readInt8(false)
+ if err != nil {
+ return nil, err
+ }
+
+ return r.readBytesOrString(size, string)
+ case token.Binary20:
+ size, err := r.readInt20()
+ if err != nil {
+ return nil, err
+ }
+
+ return r.readBytesOrString(size, string)
+ case token.Binary32:
+ size, err := r.readInt32(false)
+ if err != nil {
+ return nil, err
+ }
+
+ return r.readBytesOrString(size, string)
+ case token.Dictionary0, token.Dictionary1, token.Dictionary2, token.Dictionary3:
+ i, err := r.readInt8(false)
+ if err != nil {
+ return "", err
+ }
+
+ return token.GetDoubleToken(tag-token.Dictionary0, i)
+ case token.JIDPair:
+ return r.readJIDPair()
+ case token.ADJID:
+ return r.readADJID()
+ case token.Nibble8, token.Hex8:
+ return r.readPacked8(tag)
+ default:
+ if tag >= 1 && tag < len(token.SingleByteTokens) {
+ return token.SingleByteTokens[tag], nil
+ }
+ return "", fmt.Errorf("%w %d at position %d", ErrInvalidToken, tag, r.index)
+ }
+}
+
+func (r *binaryDecoder) readJIDPair() (interface{}, error) {
+ user, err := r.read(true)
+ if err != nil {
+ return nil, err
+ }
+ server, err := r.read(true)
+ if err != nil {
+ return nil, err
+ } else if server == nil {
+ return nil, ErrInvalidJIDType
+ } else if user == nil {
+ return types.NewJID("", server.(string)), nil
+ }
+ return types.NewJID(user.(string), server.(string)), nil
+}
+
+func (r *binaryDecoder) readADJID() (interface{}, error) {
+ agent, err := r.readByte()
+ if err != nil {
+ return nil, err
+ }
+ device, err := r.readByte()
+ if err != nil {
+ return nil, err
+ }
+ user, err := r.read(true)
+ if err != nil {
+ return nil, err
+ }
+ return types.NewADJID(user.(string), agent, device), nil
+}
+
+func (r *binaryDecoder) readAttributes(n int) (Attrs, error) {
+ if n == 0 {
+ return nil, nil
+ }
+
+ ret := make(Attrs)
+ for i := 0; i < n; i++ {
+ keyIfc, err := r.read(true)
+ if err != nil {
+ return nil, err
+ }
+
+ key, ok := keyIfc.(string)
+ if !ok {
+ return nil, fmt.Errorf("%[1]w at position %[3]d (%[2]T): %+[2]v", ErrNonStringKey, key, r.index)
+ }
+
+ ret[key], err = r.read(true)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return ret, nil
+}
+
+func (r *binaryDecoder) readList(tag int) ([]Node, error) {
+ size, err := r.readListSize(tag)
+ if err != nil {
+ return nil, err
+ }
+
+ ret := make([]Node, size)
+ for i := 0; i < size; i++ {
+ n, err := r.readNode()
+
+ if err != nil {
+ return nil, err
+ }
+
+ ret[i] = *n
+ }
+
+ return ret, nil
+}
+
+func (r *binaryDecoder) readNode() (*Node, error) {
+ ret := &Node{}
+
+ size, err := r.readInt8(false)
+ if err != nil {
+ return nil, err
+ }
+ listSize, err := r.readListSize(size)
+ if err != nil {
+ return nil, err
+ }
+
+ rawDesc, err := r.read(true)
+ if err != nil {
+ return nil, err
+ }
+ ret.Tag = rawDesc.(string)
+ if listSize == 0 || ret.Tag == "" {
+ return nil, ErrInvalidNode
+ }
+
+ ret.Attrs, err = r.readAttributes((listSize - 1) >> 1)
+ if err != nil {
+ return nil, err
+ }
+
+ if listSize%2 == 1 {
+ return ret, nil
+ }
+
+ ret.Content, err = r.read(false)
+ return ret, err
+}
+
+func (r *binaryDecoder) readBytesOrString(length int, asString bool) (interface{}, error) {
+ data, err := r.readRaw(length)
+ if err != nil {
+ return nil, err
+ }
+ if asString {
+ return string(data), nil
+ }
+ return data, nil
+}
+
+func (r *binaryDecoder) readRaw(length int) ([]byte, error) {
+ if err := r.checkEOS(length); err != nil {
+ return nil, err
+ }
+
+ ret := r.data[r.index : r.index+length]
+ r.index += length
+
+ return ret, nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/encoder.go b/vendor/go.mau.fi/whatsmeow/binary/encoder.go
new file mode 100644
index 00000000..7def56b9
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/encoder.go
@@ -0,0 +1,293 @@
+package binary
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+
+ "go.mau.fi/whatsmeow/binary/token"
+ "go.mau.fi/whatsmeow/types"
+)
+
+type binaryEncoder struct {
+ data []byte
+}
+
+func newEncoder() *binaryEncoder {
+ return &binaryEncoder{[]byte{0}}
+}
+
+func (w *binaryEncoder) getData() []byte {
+ return w.data
+}
+
+func (w *binaryEncoder) pushByte(b byte) {
+ w.data = append(w.data, b)
+}
+
+func (w *binaryEncoder) pushBytes(bytes []byte) {
+ w.data = append(w.data, bytes...)
+}
+
+func (w *binaryEncoder) pushIntN(value, n int, littleEndian bool) {
+ for i := 0; i < n; i++ {
+ var curShift int
+ if littleEndian {
+ curShift = i
+ } else {
+ curShift = n - i - 1
+ }
+ w.pushByte(byte((value >> uint(curShift*8)) & 0xFF))
+ }
+}
+
+func (w *binaryEncoder) pushInt20(value int) {
+ w.pushBytes([]byte{byte((value >> 16) & 0x0F), byte((value >> 8) & 0xFF), byte(value & 0xFF)})
+}
+
+func (w *binaryEncoder) pushInt8(value int) {
+ w.pushIntN(value, 1, false)
+}
+
+func (w *binaryEncoder) pushInt16(value int) {
+ w.pushIntN(value, 2, false)
+}
+
+func (w *binaryEncoder) pushInt32(value int) {
+ w.pushIntN(value, 4, false)
+}
+
+func (w *binaryEncoder) pushString(value string) {
+ w.pushBytes([]byte(value))
+}
+
+func (w *binaryEncoder) writeByteLength(length int) {
+ if length < 256 {
+ w.pushByte(token.Binary8)
+ w.pushInt8(length)
+ } else if length < (1 << 20) {
+ w.pushByte(token.Binary20)
+ w.pushInt20(length)
+ } else if length < math.MaxInt32 {
+ w.pushByte(token.Binary32)
+ w.pushInt32(length)
+ } else {
+ panic(fmt.Errorf("length is too large: %d", length))
+ }
+}
+
+const tagSize = 1
+
+func (w *binaryEncoder) writeNode(n Node) {
+ if n.Tag == "0" {
+ w.pushByte(token.List8)
+ w.pushByte(token.ListEmpty)
+ return
+ }
+
+ hasContent := 0
+ if n.Content != nil {
+ hasContent = 1
+ }
+
+ w.writeListStart(2*len(n.Attrs) + tagSize + hasContent)
+ w.writeString(n.Tag)
+ w.writeAttributes(n.Attrs)
+ if n.Content != nil {
+ w.write(n.Content)
+ }
+}
+
+func (w *binaryEncoder) write(data interface{}) {
+ switch typedData := data.(type) {
+ case nil:
+ w.pushByte(token.ListEmpty)
+ case types.JID:
+ w.writeJID(typedData)
+ case string:
+ w.writeString(typedData)
+ case int:
+ w.writeString(strconv.Itoa(typedData))
+ case int32:
+ w.writeString(strconv.FormatInt(int64(typedData), 10))
+ case uint:
+ w.writeString(strconv.FormatUint(uint64(typedData), 10))
+ case uint32:
+ w.writeString(strconv.FormatUint(uint64(typedData), 10))
+ case int64:
+ w.writeString(strconv.FormatInt(typedData, 10))
+ case uint64:
+ w.writeString(strconv.FormatUint(typedData, 10))
+ case bool:
+ w.writeString(strconv.FormatBool(typedData))
+ case []byte:
+ w.writeBytes(typedData)
+ case []Node:
+ w.writeListStart(len(typedData))
+ for _, n := range typedData {
+ w.writeNode(n)
+ }
+ default:
+ panic(fmt.Errorf("%w: %T", ErrInvalidType, typedData))
+ }
+}
+
+func (w *binaryEncoder) writeString(data string) {
+ var dictIndex byte
+ if tokenIndex, ok := token.IndexOfSingleToken(data); ok {
+ w.pushByte(tokenIndex)
+ } else if dictIndex, tokenIndex, ok = token.IndexOfDoubleByteToken(data); ok {
+ w.pushByte(token.Dictionary0 + dictIndex)
+ w.pushByte(tokenIndex)
+ } else if validateNibble(data) {
+ w.writePackedBytes(data, token.Nibble8)
+ } else if validateHex(data) {
+ w.writePackedBytes(data, token.Hex8)
+ } else {
+ w.writeStringRaw(data)
+ }
+}
+
+func (w *binaryEncoder) writeBytes(value []byte) {
+ w.writeByteLength(len(value))
+ w.pushBytes(value)
+}
+
+func (w *binaryEncoder) writeStringRaw(value string) {
+ w.writeByteLength(len(value))
+ w.pushString(value)
+}
+
+func (w *binaryEncoder) writeJID(jid types.JID) {
+ if jid.AD {
+ w.pushByte(token.ADJID)
+ w.pushByte(jid.Agent)
+ w.pushByte(jid.Device)
+ w.writeString(jid.User)
+ } else {
+ w.pushByte(token.JIDPair)
+ if len(jid.User) == 0 {
+ w.pushByte(token.ListEmpty)
+ } else {
+ w.write(jid.User)
+ }
+ w.write(jid.Server)
+ }
+}
+
+func (w *binaryEncoder) writeAttributes(attributes Attrs) {
+ if attributes == nil {
+ return
+ }
+
+ for key, val := range attributes {
+ if val == "" || val == nil {
+ continue
+ }
+
+ w.writeString(key)
+ w.write(val)
+ }
+}
+
+func (w *binaryEncoder) writeListStart(listSize int) {
+ if listSize == 0 {
+ w.pushByte(byte(token.ListEmpty))
+ } else if listSize < 256 {
+ w.pushByte(byte(token.List8))
+ w.pushInt8(listSize)
+ } else {
+ w.pushByte(byte(token.List16))
+ w.pushInt16(listSize)
+ }
+}
+
+func (w *binaryEncoder) writePackedBytes(value string, dataType int) {
+ if len(value) > token.PackedMax {
+ panic(fmt.Errorf("too many bytes to pack: %d", len(value)))
+ }
+
+ w.pushByte(byte(dataType))
+
+ roundedLength := byte(math.Ceil(float64(len(value)) / 2.0))
+ if len(value)%2 != 0 {
+ roundedLength |= 128
+ }
+ w.pushByte(roundedLength)
+ var packer func(byte) byte
+ if dataType == token.Nibble8 {
+ packer = packNibble
+ } else if dataType == token.Hex8 {
+ packer = packHex
+ } else {
+ // This should only be called with the correct values
+ panic(fmt.Errorf("invalid packed byte data type %v", dataType))
+ }
+ for i, l := 0, len(value)/2; i < l; i++ {
+ w.pushByte(w.packBytePair(packer, value[2*i], value[2*i+1]))
+ }
+ if len(value)%2 != 0 {
+ w.pushByte(w.packBytePair(packer, value[len(value)-1], '\x00'))
+ }
+}
+
+func (w *binaryEncoder) packBytePair(packer func(byte) byte, part1, part2 byte) byte {
+ return (packer(part1) << 4) | packer(part2)
+}
+
+func validateNibble(value string) bool {
+ if len(value) > token.PackedMax {
+ return false
+ }
+ for _, char := range value {
+ if !(char >= '0' && char <= '9') && char != '-' && char != '.' {
+ return false
+ }
+ }
+ return true
+}
+
+func packNibble(value byte) byte {
+ switch value {
+ case '-':
+ return 10
+ case '.':
+ return 11
+ case 0:
+ return 15
+ default:
+ if value >= '0' && value <= '9' {
+ return value - '0'
+ }
+ // This should be validated beforehand
+ panic(fmt.Errorf("invalid string to pack as nibble: %d / '%s'", value, string(value)))
+ }
+}
+
+func validateHex(value string) bool {
+ if len(value) > token.PackedMax {
+ return false
+ }
+ for _, char := range value {
+ if !(char >= '0' && char <= '9') && !(char >= 'A' && char <= 'F') && !(char >= 'a' && char <= 'f') {
+ return false
+ }
+ }
+ return true
+}
+
+func packHex(value byte) byte {
+ switch {
+ case value >= '0' && value <= '9':
+ return value - '0'
+ case value >= 'A' && value <= 'F':
+ return 10 + value - 'A'
+ case value >= 'a' && value <= 'f':
+ return 10 + value - 'a'
+ case value == 0:
+ return 15
+ default:
+ // This should be validated beforehand
+ panic(fmt.Errorf("invalid string to pack as hex: %d / '%s'", value, string(value)))
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/errors.go b/vendor/go.mau.fi/whatsmeow/binary/errors.go
new file mode 100644
index 00000000..2be2d726
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/errors.go
@@ -0,0 +1,12 @@
+package binary
+
+import "errors"
+
+// Errors returned by the binary XML decoder.
+var (
+ ErrInvalidType = errors.New("unsupported payload type")
+ ErrInvalidJIDType = errors.New("invalid JID type")
+ ErrInvalidNode = errors.New("invalid node")
+ ErrInvalidToken = errors.New("invalid token with tag")
+ ErrNonStringKey = errors.New("non-string key")
+)
diff --git a/vendor/go.mau.fi/whatsmeow/binary/node.go b/vendor/go.mau.fi/whatsmeow/binary/node.go
new file mode 100644
index 00000000..e09550f0
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/node.go
@@ -0,0 +1,83 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package binary implements encoding and decoding documents in WhatsApp's binary XML format.
+package binary
+
+// Attrs is a type alias for the attributes of an XML element (Node).
+type Attrs = map[string]interface{}
+
+// Node represents an XML element.
+type Node struct {
+ Tag string // The tag of the element.
+ Attrs Attrs // The attributes of the element.
+ Content interface{} // The content inside the element. Can be nil, a list of Nodes, or a byte array.
+}
+
+// GetChildren returns the Content of the node as a list of nodes. If the content is not a list of nodes, this returns nil.
+func (n *Node) GetChildren() []Node {
+ if n.Content == nil {
+ return nil
+ }
+ children, ok := n.Content.([]Node)
+ if !ok {
+ return nil
+ }
+ return children
+}
+
+// GetChildrenByTag returns the same list as GetChildren, but filters it by tag first.
+func (n *Node) GetChildrenByTag(tag string) (children []Node) {
+ for _, node := range n.GetChildren() {
+ if node.Tag == tag {
+ children = append(children, node)
+ }
+ }
+ return
+}
+
+// GetOptionalChildByTag finds the first child with the given tag and returns it.
+// Each provided tag will recurse in, so this is useful for getting a specific nested element.
+func (n *Node) GetOptionalChildByTag(tags ...string) (val Node, ok bool) {
+ val = *n
+Outer:
+ for _, tag := range tags {
+ for _, child := range val.GetChildren() {
+ if child.Tag == tag {
+ val = child
+ continue Outer
+ }
+ }
+ // If no matching children are found, return false
+ return
+ }
+ // All iterations of loop found a matching child, return it
+ ok = true
+ return
+}
+
+// GetChildByTag does the same thing as GetOptionalChildByTag, but returns the Node directly without the ok boolean.
+func (n *Node) GetChildByTag(tags ...string) Node {
+ node, _ := n.GetOptionalChildByTag(tags...)
+ return node
+}
+
+// Marshal encodes an XML element (Node) into WhatsApp's binary XML representation.
+func Marshal(n Node) ([]byte, error) {
+ w := newEncoder()
+ w.writeNode(n)
+ return w.getData(), nil
+}
+
+// Unmarshal decodes WhatsApp's binary XML representation into a Node.
+func Unmarshal(data []byte) (*Node, error) {
+ r := newDecoder(data)
+ n, err := r.readNode()
+ if err != nil {
+ return nil, err
+ }
+ return n, nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go
new file mode 100644
index 00000000..a60ad611
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go
@@ -0,0 +1,21520 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.27.1-devel
+// protoc v3.12.4
+// source: binary/proto/def.proto
+
+package proto
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+import _ "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 MediaVisibility int32
+
+const (
+ MediaVisibility_DEFAULT MediaVisibility = 0
+ MediaVisibility_OFF MediaVisibility = 1
+ MediaVisibility_ON MediaVisibility = 2
+)
+
+// Enum value maps for MediaVisibility.
+var (
+ MediaVisibility_name = map[int32]string{
+ 0: "DEFAULT",
+ 1: "OFF",
+ 2: "ON",
+ }
+ MediaVisibility_value = map[string]int32{
+ "DEFAULT": 0,
+ "OFF": 1,
+ "ON": 2,
+ }
+)
+
+func (x MediaVisibility) Enum() *MediaVisibility {
+ p := new(MediaVisibility)
+ *p = x
+ return p
+}
+
+func (x MediaVisibility) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MediaVisibility) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[0].Descriptor()
+}
+
+func (MediaVisibility) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[0]
+}
+
+func (x MediaVisibility) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *MediaVisibility) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = MediaVisibility(num)
+ return nil
+}
+
+// Deprecated: Use MediaVisibility.Descriptor instead.
+func (MediaVisibility) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{0}
+}
+
+type UserAgent_UserAgentPlatform int32
+
+const (
+ UserAgent_ANDROID UserAgent_UserAgentPlatform = 0
+ UserAgent_IOS UserAgent_UserAgentPlatform = 1
+ UserAgent_WINDOWS_PHONE UserAgent_UserAgentPlatform = 2
+ UserAgent_BLACKBERRY UserAgent_UserAgentPlatform = 3
+ UserAgent_BLACKBERRYX UserAgent_UserAgentPlatform = 4
+ UserAgent_S40 UserAgent_UserAgentPlatform = 5
+ UserAgent_S60 UserAgent_UserAgentPlatform = 6
+ UserAgent_PYTHON_CLIENT UserAgent_UserAgentPlatform = 7
+ UserAgent_TIZEN UserAgent_UserAgentPlatform = 8
+ UserAgent_ENTERPRISE UserAgent_UserAgentPlatform = 9
+ UserAgent_SMB_ANDROID UserAgent_UserAgentPlatform = 10
+ UserAgent_KAIOS UserAgent_UserAgentPlatform = 11
+ UserAgent_SMB_IOS UserAgent_UserAgentPlatform = 12
+ UserAgent_WINDOWS UserAgent_UserAgentPlatform = 13
+ UserAgent_WEB UserAgent_UserAgentPlatform = 14
+ UserAgent_PORTAL UserAgent_UserAgentPlatform = 15
+ UserAgent_GREEN_ANDROID UserAgent_UserAgentPlatform = 16
+ UserAgent_GREEN_IPHONE UserAgent_UserAgentPlatform = 17
+ UserAgent_BLUE_ANDROID UserAgent_UserAgentPlatform = 18
+ UserAgent_BLUE_IPHONE UserAgent_UserAgentPlatform = 19
+ UserAgent_FBLITE_ANDROID UserAgent_UserAgentPlatform = 20
+ UserAgent_MLITE_ANDROID UserAgent_UserAgentPlatform = 21
+ UserAgent_IGLITE_ANDROID UserAgent_UserAgentPlatform = 22
+ UserAgent_PAGE UserAgent_UserAgentPlatform = 23
+ UserAgent_MACOS UserAgent_UserAgentPlatform = 24
+ UserAgent_OCULUS_MSG UserAgent_UserAgentPlatform = 25
+ UserAgent_OCULUS_CALL UserAgent_UserAgentPlatform = 26
+ UserAgent_MILAN UserAgent_UserAgentPlatform = 27
+ UserAgent_CAPI UserAgent_UserAgentPlatform = 28
+)
+
+// Enum value maps for UserAgent_UserAgentPlatform.
+var (
+ UserAgent_UserAgentPlatform_name = map[int32]string{
+ 0: "ANDROID",
+ 1: "IOS",
+ 2: "WINDOWS_PHONE",
+ 3: "BLACKBERRY",
+ 4: "BLACKBERRYX",
+ 5: "S40",
+ 6: "S60",
+ 7: "PYTHON_CLIENT",
+ 8: "TIZEN",
+ 9: "ENTERPRISE",
+ 10: "SMB_ANDROID",
+ 11: "KAIOS",
+ 12: "SMB_IOS",
+ 13: "WINDOWS",
+ 14: "WEB",
+ 15: "PORTAL",
+ 16: "GREEN_ANDROID",
+ 17: "GREEN_IPHONE",
+ 18: "BLUE_ANDROID",
+ 19: "BLUE_IPHONE",
+ 20: "FBLITE_ANDROID",
+ 21: "MLITE_ANDROID",
+ 22: "IGLITE_ANDROID",
+ 23: "PAGE",
+ 24: "MACOS",
+ 25: "OCULUS_MSG",
+ 26: "OCULUS_CALL",
+ 27: "MILAN",
+ 28: "CAPI",
+ }
+ UserAgent_UserAgentPlatform_value = map[string]int32{
+ "ANDROID": 0,
+ "IOS": 1,
+ "WINDOWS_PHONE": 2,
+ "BLACKBERRY": 3,
+ "BLACKBERRYX": 4,
+ "S40": 5,
+ "S60": 6,
+ "PYTHON_CLIENT": 7,
+ "TIZEN": 8,
+ "ENTERPRISE": 9,
+ "SMB_ANDROID": 10,
+ "KAIOS": 11,
+ "SMB_IOS": 12,
+ "WINDOWS": 13,
+ "WEB": 14,
+ "PORTAL": 15,
+ "GREEN_ANDROID": 16,
+ "GREEN_IPHONE": 17,
+ "BLUE_ANDROID": 18,
+ "BLUE_IPHONE": 19,
+ "FBLITE_ANDROID": 20,
+ "MLITE_ANDROID": 21,
+ "IGLITE_ANDROID": 22,
+ "PAGE": 23,
+ "MACOS": 24,
+ "OCULUS_MSG": 25,
+ "OCULUS_CALL": 26,
+ "MILAN": 27,
+ "CAPI": 28,
+ }
+)
+
+func (x UserAgent_UserAgentPlatform) Enum() *UserAgent_UserAgentPlatform {
+ p := new(UserAgent_UserAgentPlatform)
+ *p = x
+ return p
+}
+
+func (x UserAgent_UserAgentPlatform) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserAgent_UserAgentPlatform) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[1].Descriptor()
+}
+
+func (UserAgent_UserAgentPlatform) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[1]
+}
+
+func (x UserAgent_UserAgentPlatform) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *UserAgent_UserAgentPlatform) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = UserAgent_UserAgentPlatform(num)
+ return nil
+}
+
+// Deprecated: Use UserAgent_UserAgentPlatform.Descriptor instead.
+func (UserAgent_UserAgentPlatform) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{1, 0}
+}
+
+type UserAgent_UserAgentReleaseChannel int32
+
+const (
+ UserAgent_RELEASE UserAgent_UserAgentReleaseChannel = 0
+ UserAgent_BETA UserAgent_UserAgentReleaseChannel = 1
+ UserAgent_ALPHA UserAgent_UserAgentReleaseChannel = 2
+ UserAgent_DEBUG UserAgent_UserAgentReleaseChannel = 3
+)
+
+// Enum value maps for UserAgent_UserAgentReleaseChannel.
+var (
+ UserAgent_UserAgentReleaseChannel_name = map[int32]string{
+ 0: "RELEASE",
+ 1: "BETA",
+ 2: "ALPHA",
+ 3: "DEBUG",
+ }
+ UserAgent_UserAgentReleaseChannel_value = map[string]int32{
+ "RELEASE": 0,
+ "BETA": 1,
+ "ALPHA": 2,
+ "DEBUG": 3,
+ }
+)
+
+func (x UserAgent_UserAgentReleaseChannel) Enum() *UserAgent_UserAgentReleaseChannel {
+ p := new(UserAgent_UserAgentReleaseChannel)
+ *p = x
+ return p
+}
+
+func (x UserAgent_UserAgentReleaseChannel) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserAgent_UserAgentReleaseChannel) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[2].Descriptor()
+}
+
+func (UserAgent_UserAgentReleaseChannel) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[2]
+}
+
+func (x UserAgent_UserAgentReleaseChannel) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *UserAgent_UserAgentReleaseChannel) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = UserAgent_UserAgentReleaseChannel(num)
+ return nil
+}
+
+// Deprecated: Use UserAgent_UserAgentReleaseChannel.Descriptor instead.
+func (UserAgent_UserAgentReleaseChannel) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{1, 1}
+}
+
+type WebInfo_WebInfoWebSubPlatform int32
+
+const (
+ WebInfo_WEB_BROWSER WebInfo_WebInfoWebSubPlatform = 0
+ WebInfo_APP_STORE WebInfo_WebInfoWebSubPlatform = 1
+ WebInfo_WIN_STORE WebInfo_WebInfoWebSubPlatform = 2
+ WebInfo_DARWIN WebInfo_WebInfoWebSubPlatform = 3
+ WebInfo_WIN32 WebInfo_WebInfoWebSubPlatform = 4
+)
+
+// Enum value maps for WebInfo_WebInfoWebSubPlatform.
+var (
+ WebInfo_WebInfoWebSubPlatform_name = map[int32]string{
+ 0: "WEB_BROWSER",
+ 1: "APP_STORE",
+ 2: "WIN_STORE",
+ 3: "DARWIN",
+ 4: "WIN32",
+ }
+ WebInfo_WebInfoWebSubPlatform_value = map[string]int32{
+ "WEB_BROWSER": 0,
+ "APP_STORE": 1,
+ "WIN_STORE": 2,
+ "DARWIN": 3,
+ "WIN32": 4,
+ }
+)
+
+func (x WebInfo_WebInfoWebSubPlatform) Enum() *WebInfo_WebInfoWebSubPlatform {
+ p := new(WebInfo_WebInfoWebSubPlatform)
+ *p = x
+ return p
+}
+
+func (x WebInfo_WebInfoWebSubPlatform) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WebInfo_WebInfoWebSubPlatform) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[3].Descriptor()
+}
+
+func (WebInfo_WebInfoWebSubPlatform) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[3]
+}
+
+func (x WebInfo_WebInfoWebSubPlatform) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *WebInfo_WebInfoWebSubPlatform) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = WebInfo_WebInfoWebSubPlatform(num)
+ return nil
+}
+
+// Deprecated: Use WebInfo_WebInfoWebSubPlatform.Descriptor instead.
+func (WebInfo_WebInfoWebSubPlatform) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{3, 0}
+}
+
+type DNSSource_DNSSourceDNSResolutionMethod int32
+
+const (
+ DNSSource_SYSTEM DNSSource_DNSSourceDNSResolutionMethod = 0
+ DNSSource_GOOGLE DNSSource_DNSSourceDNSResolutionMethod = 1
+ DNSSource_HARDCODED DNSSource_DNSSourceDNSResolutionMethod = 2
+ DNSSource_OVERRIDE DNSSource_DNSSourceDNSResolutionMethod = 3
+ DNSSource_FALLBACK DNSSource_DNSSourceDNSResolutionMethod = 4
+)
+
+// Enum value maps for DNSSource_DNSSourceDNSResolutionMethod.
+var (
+ DNSSource_DNSSourceDNSResolutionMethod_name = map[int32]string{
+ 0: "SYSTEM",
+ 1: "GOOGLE",
+ 2: "HARDCODED",
+ 3: "OVERRIDE",
+ 4: "FALLBACK",
+ }
+ DNSSource_DNSSourceDNSResolutionMethod_value = map[string]int32{
+ "SYSTEM": 0,
+ "GOOGLE": 1,
+ "HARDCODED": 2,
+ "OVERRIDE": 3,
+ "FALLBACK": 4,
+ }
+)
+
+func (x DNSSource_DNSSourceDNSResolutionMethod) Enum() *DNSSource_DNSSourceDNSResolutionMethod {
+ p := new(DNSSource_DNSSourceDNSResolutionMethod)
+ *p = x
+ return p
+}
+
+func (x DNSSource_DNSSourceDNSResolutionMethod) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (DNSSource_DNSSourceDNSResolutionMethod) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[4].Descriptor()
+}
+
+func (DNSSource_DNSSourceDNSResolutionMethod) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[4]
+}
+
+func (x DNSSource_DNSSourceDNSResolutionMethod) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *DNSSource_DNSSourceDNSResolutionMethod) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = DNSSource_DNSSourceDNSResolutionMethod(num)
+ return nil
+}
+
+// Deprecated: Use DNSSource_DNSSourceDNSResolutionMethod.Descriptor instead.
+func (DNSSource_DNSSourceDNSResolutionMethod) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{4, 0}
+}
+
+type ClientPayload_ClientPayloadConnectType int32
+
+const (
+ ClientPayload_CELLULAR_UNKNOWN ClientPayload_ClientPayloadConnectType = 0
+ ClientPayload_WIFI_UNKNOWN ClientPayload_ClientPayloadConnectType = 1
+ ClientPayload_CELLULAR_EDGE ClientPayload_ClientPayloadConnectType = 100
+ ClientPayload_CELLULAR_IDEN ClientPayload_ClientPayloadConnectType = 101
+ ClientPayload_CELLULAR_UMTS ClientPayload_ClientPayloadConnectType = 102
+ ClientPayload_CELLULAR_EVDO ClientPayload_ClientPayloadConnectType = 103
+ ClientPayload_CELLULAR_GPRS ClientPayload_ClientPayloadConnectType = 104
+ ClientPayload_CELLULAR_HSDPA ClientPayload_ClientPayloadConnectType = 105
+ ClientPayload_CELLULAR_HSUPA ClientPayload_ClientPayloadConnectType = 106
+ ClientPayload_CELLULAR_HSPA ClientPayload_ClientPayloadConnectType = 107
+ ClientPayload_CELLULAR_CDMA ClientPayload_ClientPayloadConnectType = 108
+ ClientPayload_CELLULAR_1XRTT ClientPayload_ClientPayloadConnectType = 109
+ ClientPayload_CELLULAR_EHRPD ClientPayload_ClientPayloadConnectType = 110
+ ClientPayload_CELLULAR_LTE ClientPayload_ClientPayloadConnectType = 111
+ ClientPayload_CELLULAR_HSPAP ClientPayload_ClientPayloadConnectType = 112
+)
+
+// Enum value maps for ClientPayload_ClientPayloadConnectType.
+var (
+ ClientPayload_ClientPayloadConnectType_name = map[int32]string{
+ 0: "CELLULAR_UNKNOWN",
+ 1: "WIFI_UNKNOWN",
+ 100: "CELLULAR_EDGE",
+ 101: "CELLULAR_IDEN",
+ 102: "CELLULAR_UMTS",
+ 103: "CELLULAR_EVDO",
+ 104: "CELLULAR_GPRS",
+ 105: "CELLULAR_HSDPA",
+ 106: "CELLULAR_HSUPA",
+ 107: "CELLULAR_HSPA",
+ 108: "CELLULAR_CDMA",
+ 109: "CELLULAR_1XRTT",
+ 110: "CELLULAR_EHRPD",
+ 111: "CELLULAR_LTE",
+ 112: "CELLULAR_HSPAP",
+ }
+ ClientPayload_ClientPayloadConnectType_value = map[string]int32{
+ "CELLULAR_UNKNOWN": 0,
+ "WIFI_UNKNOWN": 1,
+ "CELLULAR_EDGE": 100,
+ "CELLULAR_IDEN": 101,
+ "CELLULAR_UMTS": 102,
+ "CELLULAR_EVDO": 103,
+ "CELLULAR_GPRS": 104,
+ "CELLULAR_HSDPA": 105,
+ "CELLULAR_HSUPA": 106,
+ "CELLULAR_HSPA": 107,
+ "CELLULAR_CDMA": 108,
+ "CELLULAR_1XRTT": 109,
+ "CELLULAR_EHRPD": 110,
+ "CELLULAR_LTE": 111,
+ "CELLULAR_HSPAP": 112,
+ }
+)
+
+func (x ClientPayload_ClientPayloadConnectType) Enum() *ClientPayload_ClientPayloadConnectType {
+ p := new(ClientPayload_ClientPayloadConnectType)
+ *p = x
+ return p
+}
+
+func (x ClientPayload_ClientPayloadConnectType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ClientPayload_ClientPayloadConnectType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[5].Descriptor()
+}
+
+func (ClientPayload_ClientPayloadConnectType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[5]
+}
+
+func (x ClientPayload_ClientPayloadConnectType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ClientPayload_ClientPayloadConnectType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ClientPayload_ClientPayloadConnectType(num)
+ return nil
+}
+
+// Deprecated: Use ClientPayload_ClientPayloadConnectType.Descriptor instead.
+func (ClientPayload_ClientPayloadConnectType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 0}
+}
+
+type ClientPayload_ClientPayloadConnectReason int32
+
+const (
+ ClientPayload_PUSH ClientPayload_ClientPayloadConnectReason = 0
+ ClientPayload_USER_ACTIVATED ClientPayload_ClientPayloadConnectReason = 1
+ ClientPayload_SCHEDULED ClientPayload_ClientPayloadConnectReason = 2
+ ClientPayload_ERROR_RECONNECT ClientPayload_ClientPayloadConnectReason = 3
+ ClientPayload_NETWORK_SWITCH ClientPayload_ClientPayloadConnectReason = 4
+ ClientPayload_PING_RECONNECT ClientPayload_ClientPayloadConnectReason = 5
+)
+
+// Enum value maps for ClientPayload_ClientPayloadConnectReason.
+var (
+ ClientPayload_ClientPayloadConnectReason_name = map[int32]string{
+ 0: "PUSH",
+ 1: "USER_ACTIVATED",
+ 2: "SCHEDULED",
+ 3: "ERROR_RECONNECT",
+ 4: "NETWORK_SWITCH",
+ 5: "PING_RECONNECT",
+ }
+ ClientPayload_ClientPayloadConnectReason_value = map[string]int32{
+ "PUSH": 0,
+ "USER_ACTIVATED": 1,
+ "SCHEDULED": 2,
+ "ERROR_RECONNECT": 3,
+ "NETWORK_SWITCH": 4,
+ "PING_RECONNECT": 5,
+ }
+)
+
+func (x ClientPayload_ClientPayloadConnectReason) Enum() *ClientPayload_ClientPayloadConnectReason {
+ p := new(ClientPayload_ClientPayloadConnectReason)
+ *p = x
+ return p
+}
+
+func (x ClientPayload_ClientPayloadConnectReason) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ClientPayload_ClientPayloadConnectReason) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[6].Descriptor()
+}
+
+func (ClientPayload_ClientPayloadConnectReason) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[6]
+}
+
+func (x ClientPayload_ClientPayloadConnectReason) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ClientPayload_ClientPayloadConnectReason) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ClientPayload_ClientPayloadConnectReason(num)
+ return nil
+}
+
+// Deprecated: Use ClientPayload_ClientPayloadConnectReason.Descriptor instead.
+func (ClientPayload_ClientPayloadConnectReason) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 1}
+}
+
+type ClientPayload_ClientPayloadProduct int32
+
+const (
+ ClientPayload_WHATSAPP ClientPayload_ClientPayloadProduct = 0
+ ClientPayload_MESSENGER ClientPayload_ClientPayloadProduct = 1
+)
+
+// Enum value maps for ClientPayload_ClientPayloadProduct.
+var (
+ ClientPayload_ClientPayloadProduct_name = map[int32]string{
+ 0: "WHATSAPP",
+ 1: "MESSENGER",
+ }
+ ClientPayload_ClientPayloadProduct_value = map[string]int32{
+ "WHATSAPP": 0,
+ "MESSENGER": 1,
+ }
+)
+
+func (x ClientPayload_ClientPayloadProduct) Enum() *ClientPayload_ClientPayloadProduct {
+ p := new(ClientPayload_ClientPayloadProduct)
+ *p = x
+ return p
+}
+
+func (x ClientPayload_ClientPayloadProduct) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ClientPayload_ClientPayloadProduct) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[7].Descriptor()
+}
+
+func (ClientPayload_ClientPayloadProduct) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[7]
+}
+
+func (x ClientPayload_ClientPayloadProduct) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ClientPayload_ClientPayloadProduct) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ClientPayload_ClientPayloadProduct(num)
+ return nil
+}
+
+// Deprecated: Use ClientPayload_ClientPayloadProduct.Descriptor instead.
+func (ClientPayload_ClientPayloadProduct) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 2}
+}
+
+type ClientPayload_ClientPayloadIOSAppExtension int32
+
+const (
+ ClientPayload_SHARE_EXTENSION ClientPayload_ClientPayloadIOSAppExtension = 0
+ ClientPayload_SERVICE_EXTENSION ClientPayload_ClientPayloadIOSAppExtension = 1
+ ClientPayload_INTENTS_EXTENSION ClientPayload_ClientPayloadIOSAppExtension = 2
+)
+
+// Enum value maps for ClientPayload_ClientPayloadIOSAppExtension.
+var (
+ ClientPayload_ClientPayloadIOSAppExtension_name = map[int32]string{
+ 0: "SHARE_EXTENSION",
+ 1: "SERVICE_EXTENSION",
+ 2: "INTENTS_EXTENSION",
+ }
+ ClientPayload_ClientPayloadIOSAppExtension_value = map[string]int32{
+ "SHARE_EXTENSION": 0,
+ "SERVICE_EXTENSION": 1,
+ "INTENTS_EXTENSION": 2,
+ }
+)
+
+func (x ClientPayload_ClientPayloadIOSAppExtension) Enum() *ClientPayload_ClientPayloadIOSAppExtension {
+ p := new(ClientPayload_ClientPayloadIOSAppExtension)
+ *p = x
+ return p
+}
+
+func (x ClientPayload_ClientPayloadIOSAppExtension) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ClientPayload_ClientPayloadIOSAppExtension) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[8].Descriptor()
+}
+
+func (ClientPayload_ClientPayloadIOSAppExtension) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[8]
+}
+
+func (x ClientPayload_ClientPayloadIOSAppExtension) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ClientPayload_ClientPayloadIOSAppExtension) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ClientPayload_ClientPayloadIOSAppExtension(num)
+ return nil
+}
+
+// Deprecated: Use ClientPayload_ClientPayloadIOSAppExtension.Descriptor instead.
+func (ClientPayload_ClientPayloadIOSAppExtension) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{6, 3}
+}
+
+type BizIdentityInfo_BizIdentityInfoVerifiedLevelValue int32
+
+const (
+ BizIdentityInfo_UNKNOWN BizIdentityInfo_BizIdentityInfoVerifiedLevelValue = 0
+ BizIdentityInfo_LOW BizIdentityInfo_BizIdentityInfoVerifiedLevelValue = 1
+ BizIdentityInfo_HIGH BizIdentityInfo_BizIdentityInfoVerifiedLevelValue = 2
+)
+
+// Enum value maps for BizIdentityInfo_BizIdentityInfoVerifiedLevelValue.
+var (
+ BizIdentityInfo_BizIdentityInfoVerifiedLevelValue_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "LOW",
+ 2: "HIGH",
+ }
+ BizIdentityInfo_BizIdentityInfoVerifiedLevelValue_value = map[string]int32{
+ "UNKNOWN": 0,
+ "LOW": 1,
+ "HIGH": 2,
+ }
+)
+
+func (x BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) Enum() *BizIdentityInfo_BizIdentityInfoVerifiedLevelValue {
+ p := new(BizIdentityInfo_BizIdentityInfoVerifiedLevelValue)
+ *p = x
+ return p
+}
+
+func (x BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[9].Descriptor()
+}
+
+func (BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[9]
+}
+
+func (x BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = BizIdentityInfo_BizIdentityInfoVerifiedLevelValue(num)
+ return nil
+}
+
+// Deprecated: Use BizIdentityInfo_BizIdentityInfoVerifiedLevelValue.Descriptor instead.
+func (BizIdentityInfo_BizIdentityInfoVerifiedLevelValue) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{13, 0}
+}
+
+type BizIdentityInfo_BizIdentityInfoHostStorageType int32
+
+const (
+ BizIdentityInfo_ON_PREMISE BizIdentityInfo_BizIdentityInfoHostStorageType = 0
+ BizIdentityInfo_FACEBOOK BizIdentityInfo_BizIdentityInfoHostStorageType = 1
+)
+
+// Enum value maps for BizIdentityInfo_BizIdentityInfoHostStorageType.
+var (
+ BizIdentityInfo_BizIdentityInfoHostStorageType_name = map[int32]string{
+ 0: "ON_PREMISE",
+ 1: "FACEBOOK",
+ }
+ BizIdentityInfo_BizIdentityInfoHostStorageType_value = map[string]int32{
+ "ON_PREMISE": 0,
+ "FACEBOOK": 1,
+ }
+)
+
+func (x BizIdentityInfo_BizIdentityInfoHostStorageType) Enum() *BizIdentityInfo_BizIdentityInfoHostStorageType {
+ p := new(BizIdentityInfo_BizIdentityInfoHostStorageType)
+ *p = x
+ return p
+}
+
+func (x BizIdentityInfo_BizIdentityInfoHostStorageType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BizIdentityInfo_BizIdentityInfoHostStorageType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[10].Descriptor()
+}
+
+func (BizIdentityInfo_BizIdentityInfoHostStorageType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[10]
+}
+
+func (x BizIdentityInfo_BizIdentityInfoHostStorageType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *BizIdentityInfo_BizIdentityInfoHostStorageType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = BizIdentityInfo_BizIdentityInfoHostStorageType(num)
+ return nil
+}
+
+// Deprecated: Use BizIdentityInfo_BizIdentityInfoHostStorageType.Descriptor instead.
+func (BizIdentityInfo_BizIdentityInfoHostStorageType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{13, 1}
+}
+
+type BizIdentityInfo_BizIdentityInfoActualActorsType int32
+
+const (
+ BizIdentityInfo_SELF BizIdentityInfo_BizIdentityInfoActualActorsType = 0
+ BizIdentityInfo_BSP BizIdentityInfo_BizIdentityInfoActualActorsType = 1
+)
+
+// Enum value maps for BizIdentityInfo_BizIdentityInfoActualActorsType.
+var (
+ BizIdentityInfo_BizIdentityInfoActualActorsType_name = map[int32]string{
+ 0: "SELF",
+ 1: "BSP",
+ }
+ BizIdentityInfo_BizIdentityInfoActualActorsType_value = map[string]int32{
+ "SELF": 0,
+ "BSP": 1,
+ }
+)
+
+func (x BizIdentityInfo_BizIdentityInfoActualActorsType) Enum() *BizIdentityInfo_BizIdentityInfoActualActorsType {
+ p := new(BizIdentityInfo_BizIdentityInfoActualActorsType)
+ *p = x
+ return p
+}
+
+func (x BizIdentityInfo_BizIdentityInfoActualActorsType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BizIdentityInfo_BizIdentityInfoActualActorsType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[11].Descriptor()
+}
+
+func (BizIdentityInfo_BizIdentityInfoActualActorsType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[11]
+}
+
+func (x BizIdentityInfo_BizIdentityInfoActualActorsType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *BizIdentityInfo_BizIdentityInfoActualActorsType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = BizIdentityInfo_BizIdentityInfoActualActorsType(num)
+ return nil
+}
+
+// Deprecated: Use BizIdentityInfo_BizIdentityInfoActualActorsType.Descriptor instead.
+func (BizIdentityInfo_BizIdentityInfoActualActorsType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{13, 2}
+}
+
+type BizAccountLinkInfo_BizAccountLinkInfoHostStorageType int32
+
+const (
+ BizAccountLinkInfo_ON_PREMISE BizAccountLinkInfo_BizAccountLinkInfoHostStorageType = 0
+ BizAccountLinkInfo_FACEBOOK BizAccountLinkInfo_BizAccountLinkInfoHostStorageType = 1
+)
+
+// Enum value maps for BizAccountLinkInfo_BizAccountLinkInfoHostStorageType.
+var (
+ BizAccountLinkInfo_BizAccountLinkInfoHostStorageType_name = map[int32]string{
+ 0: "ON_PREMISE",
+ 1: "FACEBOOK",
+ }
+ BizAccountLinkInfo_BizAccountLinkInfoHostStorageType_value = map[string]int32{
+ "ON_PREMISE": 0,
+ "FACEBOOK": 1,
+ }
+)
+
+func (x BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) Enum() *BizAccountLinkInfo_BizAccountLinkInfoHostStorageType {
+ p := new(BizAccountLinkInfo_BizAccountLinkInfoHostStorageType)
+ *p = x
+ return p
+}
+
+func (x BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[12].Descriptor()
+}
+
+func (BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[12]
+}
+
+func (x BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = BizAccountLinkInfo_BizAccountLinkInfoHostStorageType(num)
+ return nil
+}
+
+// Deprecated: Use BizAccountLinkInfo_BizAccountLinkInfoHostStorageType.Descriptor instead.
+func (BizAccountLinkInfo_BizAccountLinkInfoHostStorageType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{14, 0}
+}
+
+type BizAccountLinkInfo_BizAccountLinkInfoAccountType int32
+
+const (
+ BizAccountLinkInfo_ENTERPRISE BizAccountLinkInfo_BizAccountLinkInfoAccountType = 0
+)
+
+// Enum value maps for BizAccountLinkInfo_BizAccountLinkInfoAccountType.
+var (
+ BizAccountLinkInfo_BizAccountLinkInfoAccountType_name = map[int32]string{
+ 0: "ENTERPRISE",
+ }
+ BizAccountLinkInfo_BizAccountLinkInfoAccountType_value = map[string]int32{
+ "ENTERPRISE": 0,
+ }
+)
+
+func (x BizAccountLinkInfo_BizAccountLinkInfoAccountType) Enum() *BizAccountLinkInfo_BizAccountLinkInfoAccountType {
+ p := new(BizAccountLinkInfo_BizAccountLinkInfoAccountType)
+ *p = x
+ return p
+}
+
+func (x BizAccountLinkInfo_BizAccountLinkInfoAccountType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BizAccountLinkInfo_BizAccountLinkInfoAccountType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[13].Descriptor()
+}
+
+func (BizAccountLinkInfo_BizAccountLinkInfoAccountType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[13]
+}
+
+func (x BizAccountLinkInfo_BizAccountLinkInfoAccountType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *BizAccountLinkInfo_BizAccountLinkInfoAccountType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = BizAccountLinkInfo_BizAccountLinkInfoAccountType(num)
+ return nil
+}
+
+// Deprecated: Use BizAccountLinkInfo_BizAccountLinkInfoAccountType.Descriptor instead.
+func (BizAccountLinkInfo_BizAccountLinkInfoAccountType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{14, 1}
+}
+
+type SyncdMutation_SyncdMutationSyncdOperation int32
+
+const (
+ SyncdMutation_SET SyncdMutation_SyncdMutationSyncdOperation = 0
+ SyncdMutation_REMOVE SyncdMutation_SyncdMutationSyncdOperation = 1
+)
+
+// Enum value maps for SyncdMutation_SyncdMutationSyncdOperation.
+var (
+ SyncdMutation_SyncdMutationSyncdOperation_name = map[int32]string{
+ 0: "SET",
+ 1: "REMOVE",
+ }
+ SyncdMutation_SyncdMutationSyncdOperation_value = map[string]int32{
+ "SET": 0,
+ "REMOVE": 1,
+ }
+)
+
+func (x SyncdMutation_SyncdMutationSyncdOperation) Enum() *SyncdMutation_SyncdMutationSyncdOperation {
+ p := new(SyncdMutation_SyncdMutationSyncdOperation)
+ *p = x
+ return p
+}
+
+func (x SyncdMutation_SyncdMutationSyncdOperation) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SyncdMutation_SyncdMutationSyncdOperation) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[14].Descriptor()
+}
+
+func (SyncdMutation_SyncdMutationSyncdOperation) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[14]
+}
+
+func (x SyncdMutation_SyncdMutationSyncdOperation) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SyncdMutation_SyncdMutationSyncdOperation) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = SyncdMutation_SyncdMutationSyncdOperation(num)
+ return nil
+}
+
+// Deprecated: Use SyncdMutation_SyncdMutationSyncdOperation.Descriptor instead.
+func (SyncdMutation_SyncdMutationSyncdOperation) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{49, 0}
+}
+
+type MediaRetryNotification_MediaRetryNotificationResultType int32
+
+const (
+ MediaRetryNotification_GENERAL_ERROR MediaRetryNotification_MediaRetryNotificationResultType = 0
+ MediaRetryNotification_SUCCESS MediaRetryNotification_MediaRetryNotificationResultType = 1
+ MediaRetryNotification_NOT_FOUND MediaRetryNotification_MediaRetryNotificationResultType = 2
+ MediaRetryNotification_DECRYPTION_ERROR MediaRetryNotification_MediaRetryNotificationResultType = 3
+)
+
+// Enum value maps for MediaRetryNotification_MediaRetryNotificationResultType.
+var (
+ MediaRetryNotification_MediaRetryNotificationResultType_name = map[int32]string{
+ 0: "GENERAL_ERROR",
+ 1: "SUCCESS",
+ 2: "NOT_FOUND",
+ 3: "DECRYPTION_ERROR",
+ }
+ MediaRetryNotification_MediaRetryNotificationResultType_value = map[string]int32{
+ "GENERAL_ERROR": 0,
+ "SUCCESS": 1,
+ "NOT_FOUND": 2,
+ "DECRYPTION_ERROR": 3,
+ }
+)
+
+func (x MediaRetryNotification_MediaRetryNotificationResultType) Enum() *MediaRetryNotification_MediaRetryNotificationResultType {
+ p := new(MediaRetryNotification_MediaRetryNotificationResultType)
+ *p = x
+ return p
+}
+
+func (x MediaRetryNotification_MediaRetryNotificationResultType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MediaRetryNotification_MediaRetryNotificationResultType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[15].Descriptor()
+}
+
+func (MediaRetryNotification_MediaRetryNotificationResultType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[15]
+}
+
+func (x MediaRetryNotification_MediaRetryNotificationResultType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *MediaRetryNotification_MediaRetryNotificationResultType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = MediaRetryNotification_MediaRetryNotificationResultType(num)
+ return nil
+}
+
+// Deprecated: Use MediaRetryNotification_MediaRetryNotificationResultType.Descriptor instead.
+func (MediaRetryNotification_MediaRetryNotificationResultType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{60, 0}
+}
+
+type GroupParticipant_GroupParticipantRank int32
+
+const (
+ GroupParticipant_REGULAR GroupParticipant_GroupParticipantRank = 0
+ GroupParticipant_ADMIN GroupParticipant_GroupParticipantRank = 1
+ GroupParticipant_SUPERADMIN GroupParticipant_GroupParticipantRank = 2
+)
+
+// Enum value maps for GroupParticipant_GroupParticipantRank.
+var (
+ GroupParticipant_GroupParticipantRank_name = map[int32]string{
+ 0: "REGULAR",
+ 1: "ADMIN",
+ 2: "SUPERADMIN",
+ }
+ GroupParticipant_GroupParticipantRank_value = map[string]int32{
+ "REGULAR": 0,
+ "ADMIN": 1,
+ "SUPERADMIN": 2,
+ }
+)
+
+func (x GroupParticipant_GroupParticipantRank) Enum() *GroupParticipant_GroupParticipantRank {
+ p := new(GroupParticipant_GroupParticipantRank)
+ *p = x
+ return p
+}
+
+func (x GroupParticipant_GroupParticipantRank) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (GroupParticipant_GroupParticipantRank) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[16].Descriptor()
+}
+
+func (GroupParticipant_GroupParticipantRank) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[16]
+}
+
+func (x GroupParticipant_GroupParticipantRank) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *GroupParticipant_GroupParticipantRank) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = GroupParticipant_GroupParticipantRank(num)
+ return nil
+}
+
+// Deprecated: Use GroupParticipant_GroupParticipantRank.Descriptor instead.
+func (GroupParticipant_GroupParticipantRank) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{65, 0}
+}
+
+type Conversation_ConversationEndOfHistoryTransferType int32
+
+const (
+ Conversation_COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY Conversation_ConversationEndOfHistoryTransferType = 0
+ Conversation_COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY Conversation_ConversationEndOfHistoryTransferType = 1
+)
+
+// Enum value maps for Conversation_ConversationEndOfHistoryTransferType.
+var (
+ Conversation_ConversationEndOfHistoryTransferType_name = map[int32]string{
+ 0: "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY",
+ 1: "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY",
+ }
+ Conversation_ConversationEndOfHistoryTransferType_value = map[string]int32{
+ "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY": 0,
+ "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY": 1,
+ }
+)
+
+func (x Conversation_ConversationEndOfHistoryTransferType) Enum() *Conversation_ConversationEndOfHistoryTransferType {
+ p := new(Conversation_ConversationEndOfHistoryTransferType)
+ *p = x
+ return p
+}
+
+func (x Conversation_ConversationEndOfHistoryTransferType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Conversation_ConversationEndOfHistoryTransferType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[17].Descriptor()
+}
+
+func (Conversation_ConversationEndOfHistoryTransferType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[17]
+}
+
+func (x Conversation_ConversationEndOfHistoryTransferType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Conversation_ConversationEndOfHistoryTransferType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Conversation_ConversationEndOfHistoryTransferType(num)
+ return nil
+}
+
+// Deprecated: Use Conversation_ConversationEndOfHistoryTransferType.Descriptor instead.
+func (Conversation_ConversationEndOfHistoryTransferType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{68, 0}
+}
+
+type HistorySync_HistorySyncHistorySyncType int32
+
+const (
+ HistorySync_INITIAL_BOOTSTRAP HistorySync_HistorySyncHistorySyncType = 0
+ HistorySync_INITIAL_STATUS_V3 HistorySync_HistorySyncHistorySyncType = 1
+ HistorySync_FULL HistorySync_HistorySyncHistorySyncType = 2
+ HistorySync_RECENT HistorySync_HistorySyncHistorySyncType = 3
+ HistorySync_PUSH_NAME HistorySync_HistorySyncHistorySyncType = 4
+)
+
+// Enum value maps for HistorySync_HistorySyncHistorySyncType.
+var (
+ HistorySync_HistorySyncHistorySyncType_name = map[int32]string{
+ 0: "INITIAL_BOOTSTRAP",
+ 1: "INITIAL_STATUS_V3",
+ 2: "FULL",
+ 3: "RECENT",
+ 4: "PUSH_NAME",
+ }
+ HistorySync_HistorySyncHistorySyncType_value = map[string]int32{
+ "INITIAL_BOOTSTRAP": 0,
+ "INITIAL_STATUS_V3": 1,
+ "FULL": 2,
+ "RECENT": 3,
+ "PUSH_NAME": 4,
+ }
+)
+
+func (x HistorySync_HistorySyncHistorySyncType) Enum() *HistorySync_HistorySyncHistorySyncType {
+ p := new(HistorySync_HistorySyncHistorySyncType)
+ *p = x
+ return p
+}
+
+func (x HistorySync_HistorySyncHistorySyncType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (HistorySync_HistorySyncHistorySyncType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[18].Descriptor()
+}
+
+func (HistorySync_HistorySyncHistorySyncType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[18]
+}
+
+func (x HistorySync_HistorySyncHistorySyncType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *HistorySync_HistorySyncHistorySyncType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = HistorySync_HistorySyncHistorySyncType(num)
+ return nil
+}
+
+// Deprecated: Use HistorySync_HistorySyncHistorySyncType.Descriptor instead.
+func (HistorySync_HistorySyncHistorySyncType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{69, 0}
+}
+
+type AdReplyInfo_AdReplyInfoMediaType int32
+
+const (
+ AdReplyInfo_NONE AdReplyInfo_AdReplyInfoMediaType = 0
+ AdReplyInfo_IMAGE AdReplyInfo_AdReplyInfoMediaType = 1
+ AdReplyInfo_VIDEO AdReplyInfo_AdReplyInfoMediaType = 2
+)
+
+// Enum value maps for AdReplyInfo_AdReplyInfoMediaType.
+var (
+ AdReplyInfo_AdReplyInfoMediaType_name = map[int32]string{
+ 0: "NONE",
+ 1: "IMAGE",
+ 2: "VIDEO",
+ }
+ AdReplyInfo_AdReplyInfoMediaType_value = map[string]int32{
+ "NONE": 0,
+ "IMAGE": 1,
+ "VIDEO": 2,
+ }
+)
+
+func (x AdReplyInfo_AdReplyInfoMediaType) Enum() *AdReplyInfo_AdReplyInfoMediaType {
+ p := new(AdReplyInfo_AdReplyInfoMediaType)
+ *p = x
+ return p
+}
+
+func (x AdReplyInfo_AdReplyInfoMediaType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (AdReplyInfo_AdReplyInfoMediaType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[19].Descriptor()
+}
+
+func (AdReplyInfo_AdReplyInfoMediaType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[19]
+}
+
+func (x AdReplyInfo_AdReplyInfoMediaType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *AdReplyInfo_AdReplyInfoMediaType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = AdReplyInfo_AdReplyInfoMediaType(num)
+ return nil
+}
+
+// Deprecated: Use AdReplyInfo_AdReplyInfoMediaType.Descriptor instead.
+func (AdReplyInfo_AdReplyInfoMediaType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{74, 0}
+}
+
+type ExternalAdReplyInfo_ExternalAdReplyInfoMediaType int32
+
+const (
+ ExternalAdReplyInfo_NONE ExternalAdReplyInfo_ExternalAdReplyInfoMediaType = 0
+ ExternalAdReplyInfo_IMAGE ExternalAdReplyInfo_ExternalAdReplyInfoMediaType = 1
+ ExternalAdReplyInfo_VIDEO ExternalAdReplyInfo_ExternalAdReplyInfoMediaType = 2
+)
+
+// Enum value maps for ExternalAdReplyInfo_ExternalAdReplyInfoMediaType.
+var (
+ ExternalAdReplyInfo_ExternalAdReplyInfoMediaType_name = map[int32]string{
+ 0: "NONE",
+ 1: "IMAGE",
+ 2: "VIDEO",
+ }
+ ExternalAdReplyInfo_ExternalAdReplyInfoMediaType_value = map[string]int32{
+ "NONE": 0,
+ "IMAGE": 1,
+ "VIDEO": 2,
+ }
+)
+
+func (x ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) Enum() *ExternalAdReplyInfo_ExternalAdReplyInfoMediaType {
+ p := new(ExternalAdReplyInfo_ExternalAdReplyInfoMediaType)
+ *p = x
+ return p
+}
+
+func (x ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[20].Descriptor()
+}
+
+func (ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[20]
+}
+
+func (x ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ExternalAdReplyInfo_ExternalAdReplyInfoMediaType(num)
+ return nil
+}
+
+// Deprecated: Use ExternalAdReplyInfo_ExternalAdReplyInfoMediaType.Descriptor instead.
+func (ExternalAdReplyInfo_ExternalAdReplyInfoMediaType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{75, 0}
+}
+
+type InvoiceMessage_InvoiceMessageAttachmentType int32
+
+const (
+ InvoiceMessage_IMAGE InvoiceMessage_InvoiceMessageAttachmentType = 0
+ InvoiceMessage_PDF InvoiceMessage_InvoiceMessageAttachmentType = 1
+)
+
+// Enum value maps for InvoiceMessage_InvoiceMessageAttachmentType.
+var (
+ InvoiceMessage_InvoiceMessageAttachmentType_name = map[int32]string{
+ 0: "IMAGE",
+ 1: "PDF",
+ }
+ InvoiceMessage_InvoiceMessageAttachmentType_value = map[string]int32{
+ "IMAGE": 0,
+ "PDF": 1,
+ }
+)
+
+func (x InvoiceMessage_InvoiceMessageAttachmentType) Enum() *InvoiceMessage_InvoiceMessageAttachmentType {
+ p := new(InvoiceMessage_InvoiceMessageAttachmentType)
+ *p = x
+ return p
+}
+
+func (x InvoiceMessage_InvoiceMessageAttachmentType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (InvoiceMessage_InvoiceMessageAttachmentType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[21].Descriptor()
+}
+
+func (InvoiceMessage_InvoiceMessageAttachmentType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[21]
+}
+
+func (x InvoiceMessage_InvoiceMessageAttachmentType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *InvoiceMessage_InvoiceMessageAttachmentType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = InvoiceMessage_InvoiceMessageAttachmentType(num)
+ return nil
+}
+
+// Deprecated: Use InvoiceMessage_InvoiceMessageAttachmentType.Descriptor instead.
+func (InvoiceMessage_InvoiceMessageAttachmentType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{79, 0}
+}
+
+type ExtendedTextMessage_ExtendedTextMessageFontType int32
+
+const (
+ ExtendedTextMessage_SANS_SERIF ExtendedTextMessage_ExtendedTextMessageFontType = 0
+ ExtendedTextMessage_SERIF ExtendedTextMessage_ExtendedTextMessageFontType = 1
+ ExtendedTextMessage_NORICAN_REGULAR ExtendedTextMessage_ExtendedTextMessageFontType = 2
+ ExtendedTextMessage_BRYNDAN_WRITE ExtendedTextMessage_ExtendedTextMessageFontType = 3
+ ExtendedTextMessage_BEBASNEUE_REGULAR ExtendedTextMessage_ExtendedTextMessageFontType = 4
+ ExtendedTextMessage_OSWALD_HEAVY ExtendedTextMessage_ExtendedTextMessageFontType = 5
+)
+
+// Enum value maps for ExtendedTextMessage_ExtendedTextMessageFontType.
+var (
+ ExtendedTextMessage_ExtendedTextMessageFontType_name = map[int32]string{
+ 0: "SANS_SERIF",
+ 1: "SERIF",
+ 2: "NORICAN_REGULAR",
+ 3: "BRYNDAN_WRITE",
+ 4: "BEBASNEUE_REGULAR",
+ 5: "OSWALD_HEAVY",
+ }
+ ExtendedTextMessage_ExtendedTextMessageFontType_value = map[string]int32{
+ "SANS_SERIF": 0,
+ "SERIF": 1,
+ "NORICAN_REGULAR": 2,
+ "BRYNDAN_WRITE": 3,
+ "BEBASNEUE_REGULAR": 4,
+ "OSWALD_HEAVY": 5,
+ }
+)
+
+func (x ExtendedTextMessage_ExtendedTextMessageFontType) Enum() *ExtendedTextMessage_ExtendedTextMessageFontType {
+ p := new(ExtendedTextMessage_ExtendedTextMessageFontType)
+ *p = x
+ return p
+}
+
+func (x ExtendedTextMessage_ExtendedTextMessageFontType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExtendedTextMessage_ExtendedTextMessageFontType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[22].Descriptor()
+}
+
+func (ExtendedTextMessage_ExtendedTextMessageFontType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[22]
+}
+
+func (x ExtendedTextMessage_ExtendedTextMessageFontType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ExtendedTextMessage_ExtendedTextMessageFontType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ExtendedTextMessage_ExtendedTextMessageFontType(num)
+ return nil
+}
+
+// Deprecated: Use ExtendedTextMessage_ExtendedTextMessageFontType.Descriptor instead.
+func (ExtendedTextMessage_ExtendedTextMessageFontType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 0}
+}
+
+type ExtendedTextMessage_ExtendedTextMessagePreviewType int32
+
+const (
+ ExtendedTextMessage_NONE ExtendedTextMessage_ExtendedTextMessagePreviewType = 0
+ ExtendedTextMessage_VIDEO ExtendedTextMessage_ExtendedTextMessagePreviewType = 1
+)
+
+// Enum value maps for ExtendedTextMessage_ExtendedTextMessagePreviewType.
+var (
+ ExtendedTextMessage_ExtendedTextMessagePreviewType_name = map[int32]string{
+ 0: "NONE",
+ 1: "VIDEO",
+ }
+ ExtendedTextMessage_ExtendedTextMessagePreviewType_value = map[string]int32{
+ "NONE": 0,
+ "VIDEO": 1,
+ }
+)
+
+func (x ExtendedTextMessage_ExtendedTextMessagePreviewType) Enum() *ExtendedTextMessage_ExtendedTextMessagePreviewType {
+ p := new(ExtendedTextMessage_ExtendedTextMessagePreviewType)
+ *p = x
+ return p
+}
+
+func (x ExtendedTextMessage_ExtendedTextMessagePreviewType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExtendedTextMessage_ExtendedTextMessagePreviewType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[23].Descriptor()
+}
+
+func (ExtendedTextMessage_ExtendedTextMessagePreviewType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[23]
+}
+
+func (x ExtendedTextMessage_ExtendedTextMessagePreviewType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ExtendedTextMessage_ExtendedTextMessagePreviewType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ExtendedTextMessage_ExtendedTextMessagePreviewType(num)
+ return nil
+}
+
+// Deprecated: Use ExtendedTextMessage_ExtendedTextMessagePreviewType.Descriptor instead.
+func (ExtendedTextMessage_ExtendedTextMessagePreviewType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 1}
+}
+
+type ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType int32
+
+const (
+ ExtendedTextMessage_DEFAULT ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType = 0
+ ExtendedTextMessage_PARENT ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType = 1
+)
+
+// Enum value maps for ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType.
+var (
+ ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType_name = map[int32]string{
+ 0: "DEFAULT",
+ 1: "PARENT",
+ }
+ ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType_value = map[string]int32{
+ "DEFAULT": 0,
+ "PARENT": 1,
+ }
+)
+
+func (x ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) Enum() *ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType {
+ p := new(ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType)
+ *p = x
+ return p
+}
+
+func (x ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[24].Descriptor()
+}
+
+func (ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[24]
+}
+
+func (x ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType(num)
+ return nil
+}
+
+// Deprecated: Use ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType.Descriptor instead.
+func (ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{82, 2}
+}
+
+type VideoMessage_VideoMessageAttribution int32
+
+const (
+ VideoMessage_NONE VideoMessage_VideoMessageAttribution = 0
+ VideoMessage_GIPHY VideoMessage_VideoMessageAttribution = 1
+ VideoMessage_TENOR VideoMessage_VideoMessageAttribution = 2
+)
+
+// Enum value maps for VideoMessage_VideoMessageAttribution.
+var (
+ VideoMessage_VideoMessageAttribution_name = map[int32]string{
+ 0: "NONE",
+ 1: "GIPHY",
+ 2: "TENOR",
+ }
+ VideoMessage_VideoMessageAttribution_value = map[string]int32{
+ "NONE": 0,
+ "GIPHY": 1,
+ "TENOR": 2,
+ }
+)
+
+func (x VideoMessage_VideoMessageAttribution) Enum() *VideoMessage_VideoMessageAttribution {
+ p := new(VideoMessage_VideoMessageAttribution)
+ *p = x
+ return p
+}
+
+func (x VideoMessage_VideoMessageAttribution) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (VideoMessage_VideoMessageAttribution) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[25].Descriptor()
+}
+
+func (VideoMessage_VideoMessageAttribution) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[25]
+}
+
+func (x VideoMessage_VideoMessageAttribution) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *VideoMessage_VideoMessageAttribution) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = VideoMessage_VideoMessageAttribution(num)
+ return nil
+}
+
+// Deprecated: Use VideoMessage_VideoMessageAttribution.Descriptor instead.
+func (VideoMessage_VideoMessageAttribution) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{85, 0}
+}
+
+type ProtocolMessage_ProtocolMessageType int32
+
+const (
+ ProtocolMessage_REVOKE ProtocolMessage_ProtocolMessageType = 0
+ ProtocolMessage_EPHEMERAL_SETTING ProtocolMessage_ProtocolMessageType = 3
+ ProtocolMessage_EPHEMERAL_SYNC_RESPONSE ProtocolMessage_ProtocolMessageType = 4
+ ProtocolMessage_HISTORY_SYNC_NOTIFICATION ProtocolMessage_ProtocolMessageType = 5
+ ProtocolMessage_APP_STATE_SYNC_KEY_SHARE ProtocolMessage_ProtocolMessageType = 6
+ ProtocolMessage_APP_STATE_SYNC_KEY_REQUEST ProtocolMessage_ProtocolMessageType = 7
+ ProtocolMessage_MSG_FANOUT_BACKFILL_REQUEST ProtocolMessage_ProtocolMessageType = 8
+ ProtocolMessage_INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC ProtocolMessage_ProtocolMessageType = 9
+ ProtocolMessage_APP_STATE_FATAL_EXCEPTION_NOTIFICATION ProtocolMessage_ProtocolMessageType = 10
+)
+
+// Enum value maps for ProtocolMessage_ProtocolMessageType.
+var (
+ ProtocolMessage_ProtocolMessageType_name = map[int32]string{
+ 0: "REVOKE",
+ 3: "EPHEMERAL_SETTING",
+ 4: "EPHEMERAL_SYNC_RESPONSE",
+ 5: "HISTORY_SYNC_NOTIFICATION",
+ 6: "APP_STATE_SYNC_KEY_SHARE",
+ 7: "APP_STATE_SYNC_KEY_REQUEST",
+ 8: "MSG_FANOUT_BACKFILL_REQUEST",
+ 9: "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC",
+ 10: "APP_STATE_FATAL_EXCEPTION_NOTIFICATION",
+ }
+ ProtocolMessage_ProtocolMessageType_value = map[string]int32{
+ "REVOKE": 0,
+ "EPHEMERAL_SETTING": 3,
+ "EPHEMERAL_SYNC_RESPONSE": 4,
+ "HISTORY_SYNC_NOTIFICATION": 5,
+ "APP_STATE_SYNC_KEY_SHARE": 6,
+ "APP_STATE_SYNC_KEY_REQUEST": 7,
+ "MSG_FANOUT_BACKFILL_REQUEST": 8,
+ "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC": 9,
+ "APP_STATE_FATAL_EXCEPTION_NOTIFICATION": 10,
+ }
+)
+
+func (x ProtocolMessage_ProtocolMessageType) Enum() *ProtocolMessage_ProtocolMessageType {
+ p := new(ProtocolMessage_ProtocolMessageType)
+ *p = x
+ return p
+}
+
+func (x ProtocolMessage_ProtocolMessageType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ProtocolMessage_ProtocolMessageType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[26].Descriptor()
+}
+
+func (ProtocolMessage_ProtocolMessageType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[26]
+}
+
+func (x ProtocolMessage_ProtocolMessageType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ProtocolMessage_ProtocolMessageType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ProtocolMessage_ProtocolMessageType(num)
+ return nil
+}
+
+// Deprecated: Use ProtocolMessage_ProtocolMessageType.Descriptor instead.
+func (ProtocolMessage_ProtocolMessageType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{88, 0}
+}
+
+type HistorySyncNotification_HistorySyncNotificationHistorySyncType int32
+
+const (
+ HistorySyncNotification_INITIAL_BOOTSTRAP HistorySyncNotification_HistorySyncNotificationHistorySyncType = 0
+ HistorySyncNotification_INITIAL_STATUS_V3 HistorySyncNotification_HistorySyncNotificationHistorySyncType = 1
+ HistorySyncNotification_FULL HistorySyncNotification_HistorySyncNotificationHistorySyncType = 2
+ HistorySyncNotification_RECENT HistorySyncNotification_HistorySyncNotificationHistorySyncType = 3
+ HistorySyncNotification_PUSH_NAME HistorySyncNotification_HistorySyncNotificationHistorySyncType = 4
+)
+
+// Enum value maps for HistorySyncNotification_HistorySyncNotificationHistorySyncType.
+var (
+ HistorySyncNotification_HistorySyncNotificationHistorySyncType_name = map[int32]string{
+ 0: "INITIAL_BOOTSTRAP",
+ 1: "INITIAL_STATUS_V3",
+ 2: "FULL",
+ 3: "RECENT",
+ 4: "PUSH_NAME",
+ }
+ HistorySyncNotification_HistorySyncNotificationHistorySyncType_value = map[string]int32{
+ "INITIAL_BOOTSTRAP": 0,
+ "INITIAL_STATUS_V3": 1,
+ "FULL": 2,
+ "RECENT": 3,
+ "PUSH_NAME": 4,
+ }
+)
+
+func (x HistorySyncNotification_HistorySyncNotificationHistorySyncType) Enum() *HistorySyncNotification_HistorySyncNotificationHistorySyncType {
+ p := new(HistorySyncNotification_HistorySyncNotificationHistorySyncType)
+ *p = x
+ return p
+}
+
+func (x HistorySyncNotification_HistorySyncNotificationHistorySyncType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (HistorySyncNotification_HistorySyncNotificationHistorySyncType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[27].Descriptor()
+}
+
+func (HistorySyncNotification_HistorySyncNotificationHistorySyncType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[27]
+}
+
+func (x HistorySyncNotification_HistorySyncNotificationHistorySyncType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *HistorySyncNotification_HistorySyncNotificationHistorySyncType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = HistorySyncNotification_HistorySyncNotificationHistorySyncType(num)
+ return nil
+}
+
+// Deprecated: Use HistorySyncNotification_HistorySyncNotificationHistorySyncType.Descriptor instead.
+func (HistorySyncNotification_HistorySyncNotificationHistorySyncType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{89, 0}
+}
+
+type HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType int32
+
+const (
+ HSMDateTimeComponent_MONDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 1
+ HSMDateTimeComponent_TUESDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 2
+ HSMDateTimeComponent_WEDNESDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 3
+ HSMDateTimeComponent_THURSDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 4
+ HSMDateTimeComponent_FRIDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 5
+ HSMDateTimeComponent_SATURDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 6
+ HSMDateTimeComponent_SUNDAY HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType = 7
+)
+
+// Enum value maps for HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType.
+var (
+ HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType_name = map[int32]string{
+ 1: "MONDAY",
+ 2: "TUESDAY",
+ 3: "WEDNESDAY",
+ 4: "THURSDAY",
+ 5: "FRIDAY",
+ 6: "SATURDAY",
+ 7: "SUNDAY",
+ }
+ HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType_value = map[string]int32{
+ "MONDAY": 1,
+ "TUESDAY": 2,
+ "WEDNESDAY": 3,
+ "THURSDAY": 4,
+ "FRIDAY": 5,
+ "SATURDAY": 6,
+ "SUNDAY": 7,
+ }
+)
+
+func (x HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) Enum() *HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType {
+ p := new(HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType)
+ *p = x
+ return p
+}
+
+func (x HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[28].Descriptor()
+}
+
+func (HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[28]
+}
+
+func (x HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType(num)
+ return nil
+}
+
+// Deprecated: Use HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType.Descriptor instead.
+func (HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{100, 0}
+}
+
+type HSMDateTimeComponent_HSMDateTimeComponentCalendarType int32
+
+const (
+ HSMDateTimeComponent_GREGORIAN HSMDateTimeComponent_HSMDateTimeComponentCalendarType = 1
+ HSMDateTimeComponent_SOLAR_HIJRI HSMDateTimeComponent_HSMDateTimeComponentCalendarType = 2
+)
+
+// Enum value maps for HSMDateTimeComponent_HSMDateTimeComponentCalendarType.
+var (
+ HSMDateTimeComponent_HSMDateTimeComponentCalendarType_name = map[int32]string{
+ 1: "GREGORIAN",
+ 2: "SOLAR_HIJRI",
+ }
+ HSMDateTimeComponent_HSMDateTimeComponentCalendarType_value = map[string]int32{
+ "GREGORIAN": 1,
+ "SOLAR_HIJRI": 2,
+ }
+)
+
+func (x HSMDateTimeComponent_HSMDateTimeComponentCalendarType) Enum() *HSMDateTimeComponent_HSMDateTimeComponentCalendarType {
+ p := new(HSMDateTimeComponent_HSMDateTimeComponentCalendarType)
+ *p = x
+ return p
+}
+
+func (x HSMDateTimeComponent_HSMDateTimeComponentCalendarType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (HSMDateTimeComponent_HSMDateTimeComponentCalendarType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[29].Descriptor()
+}
+
+func (HSMDateTimeComponent_HSMDateTimeComponentCalendarType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[29]
+}
+
+func (x HSMDateTimeComponent_HSMDateTimeComponentCalendarType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *HSMDateTimeComponent_HSMDateTimeComponentCalendarType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = HSMDateTimeComponent_HSMDateTimeComponentCalendarType(num)
+ return nil
+}
+
+// Deprecated: Use HSMDateTimeComponent_HSMDateTimeComponentCalendarType.Descriptor instead.
+func (HSMDateTimeComponent_HSMDateTimeComponentCalendarType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{100, 1}
+}
+
+type PaymentInviteMessage_PaymentInviteMessageServiceType int32
+
+const (
+ PaymentInviteMessage_UNKNOWN PaymentInviteMessage_PaymentInviteMessageServiceType = 0
+ PaymentInviteMessage_FBPAY PaymentInviteMessage_PaymentInviteMessageServiceType = 1
+ PaymentInviteMessage_NOVI PaymentInviteMessage_PaymentInviteMessageServiceType = 2
+ PaymentInviteMessage_UPI PaymentInviteMessage_PaymentInviteMessageServiceType = 3
+)
+
+// Enum value maps for PaymentInviteMessage_PaymentInviteMessageServiceType.
+var (
+ PaymentInviteMessage_PaymentInviteMessageServiceType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "FBPAY",
+ 2: "NOVI",
+ 3: "UPI",
+ }
+ PaymentInviteMessage_PaymentInviteMessageServiceType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "FBPAY": 1,
+ "NOVI": 2,
+ "UPI": 3,
+ }
+)
+
+func (x PaymentInviteMessage_PaymentInviteMessageServiceType) Enum() *PaymentInviteMessage_PaymentInviteMessageServiceType {
+ p := new(PaymentInviteMessage_PaymentInviteMessageServiceType)
+ *p = x
+ return p
+}
+
+func (x PaymentInviteMessage_PaymentInviteMessageServiceType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PaymentInviteMessage_PaymentInviteMessageServiceType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[30].Descriptor()
+}
+
+func (PaymentInviteMessage_PaymentInviteMessageServiceType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[30]
+}
+
+func (x PaymentInviteMessage_PaymentInviteMessageServiceType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *PaymentInviteMessage_PaymentInviteMessageServiceType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = PaymentInviteMessage_PaymentInviteMessageServiceType(num)
+ return nil
+}
+
+// Deprecated: Use PaymentInviteMessage_PaymentInviteMessageServiceType.Descriptor instead.
+func (PaymentInviteMessage_PaymentInviteMessageServiceType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{109, 0}
+}
+
+type OrderMessage_OrderMessageOrderStatus int32
+
+const (
+ OrderMessage_INQUIRY OrderMessage_OrderMessageOrderStatus = 1
+)
+
+// Enum value maps for OrderMessage_OrderMessageOrderStatus.
+var (
+ OrderMessage_OrderMessageOrderStatus_name = map[int32]string{
+ 1: "INQUIRY",
+ }
+ OrderMessage_OrderMessageOrderStatus_value = map[string]int32{
+ "INQUIRY": 1,
+ }
+)
+
+func (x OrderMessage_OrderMessageOrderStatus) Enum() *OrderMessage_OrderMessageOrderStatus {
+ p := new(OrderMessage_OrderMessageOrderStatus)
+ *p = x
+ return p
+}
+
+func (x OrderMessage_OrderMessageOrderStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (OrderMessage_OrderMessageOrderStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[31].Descriptor()
+}
+
+func (OrderMessage_OrderMessageOrderStatus) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[31]
+}
+
+func (x OrderMessage_OrderMessageOrderStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *OrderMessage_OrderMessageOrderStatus) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = OrderMessage_OrderMessageOrderStatus(num)
+ return nil
+}
+
+// Deprecated: Use OrderMessage_OrderMessageOrderStatus.Descriptor instead.
+func (OrderMessage_OrderMessageOrderStatus) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{119, 0}
+}
+
+type OrderMessage_OrderMessageOrderSurface int32
+
+const (
+ OrderMessage_CATALOG OrderMessage_OrderMessageOrderSurface = 1
+)
+
+// Enum value maps for OrderMessage_OrderMessageOrderSurface.
+var (
+ OrderMessage_OrderMessageOrderSurface_name = map[int32]string{
+ 1: "CATALOG",
+ }
+ OrderMessage_OrderMessageOrderSurface_value = map[string]int32{
+ "CATALOG": 1,
+ }
+)
+
+func (x OrderMessage_OrderMessageOrderSurface) Enum() *OrderMessage_OrderMessageOrderSurface {
+ p := new(OrderMessage_OrderMessageOrderSurface)
+ *p = x
+ return p
+}
+
+func (x OrderMessage_OrderMessageOrderSurface) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (OrderMessage_OrderMessageOrderSurface) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[32].Descriptor()
+}
+
+func (OrderMessage_OrderMessageOrderSurface) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[32]
+}
+
+func (x OrderMessage_OrderMessageOrderSurface) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *OrderMessage_OrderMessageOrderSurface) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = OrderMessage_OrderMessageOrderSurface(num)
+ return nil
+}
+
+// Deprecated: Use OrderMessage_OrderMessageOrderSurface.Descriptor instead.
+func (OrderMessage_OrderMessageOrderSurface) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{119, 1}
+}
+
+type ListMessage_ListMessageListType int32
+
+const (
+ ListMessage_UNKNOWN ListMessage_ListMessageListType = 0
+ ListMessage_SINGLE_SELECT ListMessage_ListMessageListType = 1
+ ListMessage_PRODUCT_LIST ListMessage_ListMessageListType = 2
+)
+
+// Enum value maps for ListMessage_ListMessageListType.
+var (
+ ListMessage_ListMessageListType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "SINGLE_SELECT",
+ 2: "PRODUCT_LIST",
+ }
+ ListMessage_ListMessageListType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "SINGLE_SELECT": 1,
+ "PRODUCT_LIST": 2,
+ }
+)
+
+func (x ListMessage_ListMessageListType) Enum() *ListMessage_ListMessageListType {
+ p := new(ListMessage_ListMessageListType)
+ *p = x
+ return p
+}
+
+func (x ListMessage_ListMessageListType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ListMessage_ListMessageListType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[33].Descriptor()
+}
+
+func (ListMessage_ListMessageListType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[33]
+}
+
+func (x ListMessage_ListMessageListType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ListMessage_ListMessageListType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ListMessage_ListMessageListType(num)
+ return nil
+}
+
+// Deprecated: Use ListMessage_ListMessageListType.Descriptor instead.
+func (ListMessage_ListMessageListType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{126, 0}
+}
+
+type ListResponseMessage_ListResponseMessageListType int32
+
+const (
+ ListResponseMessage_UNKNOWN ListResponseMessage_ListResponseMessageListType = 0
+ ListResponseMessage_SINGLE_SELECT ListResponseMessage_ListResponseMessageListType = 1
+)
+
+// Enum value maps for ListResponseMessage_ListResponseMessageListType.
+var (
+ ListResponseMessage_ListResponseMessageListType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "SINGLE_SELECT",
+ }
+ ListResponseMessage_ListResponseMessageListType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "SINGLE_SELECT": 1,
+ }
+)
+
+func (x ListResponseMessage_ListResponseMessageListType) Enum() *ListResponseMessage_ListResponseMessageListType {
+ p := new(ListResponseMessage_ListResponseMessageListType)
+ *p = x
+ return p
+}
+
+func (x ListResponseMessage_ListResponseMessageListType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ListResponseMessage_ListResponseMessageListType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[34].Descriptor()
+}
+
+func (ListResponseMessage_ListResponseMessageListType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[34]
+}
+
+func (x ListResponseMessage_ListResponseMessageListType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ListResponseMessage_ListResponseMessageListType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ListResponseMessage_ListResponseMessageListType(num)
+ return nil
+}
+
+// Deprecated: Use ListResponseMessage_ListResponseMessageListType.Descriptor instead.
+func (ListResponseMessage_ListResponseMessageListType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{128, 0}
+}
+
+type ShopMessage_ShopMessageSurface int32
+
+const (
+ ShopMessage_UNKNOWN_SURFACE ShopMessage_ShopMessageSurface = 0
+ ShopMessage_FB ShopMessage_ShopMessageSurface = 1
+ ShopMessage_IG ShopMessage_ShopMessageSurface = 2
+ ShopMessage_WA ShopMessage_ShopMessageSurface = 3
+)
+
+// Enum value maps for ShopMessage_ShopMessageSurface.
+var (
+ ShopMessage_ShopMessageSurface_name = map[int32]string{
+ 0: "UNKNOWN_SURFACE",
+ 1: "FB",
+ 2: "IG",
+ 3: "WA",
+ }
+ ShopMessage_ShopMessageSurface_value = map[string]int32{
+ "UNKNOWN_SURFACE": 0,
+ "FB": 1,
+ "IG": 2,
+ "WA": 3,
+ }
+)
+
+func (x ShopMessage_ShopMessageSurface) Enum() *ShopMessage_ShopMessageSurface {
+ p := new(ShopMessage_ShopMessageSurface)
+ *p = x
+ return p
+}
+
+func (x ShopMessage_ShopMessageSurface) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ShopMessage_ShopMessageSurface) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[35].Descriptor()
+}
+
+func (ShopMessage_ShopMessageSurface) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[35]
+}
+
+func (x ShopMessage_ShopMessageSurface) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ShopMessage_ShopMessageSurface) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ShopMessage_ShopMessageSurface(num)
+ return nil
+}
+
+// Deprecated: Use ShopMessage_ShopMessageSurface.Descriptor instead.
+func (ShopMessage_ShopMessageSurface) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{132, 0}
+}
+
+type GroupInviteMessage_GroupInviteMessageGroupType int32
+
+const (
+ GroupInviteMessage_DEFAULT GroupInviteMessage_GroupInviteMessageGroupType = 0
+ GroupInviteMessage_PARENT GroupInviteMessage_GroupInviteMessageGroupType = 1
+)
+
+// Enum value maps for GroupInviteMessage_GroupInviteMessageGroupType.
+var (
+ GroupInviteMessage_GroupInviteMessageGroupType_name = map[int32]string{
+ 0: "DEFAULT",
+ 1: "PARENT",
+ }
+ GroupInviteMessage_GroupInviteMessageGroupType_value = map[string]int32{
+ "DEFAULT": 0,
+ "PARENT": 1,
+ }
+)
+
+func (x GroupInviteMessage_GroupInviteMessageGroupType) Enum() *GroupInviteMessage_GroupInviteMessageGroupType {
+ p := new(GroupInviteMessage_GroupInviteMessageGroupType)
+ *p = x
+ return p
+}
+
+func (x GroupInviteMessage_GroupInviteMessageGroupType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (GroupInviteMessage_GroupInviteMessageGroupType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[36].Descriptor()
+}
+
+func (GroupInviteMessage_GroupInviteMessageGroupType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[36]
+}
+
+func (x GroupInviteMessage_GroupInviteMessageGroupType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *GroupInviteMessage_GroupInviteMessageGroupType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = GroupInviteMessage_GroupInviteMessageGroupType(num)
+ return nil
+}
+
+// Deprecated: Use GroupInviteMessage_GroupInviteMessageGroupType.Descriptor instead.
+func (GroupInviteMessage_GroupInviteMessageGroupType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{137, 0}
+}
+
+type Button_ButtonType int32
+
+const (
+ Button_UNKNOWN Button_ButtonType = 0
+ Button_RESPONSE Button_ButtonType = 1
+ Button_NATIVE_FLOW Button_ButtonType = 2
+)
+
+// Enum value maps for Button_ButtonType.
+var (
+ Button_ButtonType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "RESPONSE",
+ 2: "NATIVE_FLOW",
+ }
+ Button_ButtonType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "RESPONSE": 1,
+ "NATIVE_FLOW": 2,
+ }
+)
+
+func (x Button_ButtonType) Enum() *Button_ButtonType {
+ p := new(Button_ButtonType)
+ *p = x
+ return p
+}
+
+func (x Button_ButtonType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Button_ButtonType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[37].Descriptor()
+}
+
+func (Button_ButtonType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[37]
+}
+
+func (x Button_ButtonType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Button_ButtonType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = Button_ButtonType(num)
+ return nil
+}
+
+// Deprecated: Use Button_ButtonType.Descriptor instead.
+func (Button_ButtonType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{142, 0}
+}
+
+type ButtonsMessage_ButtonsMessageHeaderType int32
+
+const (
+ ButtonsMessage_UNKNOWN ButtonsMessage_ButtonsMessageHeaderType = 0
+ ButtonsMessage_EMPTY ButtonsMessage_ButtonsMessageHeaderType = 1
+ ButtonsMessage_TEXT ButtonsMessage_ButtonsMessageHeaderType = 2
+ ButtonsMessage_DOCUMENT ButtonsMessage_ButtonsMessageHeaderType = 3
+ ButtonsMessage_IMAGE ButtonsMessage_ButtonsMessageHeaderType = 4
+ ButtonsMessage_VIDEO ButtonsMessage_ButtonsMessageHeaderType = 5
+ ButtonsMessage_LOCATION ButtonsMessage_ButtonsMessageHeaderType = 6
+)
+
+// Enum value maps for ButtonsMessage_ButtonsMessageHeaderType.
+var (
+ ButtonsMessage_ButtonsMessageHeaderType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "EMPTY",
+ 2: "TEXT",
+ 3: "DOCUMENT",
+ 4: "IMAGE",
+ 5: "VIDEO",
+ 6: "LOCATION",
+ }
+ ButtonsMessage_ButtonsMessageHeaderType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "EMPTY": 1,
+ "TEXT": 2,
+ "DOCUMENT": 3,
+ "IMAGE": 4,
+ "VIDEO": 5,
+ "LOCATION": 6,
+ }
+)
+
+func (x ButtonsMessage_ButtonsMessageHeaderType) Enum() *ButtonsMessage_ButtonsMessageHeaderType {
+ p := new(ButtonsMessage_ButtonsMessageHeaderType)
+ *p = x
+ return p
+}
+
+func (x ButtonsMessage_ButtonsMessageHeaderType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ButtonsMessage_ButtonsMessageHeaderType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[38].Descriptor()
+}
+
+func (ButtonsMessage_ButtonsMessageHeaderType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[38]
+}
+
+func (x ButtonsMessage_ButtonsMessageHeaderType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ButtonsMessage_ButtonsMessageHeaderType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ButtonsMessage_ButtonsMessageHeaderType(num)
+ return nil
+}
+
+// Deprecated: Use ButtonsMessage_ButtonsMessageHeaderType.Descriptor instead.
+func (ButtonsMessage_ButtonsMessageHeaderType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{143, 0}
+}
+
+type ButtonsResponseMessage_ButtonsResponseMessageType int32
+
+const (
+ ButtonsResponseMessage_UNKNOWN ButtonsResponseMessage_ButtonsResponseMessageType = 0
+ ButtonsResponseMessage_DISPLAY_TEXT ButtonsResponseMessage_ButtonsResponseMessageType = 1
+)
+
+// Enum value maps for ButtonsResponseMessage_ButtonsResponseMessageType.
+var (
+ ButtonsResponseMessage_ButtonsResponseMessageType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "DISPLAY_TEXT",
+ }
+ ButtonsResponseMessage_ButtonsResponseMessageType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "DISPLAY_TEXT": 1,
+ }
+)
+
+func (x ButtonsResponseMessage_ButtonsResponseMessageType) Enum() *ButtonsResponseMessage_ButtonsResponseMessageType {
+ p := new(ButtonsResponseMessage_ButtonsResponseMessageType)
+ *p = x
+ return p
+}
+
+func (x ButtonsResponseMessage_ButtonsResponseMessageType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ButtonsResponseMessage_ButtonsResponseMessageType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[39].Descriptor()
+}
+
+func (ButtonsResponseMessage_ButtonsResponseMessageType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[39]
+}
+
+func (x ButtonsResponseMessage_ButtonsResponseMessageType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ButtonsResponseMessage_ButtonsResponseMessageType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = ButtonsResponseMessage_ButtonsResponseMessageType(num)
+ return nil
+}
+
+// Deprecated: Use ButtonsResponseMessage_ButtonsResponseMessageType.Descriptor instead.
+func (ButtonsResponseMessage_ButtonsResponseMessageType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{144, 0}
+}
+
+type DisappearingMode_DisappearingModeInitiator int32
+
+const (
+ DisappearingMode_CHANGED_IN_CHAT DisappearingMode_DisappearingModeInitiator = 0
+ DisappearingMode_INITIATED_BY_ME DisappearingMode_DisappearingModeInitiator = 1
+ DisappearingMode_INITIATED_BY_OTHER DisappearingMode_DisappearingModeInitiator = 2
+)
+
+// Enum value maps for DisappearingMode_DisappearingModeInitiator.
+var (
+ DisappearingMode_DisappearingModeInitiator_name = map[int32]string{
+ 0: "CHANGED_IN_CHAT",
+ 1: "INITIATED_BY_ME",
+ 2: "INITIATED_BY_OTHER",
+ }
+ DisappearingMode_DisappearingModeInitiator_value = map[string]int32{
+ "CHANGED_IN_CHAT": 0,
+ "INITIATED_BY_ME": 1,
+ "INITIATED_BY_OTHER": 2,
+ }
+)
+
+func (x DisappearingMode_DisappearingModeInitiator) Enum() *DisappearingMode_DisappearingModeInitiator {
+ p := new(DisappearingMode_DisappearingModeInitiator)
+ *p = x
+ return p
+}
+
+func (x DisappearingMode_DisappearingModeInitiator) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (DisappearingMode_DisappearingModeInitiator) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[40].Descriptor()
+}
+
+func (DisappearingMode_DisappearingModeInitiator) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[40]
+}
+
+func (x DisappearingMode_DisappearingModeInitiator) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *DisappearingMode_DisappearingModeInitiator) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = DisappearingMode_DisappearingModeInitiator(num)
+ return nil
+}
+
+// Deprecated: Use DisappearingMode_DisappearingModeInitiator.Descriptor instead.
+func (DisappearingMode_DisappearingModeInitiator) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{149, 0}
+}
+
+type PaymentBackground_PaymentBackgroundType int32
+
+const (
+ PaymentBackground_UNKNOWN PaymentBackground_PaymentBackgroundType = 0
+ PaymentBackground_DEFAULT PaymentBackground_PaymentBackgroundType = 1
+)
+
+// Enum value maps for PaymentBackground_PaymentBackgroundType.
+var (
+ PaymentBackground_PaymentBackgroundType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "DEFAULT",
+ }
+ PaymentBackground_PaymentBackgroundType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "DEFAULT": 1,
+ }
+)
+
+func (x PaymentBackground_PaymentBackgroundType) Enum() *PaymentBackground_PaymentBackgroundType {
+ p := new(PaymentBackground_PaymentBackgroundType)
+ *p = x
+ return p
+}
+
+func (x PaymentBackground_PaymentBackgroundType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PaymentBackground_PaymentBackgroundType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[41].Descriptor()
+}
+
+func (PaymentBackground_PaymentBackgroundType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[41]
+}
+
+func (x PaymentBackground_PaymentBackgroundType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *PaymentBackground_PaymentBackgroundType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = PaymentBackground_PaymentBackgroundType(num)
+ return nil
+}
+
+// Deprecated: Use PaymentBackground_PaymentBackgroundType.Descriptor instead.
+func (PaymentBackground_PaymentBackgroundType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{151, 0}
+}
+
+type CompanionProps_CompanionPropsPlatformType int32
+
+const (
+ CompanionProps_UNKNOWN CompanionProps_CompanionPropsPlatformType = 0
+ CompanionProps_CHROME CompanionProps_CompanionPropsPlatformType = 1
+ CompanionProps_FIREFOX CompanionProps_CompanionPropsPlatformType = 2
+ CompanionProps_IE CompanionProps_CompanionPropsPlatformType = 3
+ CompanionProps_OPERA CompanionProps_CompanionPropsPlatformType = 4
+ CompanionProps_SAFARI CompanionProps_CompanionPropsPlatformType = 5
+ CompanionProps_EDGE CompanionProps_CompanionPropsPlatformType = 6
+ CompanionProps_DESKTOP CompanionProps_CompanionPropsPlatformType = 7
+ CompanionProps_IPAD CompanionProps_CompanionPropsPlatformType = 8
+ CompanionProps_ANDROID_TABLET CompanionProps_CompanionPropsPlatformType = 9
+ CompanionProps_OHANA CompanionProps_CompanionPropsPlatformType = 10
+ CompanionProps_ALOHA CompanionProps_CompanionPropsPlatformType = 11
+ CompanionProps_CATALINA CompanionProps_CompanionPropsPlatformType = 12
+)
+
+// Enum value maps for CompanionProps_CompanionPropsPlatformType.
+var (
+ CompanionProps_CompanionPropsPlatformType_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",
+ }
+ CompanionProps_CompanionPropsPlatformType_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,
+ }
+)
+
+func (x CompanionProps_CompanionPropsPlatformType) Enum() *CompanionProps_CompanionPropsPlatformType {
+ p := new(CompanionProps_CompanionPropsPlatformType)
+ *p = x
+ return p
+}
+
+func (x CompanionProps_CompanionPropsPlatformType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CompanionProps_CompanionPropsPlatformType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[42].Descriptor()
+}
+
+func (CompanionProps_CompanionPropsPlatformType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[42]
+}
+
+func (x CompanionProps_CompanionPropsPlatformType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *CompanionProps_CompanionPropsPlatformType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = CompanionProps_CompanionPropsPlatformType(num)
+ return nil
+}
+
+// Deprecated: Use CompanionProps_CompanionPropsPlatformType.Descriptor instead.
+func (CompanionProps_CompanionPropsPlatformType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{163, 0}
+}
+
+type WebFeatures_WebFeaturesFlag int32
+
+const (
+ WebFeatures_NOT_STARTED WebFeatures_WebFeaturesFlag = 0
+ WebFeatures_FORCE_UPGRADE WebFeatures_WebFeaturesFlag = 1
+ WebFeatures_DEVELOPMENT WebFeatures_WebFeaturesFlag = 2
+ WebFeatures_PRODUCTION WebFeatures_WebFeaturesFlag = 3
+)
+
+// Enum value maps for WebFeatures_WebFeaturesFlag.
+var (
+ WebFeatures_WebFeaturesFlag_name = map[int32]string{
+ 0: "NOT_STARTED",
+ 1: "FORCE_UPGRADE",
+ 2: "DEVELOPMENT",
+ 3: "PRODUCTION",
+ }
+ WebFeatures_WebFeaturesFlag_value = map[string]int32{
+ "NOT_STARTED": 0,
+ "FORCE_UPGRADE": 1,
+ "DEVELOPMENT": 2,
+ "PRODUCTION": 3,
+ }
+)
+
+func (x WebFeatures_WebFeaturesFlag) Enum() *WebFeatures_WebFeaturesFlag {
+ p := new(WebFeatures_WebFeaturesFlag)
+ *p = x
+ return p
+}
+
+func (x WebFeatures_WebFeaturesFlag) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WebFeatures_WebFeaturesFlag) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[43].Descriptor()
+}
+
+func (WebFeatures_WebFeaturesFlag) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[43]
+}
+
+func (x WebFeatures_WebFeaturesFlag) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *WebFeatures_WebFeaturesFlag) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = WebFeatures_WebFeaturesFlag(num)
+ return nil
+}
+
+// Deprecated: Use WebFeatures_WebFeaturesFlag.Descriptor instead.
+func (WebFeatures_WebFeaturesFlag) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{175, 0}
+}
+
+type PaymentInfo_PaymentInfoCurrency int32
+
+const (
+ PaymentInfo_UNKNOWN_CURRENCY PaymentInfo_PaymentInfoCurrency = 0
+ PaymentInfo_INR PaymentInfo_PaymentInfoCurrency = 1
+)
+
+// Enum value maps for PaymentInfo_PaymentInfoCurrency.
+var (
+ PaymentInfo_PaymentInfoCurrency_name = map[int32]string{
+ 0: "UNKNOWN_CURRENCY",
+ 1: "INR",
+ }
+ PaymentInfo_PaymentInfoCurrency_value = map[string]int32{
+ "UNKNOWN_CURRENCY": 0,
+ "INR": 1,
+ }
+)
+
+func (x PaymentInfo_PaymentInfoCurrency) Enum() *PaymentInfo_PaymentInfoCurrency {
+ p := new(PaymentInfo_PaymentInfoCurrency)
+ *p = x
+ return p
+}
+
+func (x PaymentInfo_PaymentInfoCurrency) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PaymentInfo_PaymentInfoCurrency) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[44].Descriptor()
+}
+
+func (PaymentInfo_PaymentInfoCurrency) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[44]
+}
+
+func (x PaymentInfo_PaymentInfoCurrency) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *PaymentInfo_PaymentInfoCurrency) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = PaymentInfo_PaymentInfoCurrency(num)
+ return nil
+}
+
+// Deprecated: Use PaymentInfo_PaymentInfoCurrency.Descriptor instead.
+func (PaymentInfo_PaymentInfoCurrency) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{178, 0}
+}
+
+type PaymentInfo_PaymentInfoStatus int32
+
+const (
+ PaymentInfo_UNKNOWN_STATUS PaymentInfo_PaymentInfoStatus = 0
+ PaymentInfo_PROCESSING PaymentInfo_PaymentInfoStatus = 1
+ PaymentInfo_SENT PaymentInfo_PaymentInfoStatus = 2
+ PaymentInfo_NEED_TO_ACCEPT PaymentInfo_PaymentInfoStatus = 3
+ PaymentInfo_COMPLETE PaymentInfo_PaymentInfoStatus = 4
+ PaymentInfo_COULD_NOT_COMPLETE PaymentInfo_PaymentInfoStatus = 5
+ PaymentInfo_REFUNDED PaymentInfo_PaymentInfoStatus = 6
+ PaymentInfo_EXPIRED PaymentInfo_PaymentInfoStatus = 7
+ PaymentInfo_REJECTED PaymentInfo_PaymentInfoStatus = 8
+ PaymentInfo_CANCELLED PaymentInfo_PaymentInfoStatus = 9
+ PaymentInfo_WAITING_FOR_PAYER PaymentInfo_PaymentInfoStatus = 10
+ PaymentInfo_WAITING PaymentInfo_PaymentInfoStatus = 11
+)
+
+// Enum value maps for PaymentInfo_PaymentInfoStatus.
+var (
+ PaymentInfo_PaymentInfoStatus_name = map[int32]string{
+ 0: "UNKNOWN_STATUS",
+ 1: "PROCESSING",
+ 2: "SENT",
+ 3: "NEED_TO_ACCEPT",
+ 4: "COMPLETE",
+ 5: "COULD_NOT_COMPLETE",
+ 6: "REFUNDED",
+ 7: "EXPIRED",
+ 8: "REJECTED",
+ 9: "CANCELLED",
+ 10: "WAITING_FOR_PAYER",
+ 11: "WAITING",
+ }
+ PaymentInfo_PaymentInfoStatus_value = map[string]int32{
+ "UNKNOWN_STATUS": 0,
+ "PROCESSING": 1,
+ "SENT": 2,
+ "NEED_TO_ACCEPT": 3,
+ "COMPLETE": 4,
+ "COULD_NOT_COMPLETE": 5,
+ "REFUNDED": 6,
+ "EXPIRED": 7,
+ "REJECTED": 8,
+ "CANCELLED": 9,
+ "WAITING_FOR_PAYER": 10,
+ "WAITING": 11,
+ }
+)
+
+func (x PaymentInfo_PaymentInfoStatus) Enum() *PaymentInfo_PaymentInfoStatus {
+ p := new(PaymentInfo_PaymentInfoStatus)
+ *p = x
+ return p
+}
+
+func (x PaymentInfo_PaymentInfoStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PaymentInfo_PaymentInfoStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[45].Descriptor()
+}
+
+func (PaymentInfo_PaymentInfoStatus) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[45]
+}
+
+func (x PaymentInfo_PaymentInfoStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *PaymentInfo_PaymentInfoStatus) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = PaymentInfo_PaymentInfoStatus(num)
+ return nil
+}
+
+// Deprecated: Use PaymentInfo_PaymentInfoStatus.Descriptor instead.
+func (PaymentInfo_PaymentInfoStatus) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{178, 1}
+}
+
+type PaymentInfo_PaymentInfoTxnStatus int32
+
+const (
+ PaymentInfo_UNKNOWN PaymentInfo_PaymentInfoTxnStatus = 0
+ PaymentInfo_PENDING_SETUP PaymentInfo_PaymentInfoTxnStatus = 1
+ PaymentInfo_PENDING_RECEIVER_SETUP PaymentInfo_PaymentInfoTxnStatus = 2
+ PaymentInfo_INIT PaymentInfo_PaymentInfoTxnStatus = 3
+ PaymentInfo_SUCCESS PaymentInfo_PaymentInfoTxnStatus = 4
+ PaymentInfo_COMPLETED PaymentInfo_PaymentInfoTxnStatus = 5
+ PaymentInfo_FAILED PaymentInfo_PaymentInfoTxnStatus = 6
+ PaymentInfo_FAILED_RISK PaymentInfo_PaymentInfoTxnStatus = 7
+ PaymentInfo_FAILED_PROCESSING PaymentInfo_PaymentInfoTxnStatus = 8
+ PaymentInfo_FAILED_RECEIVER_PROCESSING PaymentInfo_PaymentInfoTxnStatus = 9
+ PaymentInfo_FAILED_DA PaymentInfo_PaymentInfoTxnStatus = 10
+ PaymentInfo_FAILED_DA_FINAL PaymentInfo_PaymentInfoTxnStatus = 11
+ PaymentInfo_REFUNDED_TXN PaymentInfo_PaymentInfoTxnStatus = 12
+ PaymentInfo_REFUND_FAILED PaymentInfo_PaymentInfoTxnStatus = 13
+ PaymentInfo_REFUND_FAILED_PROCESSING PaymentInfo_PaymentInfoTxnStatus = 14
+ PaymentInfo_REFUND_FAILED_DA PaymentInfo_PaymentInfoTxnStatus = 15
+ PaymentInfo_EXPIRED_TXN PaymentInfo_PaymentInfoTxnStatus = 16
+ PaymentInfo_AUTH_CANCELED PaymentInfo_PaymentInfoTxnStatus = 17
+ PaymentInfo_AUTH_CANCEL_FAILED_PROCESSING PaymentInfo_PaymentInfoTxnStatus = 18
+ PaymentInfo_AUTH_CANCEL_FAILED PaymentInfo_PaymentInfoTxnStatus = 19
+ PaymentInfo_COLLECT_INIT PaymentInfo_PaymentInfoTxnStatus = 20
+ PaymentInfo_COLLECT_SUCCESS PaymentInfo_PaymentInfoTxnStatus = 21
+ PaymentInfo_COLLECT_FAILED PaymentInfo_PaymentInfoTxnStatus = 22
+ PaymentInfo_COLLECT_FAILED_RISK PaymentInfo_PaymentInfoTxnStatus = 23
+ PaymentInfo_COLLECT_REJECTED PaymentInfo_PaymentInfoTxnStatus = 24
+ PaymentInfo_COLLECT_EXPIRED PaymentInfo_PaymentInfoTxnStatus = 25
+ PaymentInfo_COLLECT_CANCELED PaymentInfo_PaymentInfoTxnStatus = 26
+ PaymentInfo_COLLECT_CANCELLING PaymentInfo_PaymentInfoTxnStatus = 27
+ PaymentInfo_IN_REVIEW PaymentInfo_PaymentInfoTxnStatus = 28
+)
+
+// Enum value maps for PaymentInfo_PaymentInfoTxnStatus.
+var (
+ PaymentInfo_PaymentInfoTxnStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "PENDING_SETUP",
+ 2: "PENDING_RECEIVER_SETUP",
+ 3: "INIT",
+ 4: "SUCCESS",
+ 5: "COMPLETED",
+ 6: "FAILED",
+ 7: "FAILED_RISK",
+ 8: "FAILED_PROCESSING",
+ 9: "FAILED_RECEIVER_PROCESSING",
+ 10: "FAILED_DA",
+ 11: "FAILED_DA_FINAL",
+ 12: "REFUNDED_TXN",
+ 13: "REFUND_FAILED",
+ 14: "REFUND_FAILED_PROCESSING",
+ 15: "REFUND_FAILED_DA",
+ 16: "EXPIRED_TXN",
+ 17: "AUTH_CANCELED",
+ 18: "AUTH_CANCEL_FAILED_PROCESSING",
+ 19: "AUTH_CANCEL_FAILED",
+ 20: "COLLECT_INIT",
+ 21: "COLLECT_SUCCESS",
+ 22: "COLLECT_FAILED",
+ 23: "COLLECT_FAILED_RISK",
+ 24: "COLLECT_REJECTED",
+ 25: "COLLECT_EXPIRED",
+ 26: "COLLECT_CANCELED",
+ 27: "COLLECT_CANCELLING",
+ 28: "IN_REVIEW",
+ }
+ PaymentInfo_PaymentInfoTxnStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "PENDING_SETUP": 1,
+ "PENDING_RECEIVER_SETUP": 2,
+ "INIT": 3,
+ "SUCCESS": 4,
+ "COMPLETED": 5,
+ "FAILED": 6,
+ "FAILED_RISK": 7,
+ "FAILED_PROCESSING": 8,
+ "FAILED_RECEIVER_PROCESSING": 9,
+ "FAILED_DA": 10,
+ "FAILED_DA_FINAL": 11,
+ "REFUNDED_TXN": 12,
+ "REFUND_FAILED": 13,
+ "REFUND_FAILED_PROCESSING": 14,
+ "REFUND_FAILED_DA": 15,
+ "EXPIRED_TXN": 16,
+ "AUTH_CANCELED": 17,
+ "AUTH_CANCEL_FAILED_PROCESSING": 18,
+ "AUTH_CANCEL_FAILED": 19,
+ "COLLECT_INIT": 20,
+ "COLLECT_SUCCESS": 21,
+ "COLLECT_FAILED": 22,
+ "COLLECT_FAILED_RISK": 23,
+ "COLLECT_REJECTED": 24,
+ "COLLECT_EXPIRED": 25,
+ "COLLECT_CANCELED": 26,
+ "COLLECT_CANCELLING": 27,
+ "IN_REVIEW": 28,
+ }
+)
+
+func (x PaymentInfo_PaymentInfoTxnStatus) Enum() *PaymentInfo_PaymentInfoTxnStatus {
+ p := new(PaymentInfo_PaymentInfoTxnStatus)
+ *p = x
+ return p
+}
+
+func (x PaymentInfo_PaymentInfoTxnStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PaymentInfo_PaymentInfoTxnStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[46].Descriptor()
+}
+
+func (PaymentInfo_PaymentInfoTxnStatus) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[46]
+}
+
+func (x PaymentInfo_PaymentInfoTxnStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *PaymentInfo_PaymentInfoTxnStatus) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = PaymentInfo_PaymentInfoTxnStatus(num)
+ return nil
+}
+
+// Deprecated: Use PaymentInfo_PaymentInfoTxnStatus.Descriptor instead.
+func (PaymentInfo_PaymentInfoTxnStatus) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{178, 2}
+}
+
+type WebMessageInfo_WebMessageInfoStatus int32
+
+const (
+ WebMessageInfo_ERROR WebMessageInfo_WebMessageInfoStatus = 0
+ WebMessageInfo_PENDING WebMessageInfo_WebMessageInfoStatus = 1
+ WebMessageInfo_SERVER_ACK WebMessageInfo_WebMessageInfoStatus = 2
+ WebMessageInfo_DELIVERY_ACK WebMessageInfo_WebMessageInfoStatus = 3
+ WebMessageInfo_READ WebMessageInfo_WebMessageInfoStatus = 4
+ WebMessageInfo_PLAYED WebMessageInfo_WebMessageInfoStatus = 5
+)
+
+// Enum value maps for WebMessageInfo_WebMessageInfoStatus.
+var (
+ WebMessageInfo_WebMessageInfoStatus_name = map[int32]string{
+ 0: "ERROR",
+ 1: "PENDING",
+ 2: "SERVER_ACK",
+ 3: "DELIVERY_ACK",
+ 4: "READ",
+ 5: "PLAYED",
+ }
+ WebMessageInfo_WebMessageInfoStatus_value = map[string]int32{
+ "ERROR": 0,
+ "PENDING": 1,
+ "SERVER_ACK": 2,
+ "DELIVERY_ACK": 3,
+ "READ": 4,
+ "PLAYED": 5,
+ }
+)
+
+func (x WebMessageInfo_WebMessageInfoStatus) Enum() *WebMessageInfo_WebMessageInfoStatus {
+ p := new(WebMessageInfo_WebMessageInfoStatus)
+ *p = x
+ return p
+}
+
+func (x WebMessageInfo_WebMessageInfoStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WebMessageInfo_WebMessageInfoStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[47].Descriptor()
+}
+
+func (WebMessageInfo_WebMessageInfoStatus) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[47]
+}
+
+func (x WebMessageInfo_WebMessageInfoStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *WebMessageInfo_WebMessageInfoStatus) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = WebMessageInfo_WebMessageInfoStatus(num)
+ return nil
+}
+
+// Deprecated: Use WebMessageInfo_WebMessageInfoStatus.Descriptor instead.
+func (WebMessageInfo_WebMessageInfoStatus) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{179, 0}
+}
+
+type WebMessageInfo_WebMessageInfoStubType int32
+
+const (
+ WebMessageInfo_UNKNOWN WebMessageInfo_WebMessageInfoStubType = 0
+ WebMessageInfo_REVOKE WebMessageInfo_WebMessageInfoStubType = 1
+ WebMessageInfo_CIPHERTEXT WebMessageInfo_WebMessageInfoStubType = 2
+ WebMessageInfo_FUTUREPROOF WebMessageInfo_WebMessageInfoStubType = 3
+ WebMessageInfo_NON_VERIFIED_TRANSITION WebMessageInfo_WebMessageInfoStubType = 4
+ WebMessageInfo_UNVERIFIED_TRANSITION WebMessageInfo_WebMessageInfoStubType = 5
+ WebMessageInfo_VERIFIED_TRANSITION WebMessageInfo_WebMessageInfoStubType = 6
+ WebMessageInfo_VERIFIED_LOW_UNKNOWN WebMessageInfo_WebMessageInfoStubType = 7
+ WebMessageInfo_VERIFIED_HIGH WebMessageInfo_WebMessageInfoStubType = 8
+ WebMessageInfo_VERIFIED_INITIAL_UNKNOWN WebMessageInfo_WebMessageInfoStubType = 9
+ WebMessageInfo_VERIFIED_INITIAL_LOW WebMessageInfo_WebMessageInfoStubType = 10
+ WebMessageInfo_VERIFIED_INITIAL_HIGH WebMessageInfo_WebMessageInfoStubType = 11
+ WebMessageInfo_VERIFIED_TRANSITION_ANY_TO_NONE WebMessageInfo_WebMessageInfoStubType = 12
+ WebMessageInfo_VERIFIED_TRANSITION_ANY_TO_HIGH WebMessageInfo_WebMessageInfoStubType = 13
+ WebMessageInfo_VERIFIED_TRANSITION_HIGH_TO_LOW WebMessageInfo_WebMessageInfoStubType = 14
+ WebMessageInfo_VERIFIED_TRANSITION_HIGH_TO_UNKNOWN WebMessageInfo_WebMessageInfoStubType = 15
+ WebMessageInfo_VERIFIED_TRANSITION_UNKNOWN_TO_LOW WebMessageInfo_WebMessageInfoStubType = 16
+ WebMessageInfo_VERIFIED_TRANSITION_LOW_TO_UNKNOWN WebMessageInfo_WebMessageInfoStubType = 17
+ WebMessageInfo_VERIFIED_TRANSITION_NONE_TO_LOW WebMessageInfo_WebMessageInfoStubType = 18
+ WebMessageInfo_VERIFIED_TRANSITION_NONE_TO_UNKNOWN WebMessageInfo_WebMessageInfoStubType = 19
+ WebMessageInfo_GROUP_CREATE WebMessageInfo_WebMessageInfoStubType = 20
+ WebMessageInfo_GROUP_CHANGE_SUBJECT WebMessageInfo_WebMessageInfoStubType = 21
+ WebMessageInfo_GROUP_CHANGE_ICON WebMessageInfo_WebMessageInfoStubType = 22
+ WebMessageInfo_GROUP_CHANGE_INVITE_LINK WebMessageInfo_WebMessageInfoStubType = 23
+ WebMessageInfo_GROUP_CHANGE_DESCRIPTION WebMessageInfo_WebMessageInfoStubType = 24
+ WebMessageInfo_GROUP_CHANGE_RESTRICT WebMessageInfo_WebMessageInfoStubType = 25
+ WebMessageInfo_GROUP_CHANGE_ANNOUNCE WebMessageInfo_WebMessageInfoStubType = 26
+ WebMessageInfo_GROUP_PARTICIPANT_ADD WebMessageInfo_WebMessageInfoStubType = 27
+ WebMessageInfo_GROUP_PARTICIPANT_REMOVE WebMessageInfo_WebMessageInfoStubType = 28
+ WebMessageInfo_GROUP_PARTICIPANT_PROMOTE WebMessageInfo_WebMessageInfoStubType = 29
+ WebMessageInfo_GROUP_PARTICIPANT_DEMOTE WebMessageInfo_WebMessageInfoStubType = 30
+ WebMessageInfo_GROUP_PARTICIPANT_INVITE WebMessageInfo_WebMessageInfoStubType = 31
+ WebMessageInfo_GROUP_PARTICIPANT_LEAVE WebMessageInfo_WebMessageInfoStubType = 32
+ WebMessageInfo_GROUP_PARTICIPANT_CHANGE_NUMBER WebMessageInfo_WebMessageInfoStubType = 33
+ WebMessageInfo_BROADCAST_CREATE WebMessageInfo_WebMessageInfoStubType = 34
+ WebMessageInfo_BROADCAST_ADD WebMessageInfo_WebMessageInfoStubType = 35
+ WebMessageInfo_BROADCAST_REMOVE WebMessageInfo_WebMessageInfoStubType = 36
+ WebMessageInfo_GENERIC_NOTIFICATION WebMessageInfo_WebMessageInfoStubType = 37
+ WebMessageInfo_E2E_IDENTITY_CHANGED WebMessageInfo_WebMessageInfoStubType = 38
+ WebMessageInfo_E2E_ENCRYPTED WebMessageInfo_WebMessageInfoStubType = 39
+ WebMessageInfo_CALL_MISSED_VOICE WebMessageInfo_WebMessageInfoStubType = 40
+ WebMessageInfo_CALL_MISSED_VIDEO WebMessageInfo_WebMessageInfoStubType = 41
+ WebMessageInfo_INDIVIDUAL_CHANGE_NUMBER WebMessageInfo_WebMessageInfoStubType = 42
+ WebMessageInfo_GROUP_DELETE WebMessageInfo_WebMessageInfoStubType = 43
+ WebMessageInfo_GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE WebMessageInfo_WebMessageInfoStubType = 44
+ WebMessageInfo_CALL_MISSED_GROUP_VOICE WebMessageInfo_WebMessageInfoStubType = 45
+ WebMessageInfo_CALL_MISSED_GROUP_VIDEO WebMessageInfo_WebMessageInfoStubType = 46
+ WebMessageInfo_PAYMENT_CIPHERTEXT WebMessageInfo_WebMessageInfoStubType = 47
+ WebMessageInfo_PAYMENT_FUTUREPROOF WebMessageInfo_WebMessageInfoStubType = 48
+ WebMessageInfo_PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED WebMessageInfo_WebMessageInfoStubType = 49
+ WebMessageInfo_PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED WebMessageInfo_WebMessageInfoStubType = 50
+ WebMessageInfo_PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED WebMessageInfo_WebMessageInfoStubType = 51
+ WebMessageInfo_PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP WebMessageInfo_WebMessageInfoStubType = 52
+ WebMessageInfo_PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP WebMessageInfo_WebMessageInfoStubType = 53
+ WebMessageInfo_PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER WebMessageInfo_WebMessageInfoStubType = 54
+ WebMessageInfo_PAYMENT_ACTION_SEND_PAYMENT_REMINDER WebMessageInfo_WebMessageInfoStubType = 55
+ WebMessageInfo_PAYMENT_ACTION_SEND_PAYMENT_INVITATION WebMessageInfo_WebMessageInfoStubType = 56
+ WebMessageInfo_PAYMENT_ACTION_REQUEST_DECLINED WebMessageInfo_WebMessageInfoStubType = 57
+ WebMessageInfo_PAYMENT_ACTION_REQUEST_EXPIRED WebMessageInfo_WebMessageInfoStubType = 58
+ WebMessageInfo_PAYMENT_ACTION_REQUEST_CANCELLED WebMessageInfo_WebMessageInfoStubType = 59
+ WebMessageInfo_BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM WebMessageInfo_WebMessageInfoStubType = 60
+ WebMessageInfo_BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP WebMessageInfo_WebMessageInfoStubType = 61
+ WebMessageInfo_BIZ_INTRO_TOP WebMessageInfo_WebMessageInfoStubType = 62
+ WebMessageInfo_BIZ_INTRO_BOTTOM WebMessageInfo_WebMessageInfoStubType = 63
+ WebMessageInfo_BIZ_NAME_CHANGE WebMessageInfo_WebMessageInfoStubType = 64
+ WebMessageInfo_BIZ_MOVE_TO_CONSUMER_APP WebMessageInfo_WebMessageInfoStubType = 65
+ WebMessageInfo_BIZ_TWO_TIER_MIGRATION_TOP WebMessageInfo_WebMessageInfoStubType = 66
+ WebMessageInfo_BIZ_TWO_TIER_MIGRATION_BOTTOM WebMessageInfo_WebMessageInfoStubType = 67
+ WebMessageInfo_OVERSIZED WebMessageInfo_WebMessageInfoStubType = 68
+ WebMessageInfo_GROUP_CHANGE_NO_FREQUENTLY_FORWARDED WebMessageInfo_WebMessageInfoStubType = 69
+ WebMessageInfo_GROUP_V4_ADD_INVITE_SENT WebMessageInfo_WebMessageInfoStubType = 70
+ WebMessageInfo_GROUP_PARTICIPANT_ADD_REQUEST_JOIN WebMessageInfo_WebMessageInfoStubType = 71
+ WebMessageInfo_CHANGE_EPHEMERAL_SETTING WebMessageInfo_WebMessageInfoStubType = 72
+ WebMessageInfo_E2E_DEVICE_CHANGED WebMessageInfo_WebMessageInfoStubType = 73
+ WebMessageInfo_VIEWED_ONCE WebMessageInfo_WebMessageInfoStubType = 74
+ WebMessageInfo_E2E_ENCRYPTED_NOW WebMessageInfo_WebMessageInfoStubType = 75
+ WebMessageInfo_BLUE_MSG_BSP_FB_TO_BSP_PREMISE WebMessageInfo_WebMessageInfoStubType = 76
+ WebMessageInfo_BLUE_MSG_BSP_FB_TO_SELF_FB WebMessageInfo_WebMessageInfoStubType = 77
+ WebMessageInfo_BLUE_MSG_BSP_FB_TO_SELF_PREMISE WebMessageInfo_WebMessageInfoStubType = 78
+ WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 79
+ WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 80
+ WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED WebMessageInfo_WebMessageInfoStubType = 81
+ WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 82
+ WebMessageInfo_BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE WebMessageInfo_WebMessageInfoStubType = 83
+ WebMessageInfo_BLUE_MSG_BSP_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 84
+ WebMessageInfo_BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 85
+ WebMessageInfo_BLUE_MSG_BSP_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 86
+ WebMessageInfo_BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 87
+ WebMessageInfo_BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 88
+ WebMessageInfo_BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 89
+ WebMessageInfo_BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 90
+ WebMessageInfo_BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 91
+ WebMessageInfo_BLUE_MSG_SELF_FB_TO_BSP_PREMISE WebMessageInfo_WebMessageInfoStubType = 92
+ WebMessageInfo_BLUE_MSG_SELF_FB_TO_SELF_PREMISE WebMessageInfo_WebMessageInfoStubType = 93
+ WebMessageInfo_BLUE_MSG_SELF_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 94
+ WebMessageInfo_BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 95
+ WebMessageInfo_BLUE_MSG_SELF_FB_VERIFIED WebMessageInfo_WebMessageInfoStubType = 96
+ WebMessageInfo_BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 97
+ WebMessageInfo_BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE WebMessageInfo_WebMessageInfoStubType = 98
+ WebMessageInfo_BLUE_MSG_SELF_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 99
+ WebMessageInfo_BLUE_MSG_SELF_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 100
+ WebMessageInfo_BLUE_MSG_TO_BSP_FB WebMessageInfo_WebMessageInfoStubType = 101
+ WebMessageInfo_BLUE_MSG_TO_CONSUMER WebMessageInfo_WebMessageInfoStubType = 102
+ WebMessageInfo_BLUE_MSG_TO_SELF_FB WebMessageInfo_WebMessageInfoStubType = 103
+ WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED WebMessageInfo_WebMessageInfoStubType = 104
+ WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 105
+ WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED WebMessageInfo_WebMessageInfoStubType = 106
+ WebMessageInfo_BLUE_MSG_UNVERIFIED_TO_VERIFIED WebMessageInfo_WebMessageInfoStubType = 107
+ WebMessageInfo_BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 108
+ WebMessageInfo_BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 109
+ WebMessageInfo_BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 110
+ WebMessageInfo_BLUE_MSG_VERIFIED_TO_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 111
+ WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 112
+ WebMessageInfo_BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED WebMessageInfo_WebMessageInfoStubType = 113
+ WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 114
+ WebMessageInfo_BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 115
+ WebMessageInfo_BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED WebMessageInfo_WebMessageInfoStubType = 116
+ WebMessageInfo_BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED WebMessageInfo_WebMessageInfoStubType = 117
+ WebMessageInfo_E2E_IDENTITY_UNAVAILABLE WebMessageInfo_WebMessageInfoStubType = 118
+ WebMessageInfo_GROUP_CREATING WebMessageInfo_WebMessageInfoStubType = 119
+ WebMessageInfo_GROUP_CREATE_FAILED WebMessageInfo_WebMessageInfoStubType = 120
+ WebMessageInfo_GROUP_BOUNCED WebMessageInfo_WebMessageInfoStubType = 121
+ WebMessageInfo_BLOCK_CONTACT WebMessageInfo_WebMessageInfoStubType = 122
+ WebMessageInfo_EPHEMERAL_SETTING_NOT_APPLIED WebMessageInfo_WebMessageInfoStubType = 123
+ WebMessageInfo_SYNC_FAILED WebMessageInfo_WebMessageInfoStubType = 124
+ WebMessageInfo_SYNCING WebMessageInfo_WebMessageInfoStubType = 125
+ WebMessageInfo_BIZ_PRIVACY_MODE_INIT_FB WebMessageInfo_WebMessageInfoStubType = 126
+ WebMessageInfo_BIZ_PRIVACY_MODE_INIT_BSP WebMessageInfo_WebMessageInfoStubType = 127
+ WebMessageInfo_BIZ_PRIVACY_MODE_TO_FB WebMessageInfo_WebMessageInfoStubType = 128
+ WebMessageInfo_BIZ_PRIVACY_MODE_TO_BSP WebMessageInfo_WebMessageInfoStubType = 129
+ WebMessageInfo_DISAPPEARING_MODE WebMessageInfo_WebMessageInfoStubType = 130
+ WebMessageInfo_E2E_DEVICE_FETCH_FAILED WebMessageInfo_WebMessageInfoStubType = 131
+ WebMessageInfo_ADMIN_REVOKE WebMessageInfo_WebMessageInfoStubType = 132
+ WebMessageInfo_GROUP_INVITE_LINK_GROWTH_LOCKED WebMessageInfo_WebMessageInfoStubType = 133
+)
+
+// Enum value maps for WebMessageInfo_WebMessageInfoStubType.
+var (
+ WebMessageInfo_WebMessageInfoStubType_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "REVOKE",
+ 2: "CIPHERTEXT",
+ 3: "FUTUREPROOF",
+ 4: "NON_VERIFIED_TRANSITION",
+ 5: "UNVERIFIED_TRANSITION",
+ 6: "VERIFIED_TRANSITION",
+ 7: "VERIFIED_LOW_UNKNOWN",
+ 8: "VERIFIED_HIGH",
+ 9: "VERIFIED_INITIAL_UNKNOWN",
+ 10: "VERIFIED_INITIAL_LOW",
+ 11: "VERIFIED_INITIAL_HIGH",
+ 12: "VERIFIED_TRANSITION_ANY_TO_NONE",
+ 13: "VERIFIED_TRANSITION_ANY_TO_HIGH",
+ 14: "VERIFIED_TRANSITION_HIGH_TO_LOW",
+ 15: "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN",
+ 16: "VERIFIED_TRANSITION_UNKNOWN_TO_LOW",
+ 17: "VERIFIED_TRANSITION_LOW_TO_UNKNOWN",
+ 18: "VERIFIED_TRANSITION_NONE_TO_LOW",
+ 19: "VERIFIED_TRANSITION_NONE_TO_UNKNOWN",
+ 20: "GROUP_CREATE",
+ 21: "GROUP_CHANGE_SUBJECT",
+ 22: "GROUP_CHANGE_ICON",
+ 23: "GROUP_CHANGE_INVITE_LINK",
+ 24: "GROUP_CHANGE_DESCRIPTION",
+ 25: "GROUP_CHANGE_RESTRICT",
+ 26: "GROUP_CHANGE_ANNOUNCE",
+ 27: "GROUP_PARTICIPANT_ADD",
+ 28: "GROUP_PARTICIPANT_REMOVE",
+ 29: "GROUP_PARTICIPANT_PROMOTE",
+ 30: "GROUP_PARTICIPANT_DEMOTE",
+ 31: "GROUP_PARTICIPANT_INVITE",
+ 32: "GROUP_PARTICIPANT_LEAVE",
+ 33: "GROUP_PARTICIPANT_CHANGE_NUMBER",
+ 34: "BROADCAST_CREATE",
+ 35: "BROADCAST_ADD",
+ 36: "BROADCAST_REMOVE",
+ 37: "GENERIC_NOTIFICATION",
+ 38: "E2E_IDENTITY_CHANGED",
+ 39: "E2E_ENCRYPTED",
+ 40: "CALL_MISSED_VOICE",
+ 41: "CALL_MISSED_VIDEO",
+ 42: "INDIVIDUAL_CHANGE_NUMBER",
+ 43: "GROUP_DELETE",
+ 44: "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE",
+ 45: "CALL_MISSED_GROUP_VOICE",
+ 46: "CALL_MISSED_GROUP_VIDEO",
+ 47: "PAYMENT_CIPHERTEXT",
+ 48: "PAYMENT_FUTUREPROOF",
+ 49: "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED",
+ 50: "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED",
+ 51: "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED",
+ 52: "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP",
+ 53: "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP",
+ 54: "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER",
+ 55: "PAYMENT_ACTION_SEND_PAYMENT_REMINDER",
+ 56: "PAYMENT_ACTION_SEND_PAYMENT_INVITATION",
+ 57: "PAYMENT_ACTION_REQUEST_DECLINED",
+ 58: "PAYMENT_ACTION_REQUEST_EXPIRED",
+ 59: "PAYMENT_ACTION_REQUEST_CANCELLED",
+ 60: "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM",
+ 61: "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP",
+ 62: "BIZ_INTRO_TOP",
+ 63: "BIZ_INTRO_BOTTOM",
+ 64: "BIZ_NAME_CHANGE",
+ 65: "BIZ_MOVE_TO_CONSUMER_APP",
+ 66: "BIZ_TWO_TIER_MIGRATION_TOP",
+ 67: "BIZ_TWO_TIER_MIGRATION_BOTTOM",
+ 68: "OVERSIZED",
+ 69: "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED",
+ 70: "GROUP_V4_ADD_INVITE_SENT",
+ 71: "GROUP_PARTICIPANT_ADD_REQUEST_JOIN",
+ 72: "CHANGE_EPHEMERAL_SETTING",
+ 73: "E2E_DEVICE_CHANGED",
+ 74: "VIEWED_ONCE",
+ 75: "E2E_ENCRYPTED_NOW",
+ 76: "BLUE_MSG_BSP_FB_TO_BSP_PREMISE",
+ 77: "BLUE_MSG_BSP_FB_TO_SELF_FB",
+ 78: "BLUE_MSG_BSP_FB_TO_SELF_PREMISE",
+ 79: "BLUE_MSG_BSP_FB_UNVERIFIED",
+ 80: "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED",
+ 81: "BLUE_MSG_BSP_FB_VERIFIED",
+ 82: "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED",
+ 83: "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE",
+ 84: "BLUE_MSG_BSP_PREMISE_UNVERIFIED",
+ 85: "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED",
+ 86: "BLUE_MSG_BSP_PREMISE_VERIFIED",
+ 87: "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED",
+ 88: "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED",
+ 89: "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED",
+ 90: "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED",
+ 91: "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED",
+ 92: "BLUE_MSG_SELF_FB_TO_BSP_PREMISE",
+ 93: "BLUE_MSG_SELF_FB_TO_SELF_PREMISE",
+ 94: "BLUE_MSG_SELF_FB_UNVERIFIED",
+ 95: "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED",
+ 96: "BLUE_MSG_SELF_FB_VERIFIED",
+ 97: "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED",
+ 98: "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE",
+ 99: "BLUE_MSG_SELF_PREMISE_UNVERIFIED",
+ 100: "BLUE_MSG_SELF_PREMISE_VERIFIED",
+ 101: "BLUE_MSG_TO_BSP_FB",
+ 102: "BLUE_MSG_TO_CONSUMER",
+ 103: "BLUE_MSG_TO_SELF_FB",
+ 104: "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED",
+ 105: "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED",
+ 106: "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED",
+ 107: "BLUE_MSG_UNVERIFIED_TO_VERIFIED",
+ 108: "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED",
+ 109: "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED",
+ 110: "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED",
+ 111: "BLUE_MSG_VERIFIED_TO_UNVERIFIED",
+ 112: "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED",
+ 113: "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED",
+ 114: "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED",
+ 115: "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED",
+ 116: "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED",
+ 117: "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED",
+ 118: "E2E_IDENTITY_UNAVAILABLE",
+ 119: "GROUP_CREATING",
+ 120: "GROUP_CREATE_FAILED",
+ 121: "GROUP_BOUNCED",
+ 122: "BLOCK_CONTACT",
+ 123: "EPHEMERAL_SETTING_NOT_APPLIED",
+ 124: "SYNC_FAILED",
+ 125: "SYNCING",
+ 126: "BIZ_PRIVACY_MODE_INIT_FB",
+ 127: "BIZ_PRIVACY_MODE_INIT_BSP",
+ 128: "BIZ_PRIVACY_MODE_TO_FB",
+ 129: "BIZ_PRIVACY_MODE_TO_BSP",
+ 130: "DISAPPEARING_MODE",
+ 131: "E2E_DEVICE_FETCH_FAILED",
+ 132: "ADMIN_REVOKE",
+ 133: "GROUP_INVITE_LINK_GROWTH_LOCKED",
+ }
+ WebMessageInfo_WebMessageInfoStubType_value = map[string]int32{
+ "UNKNOWN": 0,
+ "REVOKE": 1,
+ "CIPHERTEXT": 2,
+ "FUTUREPROOF": 3,
+ "NON_VERIFIED_TRANSITION": 4,
+ "UNVERIFIED_TRANSITION": 5,
+ "VERIFIED_TRANSITION": 6,
+ "VERIFIED_LOW_UNKNOWN": 7,
+ "VERIFIED_HIGH": 8,
+ "VERIFIED_INITIAL_UNKNOWN": 9,
+ "VERIFIED_INITIAL_LOW": 10,
+ "VERIFIED_INITIAL_HIGH": 11,
+ "VERIFIED_TRANSITION_ANY_TO_NONE": 12,
+ "VERIFIED_TRANSITION_ANY_TO_HIGH": 13,
+ "VERIFIED_TRANSITION_HIGH_TO_LOW": 14,
+ "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN": 15,
+ "VERIFIED_TRANSITION_UNKNOWN_TO_LOW": 16,
+ "VERIFIED_TRANSITION_LOW_TO_UNKNOWN": 17,
+ "VERIFIED_TRANSITION_NONE_TO_LOW": 18,
+ "VERIFIED_TRANSITION_NONE_TO_UNKNOWN": 19,
+ "GROUP_CREATE": 20,
+ "GROUP_CHANGE_SUBJECT": 21,
+ "GROUP_CHANGE_ICON": 22,
+ "GROUP_CHANGE_INVITE_LINK": 23,
+ "GROUP_CHANGE_DESCRIPTION": 24,
+ "GROUP_CHANGE_RESTRICT": 25,
+ "GROUP_CHANGE_ANNOUNCE": 26,
+ "GROUP_PARTICIPANT_ADD": 27,
+ "GROUP_PARTICIPANT_REMOVE": 28,
+ "GROUP_PARTICIPANT_PROMOTE": 29,
+ "GROUP_PARTICIPANT_DEMOTE": 30,
+ "GROUP_PARTICIPANT_INVITE": 31,
+ "GROUP_PARTICIPANT_LEAVE": 32,
+ "GROUP_PARTICIPANT_CHANGE_NUMBER": 33,
+ "BROADCAST_CREATE": 34,
+ "BROADCAST_ADD": 35,
+ "BROADCAST_REMOVE": 36,
+ "GENERIC_NOTIFICATION": 37,
+ "E2E_IDENTITY_CHANGED": 38,
+ "E2E_ENCRYPTED": 39,
+ "CALL_MISSED_VOICE": 40,
+ "CALL_MISSED_VIDEO": 41,
+ "INDIVIDUAL_CHANGE_NUMBER": 42,
+ "GROUP_DELETE": 43,
+ "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE": 44,
+ "CALL_MISSED_GROUP_VOICE": 45,
+ "CALL_MISSED_GROUP_VIDEO": 46,
+ "PAYMENT_CIPHERTEXT": 47,
+ "PAYMENT_FUTUREPROOF": 48,
+ "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED": 49,
+ "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED": 50,
+ "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED": 51,
+ "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP": 52,
+ "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP": 53,
+ "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER": 54,
+ "PAYMENT_ACTION_SEND_PAYMENT_REMINDER": 55,
+ "PAYMENT_ACTION_SEND_PAYMENT_INVITATION": 56,
+ "PAYMENT_ACTION_REQUEST_DECLINED": 57,
+ "PAYMENT_ACTION_REQUEST_EXPIRED": 58,
+ "PAYMENT_ACTION_REQUEST_CANCELLED": 59,
+ "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM": 60,
+ "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP": 61,
+ "BIZ_INTRO_TOP": 62,
+ "BIZ_INTRO_BOTTOM": 63,
+ "BIZ_NAME_CHANGE": 64,
+ "BIZ_MOVE_TO_CONSUMER_APP": 65,
+ "BIZ_TWO_TIER_MIGRATION_TOP": 66,
+ "BIZ_TWO_TIER_MIGRATION_BOTTOM": 67,
+ "OVERSIZED": 68,
+ "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED": 69,
+ "GROUP_V4_ADD_INVITE_SENT": 70,
+ "GROUP_PARTICIPANT_ADD_REQUEST_JOIN": 71,
+ "CHANGE_EPHEMERAL_SETTING": 72,
+ "E2E_DEVICE_CHANGED": 73,
+ "VIEWED_ONCE": 74,
+ "E2E_ENCRYPTED_NOW": 75,
+ "BLUE_MSG_BSP_FB_TO_BSP_PREMISE": 76,
+ "BLUE_MSG_BSP_FB_TO_SELF_FB": 77,
+ "BLUE_MSG_BSP_FB_TO_SELF_PREMISE": 78,
+ "BLUE_MSG_BSP_FB_UNVERIFIED": 79,
+ "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": 80,
+ "BLUE_MSG_BSP_FB_VERIFIED": 81,
+ "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": 82,
+ "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE": 83,
+ "BLUE_MSG_BSP_PREMISE_UNVERIFIED": 84,
+ "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": 85,
+ "BLUE_MSG_BSP_PREMISE_VERIFIED": 86,
+ "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": 87,
+ "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED": 88,
+ "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED": 89,
+ "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED": 90,
+ "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED": 91,
+ "BLUE_MSG_SELF_FB_TO_BSP_PREMISE": 92,
+ "BLUE_MSG_SELF_FB_TO_SELF_PREMISE": 93,
+ "BLUE_MSG_SELF_FB_UNVERIFIED": 94,
+ "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED": 95,
+ "BLUE_MSG_SELF_FB_VERIFIED": 96,
+ "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED": 97,
+ "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE": 98,
+ "BLUE_MSG_SELF_PREMISE_UNVERIFIED": 99,
+ "BLUE_MSG_SELF_PREMISE_VERIFIED": 100,
+ "BLUE_MSG_TO_BSP_FB": 101,
+ "BLUE_MSG_TO_CONSUMER": 102,
+ "BLUE_MSG_TO_SELF_FB": 103,
+ "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED": 104,
+ "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": 105,
+ "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED": 106,
+ "BLUE_MSG_UNVERIFIED_TO_VERIFIED": 107,
+ "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED": 108,
+ "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": 109,
+ "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED": 110,
+ "BLUE_MSG_VERIFIED_TO_UNVERIFIED": 111,
+ "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": 112,
+ "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED": 113,
+ "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": 114,
+ "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED": 115,
+ "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED": 116,
+ "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED": 117,
+ "E2E_IDENTITY_UNAVAILABLE": 118,
+ "GROUP_CREATING": 119,
+ "GROUP_CREATE_FAILED": 120,
+ "GROUP_BOUNCED": 121,
+ "BLOCK_CONTACT": 122,
+ "EPHEMERAL_SETTING_NOT_APPLIED": 123,
+ "SYNC_FAILED": 124,
+ "SYNCING": 125,
+ "BIZ_PRIVACY_MODE_INIT_FB": 126,
+ "BIZ_PRIVACY_MODE_INIT_BSP": 127,
+ "BIZ_PRIVACY_MODE_TO_FB": 128,
+ "BIZ_PRIVACY_MODE_TO_BSP": 129,
+ "DISAPPEARING_MODE": 130,
+ "E2E_DEVICE_FETCH_FAILED": 131,
+ "ADMIN_REVOKE": 132,
+ "GROUP_INVITE_LINK_GROWTH_LOCKED": 133,
+ }
+)
+
+func (x WebMessageInfo_WebMessageInfoStubType) Enum() *WebMessageInfo_WebMessageInfoStubType {
+ p := new(WebMessageInfo_WebMessageInfoStubType)
+ *p = x
+ return p
+}
+
+func (x WebMessageInfo_WebMessageInfoStubType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WebMessageInfo_WebMessageInfoStubType) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[48].Descriptor()
+}
+
+func (WebMessageInfo_WebMessageInfoStubType) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[48]
+}
+
+func (x WebMessageInfo_WebMessageInfoStubType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *WebMessageInfo_WebMessageInfoStubType) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = WebMessageInfo_WebMessageInfoStubType(num)
+ return nil
+}
+
+// Deprecated: Use WebMessageInfo_WebMessageInfoStubType.Descriptor instead.
+func (WebMessageInfo_WebMessageInfoStubType) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{179, 1}
+}
+
+type WebMessageInfo_WebMessageInfoBizPrivacyStatus int32
+
+const (
+ WebMessageInfo_E2EE WebMessageInfo_WebMessageInfoBizPrivacyStatus = 0
+ WebMessageInfo_FB WebMessageInfo_WebMessageInfoBizPrivacyStatus = 2
+ WebMessageInfo_BSP WebMessageInfo_WebMessageInfoBizPrivacyStatus = 1
+ WebMessageInfo_BSP_AND_FB WebMessageInfo_WebMessageInfoBizPrivacyStatus = 3
+)
+
+// Enum value maps for WebMessageInfo_WebMessageInfoBizPrivacyStatus.
+var (
+ WebMessageInfo_WebMessageInfoBizPrivacyStatus_name = map[int32]string{
+ 0: "E2EE",
+ 2: "FB",
+ 1: "BSP",
+ 3: "BSP_AND_FB",
+ }
+ WebMessageInfo_WebMessageInfoBizPrivacyStatus_value = map[string]int32{
+ "E2EE": 0,
+ "FB": 2,
+ "BSP": 1,
+ "BSP_AND_FB": 3,
+ }
+)
+
+func (x WebMessageInfo_WebMessageInfoBizPrivacyStatus) Enum() *WebMessageInfo_WebMessageInfoBizPrivacyStatus {
+ p := new(WebMessageInfo_WebMessageInfoBizPrivacyStatus)
+ *p = x
+ return p
+}
+
+func (x WebMessageInfo_WebMessageInfoBizPrivacyStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WebMessageInfo_WebMessageInfoBizPrivacyStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_binary_proto_def_proto_enumTypes[49].Descriptor()
+}
+
+func (WebMessageInfo_WebMessageInfoBizPrivacyStatus) Type() protoreflect.EnumType {
+ return &file_binary_proto_def_proto_enumTypes[49]
+}
+
+func (x WebMessageInfo_WebMessageInfoBizPrivacyStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *WebMessageInfo_WebMessageInfoBizPrivacyStatus) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = WebMessageInfo_WebMessageInfoBizPrivacyStatus(num)
+ return nil
+}
+
+// Deprecated: Use WebMessageInfo_WebMessageInfoBizPrivacyStatus.Descriptor instead.
+func (WebMessageInfo_WebMessageInfoBizPrivacyStatus) EnumDescriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{179, 2}
+}
+
+type 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 *AppVersion) Reset() {
+ *x = AppVersion{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppVersion) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppVersion) ProtoMessage() {}
+
+func (x *AppVersion) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_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 AppVersion.ProtoReflect.Descriptor instead.
+func (*AppVersion) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *AppVersion) GetPrimary() uint32 {
+ if x != nil && x.Primary != nil {
+ return *x.Primary
+ }
+ return 0
+}
+
+func (x *AppVersion) GetSecondary() uint32 {
+ if x != nil && x.Secondary != nil {
+ return *x.Secondary
+ }
+ return 0
+}
+
+func (x *AppVersion) GetTertiary() uint32 {
+ if x != nil && x.Tertiary != nil {
+ return *x.Tertiary
+ }
+ return 0
+}
+
+func (x *AppVersion) GetQuaternary() uint32 {
+ if x != nil && x.Quaternary != nil {
+ return *x.Quaternary
+ }
+ return 0
+}
+
+func (x *AppVersion) GetQuinary() uint32 {
+ if x != nil && x.Quinary != nil {
+ return *x.Quinary
+ }
+ return 0
+}
+
+type UserAgent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Platform *UserAgent_UserAgentPlatform `protobuf:"varint,1,opt,name=platform,enum=proto.UserAgent_UserAgentPlatform" json:"platform,omitempty"`
+ AppVersion *AppVersion `protobuf:"bytes,2,opt,name=appVersion" json:"appVersion,omitempty"`
+ Mcc *string `protobuf:"bytes,3,opt,name=mcc" json:"mcc,omitempty"`
+ Mnc *string `protobuf:"bytes,4,opt,name=mnc" json:"mnc,omitempty"`
+ OsVersion *string `protobuf:"bytes,5,opt,name=osVersion" json:"osVersion,omitempty"`
+ Manufacturer *string `protobuf:"bytes,6,opt,name=manufacturer" json:"manufacturer,omitempty"`
+ Device *string `protobuf:"bytes,7,opt,name=device" json:"device,omitempty"`
+ OsBuildNumber *string `protobuf:"bytes,8,opt,name=osBuildNumber" json:"osBuildNumber,omitempty"`
+ PhoneId *string `protobuf:"bytes,9,opt,name=phoneId" json:"phoneId,omitempty"`
+ ReleaseChannel *UserAgent_UserAgentReleaseChannel `protobuf:"varint,10,opt,name=releaseChannel,enum=proto.UserAgent_UserAgentReleaseChannel" json:"releaseChannel,omitempty"`
+ LocaleLanguageIso6391 *string `protobuf:"bytes,11,opt,name=localeLanguageIso6391" json:"localeLanguageIso6391,omitempty"`
+ LocaleCountryIso31661Alpha2 *string `protobuf:"bytes,12,opt,name=localeCountryIso31661Alpha2" json:"localeCountryIso31661Alpha2,omitempty"`
+ DeviceBoard *string `protobuf:"bytes,13,opt,name=deviceBoard" json:"deviceBoard,omitempty"`
+}
+
+func (x *UserAgent) Reset() {
+ *x = UserAgent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserAgent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserAgent) ProtoMessage() {}
+
+func (x *UserAgent) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_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 UserAgent.ProtoReflect.Descriptor instead.
+func (*UserAgent) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserAgent) GetPlatform() UserAgent_UserAgentPlatform {
+ if x != nil && x.Platform != nil {
+ return *x.Platform
+ }
+ return UserAgent_ANDROID
+}
+
+func (x *UserAgent) GetAppVersion() *AppVersion {
+ if x != nil {
+ return x.AppVersion
+ }
+ return nil
+}
+
+func (x *UserAgent) GetMcc() string {
+ if x != nil && x.Mcc != nil {
+ return *x.Mcc
+ }
+ return ""
+}
+
+func (x *UserAgent) GetMnc() string {
+ if x != nil && x.Mnc != nil {
+ return *x.Mnc
+ }
+ return ""
+}
+
+func (x *UserAgent) GetOsVersion() string {
+ if x != nil && x.OsVersion != nil {
+ return *x.OsVersion
+ }
+ return ""
+}
+
+func (x *UserAgent) GetManufacturer() string {
+ if x != nil && x.Manufacturer != nil {
+ return *x.Manufacturer
+ }
+ return ""
+}
+
+func (x *UserAgent) GetDevice() string {
+ if x != nil && x.Device != nil {
+ return *x.Device
+ }
+ return ""
+}
+
+func (x *UserAgent) GetOsBuildNumber() string {
+ if x != nil && x.OsBuildNumber != nil {
+ return *x.OsBuildNumber
+ }
+ return ""
+}
+
+func (x *UserAgent) GetPhoneId() string {
+ if x != nil && x.PhoneId != nil {
+ return *x.PhoneId
+ }
+ return ""
+}
+
+func (x *UserAgent) GetReleaseChannel() UserAgent_UserAgentReleaseChannel {
+ if x != nil && x.ReleaseChannel != nil {
+ return *x.ReleaseChannel
+ }
+ return UserAgent_RELEASE
+}
+
+func (x *UserAgent) GetLocaleLanguageIso6391() string {
+ if x != nil && x.LocaleLanguageIso6391 != nil {
+ return *x.LocaleLanguageIso6391
+ }
+ return ""
+}
+
+func (x *UserAgent) GetLocaleCountryIso31661Alpha2() string {
+ if x != nil && x.LocaleCountryIso31661Alpha2 != nil {
+ return *x.LocaleCountryIso31661Alpha2
+ }
+ return ""
+}
+
+func (x *UserAgent) GetDeviceBoard() string {
+ if x != nil && x.DeviceBoard != nil {
+ return *x.DeviceBoard
+ }
+ return ""
+}
+
+type WebdPayload struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UsesParticipantInKey *bool `protobuf:"varint,1,opt,name=usesParticipantInKey" json:"usesParticipantInKey,omitempty"`
+ SupportsStarredMessages *bool `protobuf:"varint,2,opt,name=supportsStarredMessages" json:"supportsStarredMessages,omitempty"`
+ SupportsDocumentMessages *bool `protobuf:"varint,3,opt,name=supportsDocumentMessages" json:"supportsDocumentMessages,omitempty"`
+ SupportsUrlMessages *bool `protobuf:"varint,4,opt,name=supportsUrlMessages" json:"supportsUrlMessages,omitempty"`
+ SupportsMediaRetry *bool `protobuf:"varint,5,opt,name=supportsMediaRetry" json:"supportsMediaRetry,omitempty"`
+ SupportsE2EImage *bool `protobuf:"varint,6,opt,name=supportsE2EImage" json:"supportsE2EImage,omitempty"`
+ SupportsE2EVideo *bool `protobuf:"varint,7,opt,name=supportsE2EVideo" json:"supportsE2EVideo,omitempty"`
+ SupportsE2EAudio *bool `protobuf:"varint,8,opt,name=supportsE2EAudio" json:"supportsE2EAudio,omitempty"`
+ SupportsE2EDocument *bool `protobuf:"varint,9,opt,name=supportsE2EDocument" json:"supportsE2EDocument,omitempty"`
+ DocumentTypes *string `protobuf:"bytes,10,opt,name=documentTypes" json:"documentTypes,omitempty"`
+ Features []byte `protobuf:"bytes,11,opt,name=features" json:"features,omitempty"`
+}
+
+func (x *WebdPayload) Reset() {
+ *x = WebdPayload{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WebdPayload) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WebdPayload) ProtoMessage() {}
+
+func (x *WebdPayload) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_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 WebdPayload.ProtoReflect.Descriptor instead.
+func (*WebdPayload) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *WebdPayload) GetUsesParticipantInKey() bool {
+ if x != nil && x.UsesParticipantInKey != nil {
+ return *x.UsesParticipantInKey
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsStarredMessages() bool {
+ if x != nil && x.SupportsStarredMessages != nil {
+ return *x.SupportsStarredMessages
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsDocumentMessages() bool {
+ if x != nil && x.SupportsDocumentMessages != nil {
+ return *x.SupportsDocumentMessages
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsUrlMessages() bool {
+ if x != nil && x.SupportsUrlMessages != nil {
+ return *x.SupportsUrlMessages
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsMediaRetry() bool {
+ if x != nil && x.SupportsMediaRetry != nil {
+ return *x.SupportsMediaRetry
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsE2EImage() bool {
+ if x != nil && x.SupportsE2EImage != nil {
+ return *x.SupportsE2EImage
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsE2EVideo() bool {
+ if x != nil && x.SupportsE2EVideo != nil {
+ return *x.SupportsE2EVideo
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsE2EAudio() bool {
+ if x != nil && x.SupportsE2EAudio != nil {
+ return *x.SupportsE2EAudio
+ }
+ return false
+}
+
+func (x *WebdPayload) GetSupportsE2EDocument() bool {
+ if x != nil && x.SupportsE2EDocument != nil {
+ return *x.SupportsE2EDocument
+ }
+ return false
+}
+
+func (x *WebdPayload) GetDocumentTypes() string {
+ if x != nil && x.DocumentTypes != nil {
+ return *x.DocumentTypes
+ }
+ return ""
+}
+
+func (x *WebdPayload) GetFeatures() []byte {
+ if x != nil {
+ return x.Features
+ }
+ return nil
+}
+
+type WebInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RefToken *string `protobuf:"bytes,1,opt,name=refToken" json:"refToken,omitempty"`
+ Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
+ WebdPayload *WebdPayload `protobuf:"bytes,3,opt,name=webdPayload" json:"webdPayload,omitempty"`
+ WebSubPlatform *WebInfo_WebInfoWebSubPlatform `protobuf:"varint,4,opt,name=webSubPlatform,enum=proto.WebInfo_WebInfoWebSubPlatform" json:"webSubPlatform,omitempty"`
+}
+
+func (x *WebInfo) Reset() {
+ *x = WebInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WebInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WebInfo) ProtoMessage() {}
+
+func (x *WebInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_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 WebInfo.ProtoReflect.Descriptor instead.
+func (*WebInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *WebInfo) GetRefToken() string {
+ if x != nil && x.RefToken != nil {
+ return *x.RefToken
+ }
+ return ""
+}
+
+func (x *WebInfo) GetVersion() string {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return ""
+}
+
+func (x *WebInfo) GetWebdPayload() *WebdPayload {
+ if x != nil {
+ return x.WebdPayload
+ }
+ return nil
+}
+
+func (x *WebInfo) GetWebSubPlatform() WebInfo_WebInfoWebSubPlatform {
+ if x != nil && x.WebSubPlatform != nil {
+ return *x.WebSubPlatform
+ }
+ return WebInfo_WEB_BROWSER
+}
+
+type DNSSource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DnsMethod *DNSSource_DNSSourceDNSResolutionMethod `protobuf:"varint,15,opt,name=dnsMethod,enum=proto.DNSSource_DNSSourceDNSResolutionMethod" json:"dnsMethod,omitempty"`
+ AppCached *bool `protobuf:"varint,16,opt,name=appCached" json:"appCached,omitempty"`
+}
+
+func (x *DNSSource) Reset() {
+ *x = DNSSource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DNSSource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DNSSource) ProtoMessage() {}
+
+func (x *DNSSource) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_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 DNSSource.ProtoReflect.Descriptor instead.
+func (*DNSSource) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DNSSource) GetDnsMethod() DNSSource_DNSSourceDNSResolutionMethod {
+ if x != nil && x.DnsMethod != nil {
+ return *x.DnsMethod
+ }
+ return DNSSource_SYSTEM
+}
+
+func (x *DNSSource) GetAppCached() bool {
+ if x != nil && x.AppCached != nil {
+ return *x.AppCached
+ }
+ return false
+}
+
+type CompanionRegData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ERegid []byte `protobuf:"bytes,1,opt,name=eRegid" json:"eRegid,omitempty"`
+ EKeytype []byte `protobuf:"bytes,2,opt,name=eKeytype" json:"eKeytype,omitempty"`
+ EIdent []byte `protobuf:"bytes,3,opt,name=eIdent" json:"eIdent,omitempty"`
+ ESkeyId []byte `protobuf:"bytes,4,opt,name=eSkeyId" json:"eSkeyId,omitempty"`
+ ESkeyVal []byte `protobuf:"bytes,5,opt,name=eSkeyVal" json:"eSkeyVal,omitempty"`
+ ESkeySig []byte `protobuf:"bytes,6,opt,name=eSkeySig" json:"eSkeySig,omitempty"`
+ BuildHash []byte `protobuf:"bytes,7,opt,name=buildHash" json:"buildHash,omitempty"`
+ CompanionProps []byte `protobuf:"bytes,8,opt,name=companionProps" json:"companionProps,omitempty"`
+}
+
+func (x *CompanionRegData) Reset() {
+ *x = CompanionRegData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CompanionRegData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CompanionRegData) ProtoMessage() {}
+
+func (x *CompanionRegData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_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 CompanionRegData.ProtoReflect.Descriptor instead.
+func (*CompanionRegData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CompanionRegData) GetERegid() []byte {
+ if x != nil {
+ return x.ERegid
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetEKeytype() []byte {
+ if x != nil {
+ return x.EKeytype
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetEIdent() []byte {
+ if x != nil {
+ return x.EIdent
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetESkeyId() []byte {
+ if x != nil {
+ return x.ESkeyId
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetESkeyVal() []byte {
+ if x != nil {
+ return x.ESkeyVal
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetESkeySig() []byte {
+ if x != nil {
+ return x.ESkeySig
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetBuildHash() []byte {
+ if x != nil {
+ return x.BuildHash
+ }
+ return nil
+}
+
+func (x *CompanionRegData) GetCompanionProps() []byte {
+ if x != nil {
+ return x.CompanionProps
+ }
+ return nil
+}
+
+type ClientPayload struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Username *uint64 `protobuf:"varint,1,opt,name=username" json:"username,omitempty"`
+ Passive *bool `protobuf:"varint,3,opt,name=passive" json:"passive,omitempty"`
+ UserAgent *UserAgent `protobuf:"bytes,5,opt,name=userAgent" json:"userAgent,omitempty"`
+ WebInfo *WebInfo `protobuf:"bytes,6,opt,name=webInfo" json:"webInfo,omitempty"`
+ PushName *string `protobuf:"bytes,7,opt,name=pushName" json:"pushName,omitempty"`
+ SessionId *int32 `protobuf:"fixed32,9,opt,name=sessionId" json:"sessionId,omitempty"`
+ ShortConnect *bool `protobuf:"varint,10,opt,name=shortConnect" json:"shortConnect,omitempty"`
+ ConnectType *ClientPayload_ClientPayloadConnectType `protobuf:"varint,12,opt,name=connectType,enum=proto.ClientPayload_ClientPayloadConnectType" json:"connectType,omitempty"`
+ ConnectReason *ClientPayload_ClientPayloadConnectReason `protobuf:"varint,13,opt,name=connectReason,enum=proto.ClientPayload_ClientPayloadConnectReason" json:"connectReason,omitempty"`
+ Shards []int32 `protobuf:"varint,14,rep,name=shards" json:"shards,omitempty"`
+ DnsSource *DNSSource `protobuf:"bytes,15,opt,name=dnsSource" json:"dnsSource,omitempty"`
+ ConnectAttemptCount *uint32 `protobuf:"varint,16,opt,name=connectAttemptCount" json:"connectAttemptCount,omitempty"`
+ Device *uint32 `protobuf:"varint,18,opt,name=device" json:"device,omitempty"`
+ RegData *CompanionRegData `protobuf:"bytes,19,opt,name=regData" json:"regData,omitempty"`
+ Product *ClientPayload_ClientPayloadProduct `protobuf:"varint,20,opt,name=product,enum=proto.ClientPayload_ClientPayloadProduct" json:"product,omitempty"`
+ FbCat []byte `protobuf:"bytes,21,opt,name=fbCat" json:"fbCat,omitempty"`
+ FbUserAgent []byte `protobuf:"bytes,22,opt,name=fbUserAgent" json:"fbUserAgent,omitempty"`
+ Oc *bool `protobuf:"varint,23,opt,name=oc" json:"oc,omitempty"`
+ Lc *int32 `protobuf:"varint,24,opt,name=lc" json:"lc,omitempty"`
+ IosAppExtension *ClientPayload_ClientPayloadIOSAppExtension `protobuf:"varint,30,opt,name=iosAppExtension,enum=proto.ClientPayload_ClientPayloadIOSAppExtension" json:"iosAppExtension,omitempty"`
+ FbAppId *uint64 `protobuf:"varint,31,opt,name=fbAppId" json:"fbAppId,omitempty"`
+ FbDeviceId []byte `protobuf:"bytes,32,opt,name=fbDeviceId" json:"fbDeviceId,omitempty"`
+}
+
+func (x *ClientPayload) Reset() {
+ *x = ClientPayload{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientPayload) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientPayload) ProtoMessage() {}
+
+func (x *ClientPayload) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientPayload.ProtoReflect.Descriptor instead.
+func (*ClientPayload) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ClientPayload) GetUsername() uint64 {
+ if x != nil && x.Username != nil {
+ return *x.Username
+ }
+ return 0
+}
+
+func (x *ClientPayload) GetPassive() bool {
+ if x != nil && x.Passive != nil {
+ return *x.Passive
+ }
+ return false
+}
+
+func (x *ClientPayload) GetUserAgent() *UserAgent {
+ if x != nil {
+ return x.UserAgent
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetWebInfo() *WebInfo {
+ if x != nil {
+ return x.WebInfo
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetPushName() string {
+ if x != nil && x.PushName != nil {
+ return *x.PushName
+ }
+ return ""
+}
+
+func (x *ClientPayload) GetSessionId() int32 {
+ if x != nil && x.SessionId != nil {
+ return *x.SessionId
+ }
+ return 0
+}
+
+func (x *ClientPayload) GetShortConnect() bool {
+ if x != nil && x.ShortConnect != nil {
+ return *x.ShortConnect
+ }
+ return false
+}
+
+func (x *ClientPayload) GetConnectType() ClientPayload_ClientPayloadConnectType {
+ if x != nil && x.ConnectType != nil {
+ return *x.ConnectType
+ }
+ return ClientPayload_CELLULAR_UNKNOWN
+}
+
+func (x *ClientPayload) GetConnectReason() ClientPayload_ClientPayloadConnectReason {
+ if x != nil && x.ConnectReason != nil {
+ return *x.ConnectReason
+ }
+ return ClientPayload_PUSH
+}
+
+func (x *ClientPayload) GetShards() []int32 {
+ if x != nil {
+ return x.Shards
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetDnsSource() *DNSSource {
+ if x != nil {
+ return x.DnsSource
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetConnectAttemptCount() uint32 {
+ if x != nil && x.ConnectAttemptCount != nil {
+ return *x.ConnectAttemptCount
+ }
+ return 0
+}
+
+func (x *ClientPayload) GetDevice() uint32 {
+ if x != nil && x.Device != nil {
+ return *x.Device
+ }
+ return 0
+}
+
+func (x *ClientPayload) GetRegData() *CompanionRegData {
+ if x != nil {
+ return x.RegData
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetProduct() ClientPayload_ClientPayloadProduct {
+ if x != nil && x.Product != nil {
+ return *x.Product
+ }
+ return ClientPayload_WHATSAPP
+}
+
+func (x *ClientPayload) GetFbCat() []byte {
+ if x != nil {
+ return x.FbCat
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetFbUserAgent() []byte {
+ if x != nil {
+ return x.FbUserAgent
+ }
+ return nil
+}
+
+func (x *ClientPayload) GetOc() bool {
+ if x != nil && x.Oc != nil {
+ return *x.Oc
+ }
+ return false
+}
+
+func (x *ClientPayload) GetLc() int32 {
+ if x != nil && x.Lc != nil {
+ return *x.Lc
+ }
+ return 0
+}
+
+func (x *ClientPayload) GetIosAppExtension() ClientPayload_ClientPayloadIOSAppExtension {
+ if x != nil && x.IosAppExtension != nil {
+ return *x.IosAppExtension
+ }
+ return ClientPayload_SHARE_EXTENSION
+}
+
+func (x *ClientPayload) GetFbAppId() uint64 {
+ if x != nil && x.FbAppId != nil {
+ return *x.FbAppId
+ }
+ return 0
+}
+
+func (x *ClientPayload) GetFbDeviceId() []byte {
+ if x != nil {
+ return x.FbDeviceId
+ }
+ return nil
+}
+
+// Renamed from Details
+type NoiseCertificateDetails 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 *NoiseCertificateDetails) Reset() {
+ *x = NoiseCertificateDetails{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NoiseCertificateDetails) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NoiseCertificateDetails) ProtoMessage() {}
+
+func (x *NoiseCertificateDetails) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NoiseCertificateDetails.ProtoReflect.Descriptor instead.
+func (*NoiseCertificateDetails) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *NoiseCertificateDetails) GetSerial() uint32 {
+ if x != nil && x.Serial != nil {
+ return *x.Serial
+ }
+ return 0
+}
+
+func (x *NoiseCertificateDetails) GetIssuer() string {
+ if x != nil && x.Issuer != nil {
+ return *x.Issuer
+ }
+ return ""
+}
+
+func (x *NoiseCertificateDetails) GetExpires() uint64 {
+ if x != nil && x.Expires != nil {
+ return *x.Expires
+ }
+ return 0
+}
+
+func (x *NoiseCertificateDetails) GetSubject() string {
+ if x != nil && x.Subject != nil {
+ return *x.Subject
+ }
+ return ""
+}
+
+func (x *NoiseCertificateDetails) GetKey() []byte {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+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_binary_proto_def_proto_msgTypes[8]
+ 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_binary_proto_def_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NoiseCertificate.ProtoReflect.Descriptor instead.
+func (*NoiseCertificate) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{8}
+}
+
+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 ClientHello struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ephemeral []byte `protobuf:"bytes,1,opt,name=ephemeral" json:"ephemeral,omitempty"`
+ Static []byte `protobuf:"bytes,2,opt,name=static" json:"static,omitempty"`
+ Payload []byte `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
+}
+
+func (x *ClientHello) Reset() {
+ *x = ClientHello{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientHello) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientHello) ProtoMessage() {}
+
+func (x *ClientHello) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientHello.ProtoReflect.Descriptor instead.
+func (*ClientHello) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ClientHello) GetEphemeral() []byte {
+ if x != nil {
+ return x.Ephemeral
+ }
+ return nil
+}
+
+func (x *ClientHello) GetStatic() []byte {
+ if x != nil {
+ return x.Static
+ }
+ return nil
+}
+
+func (x *ClientHello) GetPayload() []byte {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+type ServerHello struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ephemeral []byte `protobuf:"bytes,1,opt,name=ephemeral" json:"ephemeral,omitempty"`
+ Static []byte `protobuf:"bytes,2,opt,name=static" json:"static,omitempty"`
+ Payload []byte `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
+}
+
+func (x *ServerHello) Reset() {
+ *x = ServerHello{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ServerHello) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerHello) ProtoMessage() {}
+
+func (x *ServerHello) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerHello.ProtoReflect.Descriptor instead.
+func (*ServerHello) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ServerHello) GetEphemeral() []byte {
+ if x != nil {
+ return x.Ephemeral
+ }
+ return nil
+}
+
+func (x *ServerHello) GetStatic() []byte {
+ if x != nil {
+ return x.Static
+ }
+ return nil
+}
+
+func (x *ServerHello) GetPayload() []byte {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+type ClientFinish struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Static []byte `protobuf:"bytes,1,opt,name=static" json:"static,omitempty"`
+ Payload []byte `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"`
+}
+
+func (x *ClientFinish) Reset() {
+ *x = ClientFinish{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientFinish) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientFinish) ProtoMessage() {}
+
+func (x *ClientFinish) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[11]
+ 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 ClientFinish.ProtoReflect.Descriptor instead.
+func (*ClientFinish) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ClientFinish) GetStatic() []byte {
+ if x != nil {
+ return x.Static
+ }
+ return nil
+}
+
+func (x *ClientFinish) GetPayload() []byte {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+type HandshakeMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ClientHello *ClientHello `protobuf:"bytes,2,opt,name=clientHello" json:"clientHello,omitempty"`
+ ServerHello *ServerHello `protobuf:"bytes,3,opt,name=serverHello" json:"serverHello,omitempty"`
+ ClientFinish *ClientFinish `protobuf:"bytes,4,opt,name=clientFinish" json:"clientFinish,omitempty"`
+}
+
+func (x *HandshakeMessage) Reset() {
+ *x = HandshakeMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HandshakeMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HandshakeMessage) ProtoMessage() {}
+
+func (x *HandshakeMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[12]
+ 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 HandshakeMessage.ProtoReflect.Descriptor instead.
+func (*HandshakeMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *HandshakeMessage) GetClientHello() *ClientHello {
+ if x != nil {
+ return x.ClientHello
+ }
+ return nil
+}
+
+func (x *HandshakeMessage) GetServerHello() *ServerHello {
+ if x != nil {
+ return x.ServerHello
+ }
+ return nil
+}
+
+func (x *HandshakeMessage) GetClientFinish() *ClientFinish {
+ if x != nil {
+ return x.ClientFinish
+ }
+ return nil
+}
+
+type BizIdentityInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Vlevel *BizIdentityInfo_BizIdentityInfoVerifiedLevelValue `protobuf:"varint,1,opt,name=vlevel,enum=proto.BizIdentityInfo_BizIdentityInfoVerifiedLevelValue" json:"vlevel,omitempty"`
+ VnameCert *VerifiedNameCertificate `protobuf:"bytes,2,opt,name=vnameCert" json:"vnameCert,omitempty"`
+ Signed *bool `protobuf:"varint,3,opt,name=signed" json:"signed,omitempty"`
+ Revoked *bool `protobuf:"varint,4,opt,name=revoked" json:"revoked,omitempty"`
+ HostStorage *BizIdentityInfo_BizIdentityInfoHostStorageType `protobuf:"varint,5,opt,name=hostStorage,enum=proto.BizIdentityInfo_BizIdentityInfoHostStorageType" json:"hostStorage,omitempty"`
+ ActualActors *BizIdentityInfo_BizIdentityInfoActualActorsType `protobuf:"varint,6,opt,name=actualActors,enum=proto.BizIdentityInfo_BizIdentityInfoActualActorsType" json:"actualActors,omitempty"`
+ PrivacyModeTs *uint64 `protobuf:"varint,7,opt,name=privacyModeTs" json:"privacyModeTs,omitempty"`
+ FeatureControls *uint64 `protobuf:"varint,8,opt,name=featureControls" json:"featureControls,omitempty"`
+}
+
+func (x *BizIdentityInfo) Reset() {
+ *x = BizIdentityInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BizIdentityInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BizIdentityInfo) ProtoMessage() {}
+
+func (x *BizIdentityInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[13]
+ 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 BizIdentityInfo.ProtoReflect.Descriptor instead.
+func (*BizIdentityInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *BizIdentityInfo) GetVlevel() BizIdentityInfo_BizIdentityInfoVerifiedLevelValue {
+ if x != nil && x.Vlevel != nil {
+ return *x.Vlevel
+ }
+ return BizIdentityInfo_UNKNOWN
+}
+
+func (x *BizIdentityInfo) GetVnameCert() *VerifiedNameCertificate {
+ if x != nil {
+ return x.VnameCert
+ }
+ return nil
+}
+
+func (x *BizIdentityInfo) GetSigned() bool {
+ if x != nil && x.Signed != nil {
+ return *x.Signed
+ }
+ return false
+}
+
+func (x *BizIdentityInfo) GetRevoked() bool {
+ if x != nil && x.Revoked != nil {
+ return *x.Revoked
+ }
+ return false
+}
+
+func (x *BizIdentityInfo) GetHostStorage() BizIdentityInfo_BizIdentityInfoHostStorageType {
+ if x != nil && x.HostStorage != nil {
+ return *x.HostStorage
+ }
+ return BizIdentityInfo_ON_PREMISE
+}
+
+func (x *BizIdentityInfo) GetActualActors() BizIdentityInfo_BizIdentityInfoActualActorsType {
+ if x != nil && x.ActualActors != nil {
+ return *x.ActualActors
+ }
+ return BizIdentityInfo_SELF
+}
+
+func (x *BizIdentityInfo) GetPrivacyModeTs() uint64 {
+ if x != nil && x.PrivacyModeTs != nil {
+ return *x.PrivacyModeTs
+ }
+ return 0
+}
+
+func (x *BizIdentityInfo) GetFeatureControls() uint64 {
+ if x != nil && x.FeatureControls != nil {
+ return *x.FeatureControls
+ }
+ return 0
+}
+
+type BizAccountLinkInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WhatsappBizAcctFbid *uint64 `protobuf:"varint,1,opt,name=whatsappBizAcctFbid" json:"whatsappBizAcctFbid,omitempty"`
+ WhatsappAcctNumber *string `protobuf:"bytes,2,opt,name=whatsappAcctNumber" json:"whatsappAcctNumber,omitempty"`
+ IssueTime *uint64 `protobuf:"varint,3,opt,name=issueTime" json:"issueTime,omitempty"`
+ HostStorage *BizAccountLinkInfo_BizAccountLinkInfoHostStorageType `protobuf:"varint,4,opt,name=hostStorage,enum=proto.BizAccountLinkInfo_BizAccountLinkInfoHostStorageType" json:"hostStorage,omitempty"`
+ AccountType *BizAccountLinkInfo_BizAccountLinkInfoAccountType `protobuf:"varint,5,opt,name=accountType,enum=proto.BizAccountLinkInfo_BizAccountLinkInfoAccountType" json:"accountType,omitempty"`
+}
+
+func (x *BizAccountLinkInfo) Reset() {
+ *x = BizAccountLinkInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BizAccountLinkInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BizAccountLinkInfo) ProtoMessage() {}
+
+func (x *BizAccountLinkInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[14]
+ 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 BizAccountLinkInfo.ProtoReflect.Descriptor instead.
+func (*BizAccountLinkInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *BizAccountLinkInfo) GetWhatsappBizAcctFbid() uint64 {
+ if x != nil && x.WhatsappBizAcctFbid != nil {
+ return *x.WhatsappBizAcctFbid
+ }
+ return 0
+}
+
+func (x *BizAccountLinkInfo) GetWhatsappAcctNumber() string {
+ if x != nil && x.WhatsappAcctNumber != nil {
+ return *x.WhatsappAcctNumber
+ }
+ return ""
+}
+
+func (x *BizAccountLinkInfo) GetIssueTime() uint64 {
+ if x != nil && x.IssueTime != nil {
+ return *x.IssueTime
+ }
+ return 0
+}
+
+func (x *BizAccountLinkInfo) GetHostStorage() BizAccountLinkInfo_BizAccountLinkInfoHostStorageType {
+ if x != nil && x.HostStorage != nil {
+ return *x.HostStorage
+ }
+ return BizAccountLinkInfo_ON_PREMISE
+}
+
+func (x *BizAccountLinkInfo) GetAccountType() BizAccountLinkInfo_BizAccountLinkInfoAccountType {
+ if x != nil && x.AccountType != nil {
+ return *x.AccountType
+ }
+ return BizAccountLinkInfo_ENTERPRISE
+}
+
+type BizAccountPayload struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ VnameCert *VerifiedNameCertificate `protobuf:"bytes,1,opt,name=vnameCert" json:"vnameCert,omitempty"`
+ BizAcctLinkInfo []byte `protobuf:"bytes,2,opt,name=bizAcctLinkInfo" json:"bizAcctLinkInfo,omitempty"`
+}
+
+func (x *BizAccountPayload) Reset() {
+ *x = BizAccountPayload{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BizAccountPayload) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BizAccountPayload) ProtoMessage() {}
+
+func (x *BizAccountPayload) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[15]
+ 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 BizAccountPayload.ProtoReflect.Descriptor instead.
+func (*BizAccountPayload) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *BizAccountPayload) GetVnameCert() *VerifiedNameCertificate {
+ if x != nil {
+ return x.VnameCert
+ }
+ return nil
+}
+
+func (x *BizAccountPayload) GetBizAcctLinkInfo() []byte {
+ if x != nil {
+ return x.BizAcctLinkInfo
+ }
+ return nil
+}
+
+// Renamed from Details
+type VerifiedNameDetails struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Serial *uint64 `protobuf:"varint,1,opt,name=serial" json:"serial,omitempty"`
+ Issuer *string `protobuf:"bytes,2,opt,name=issuer" json:"issuer,omitempty"`
+ VerifiedName *string `protobuf:"bytes,4,opt,name=verifiedName" json:"verifiedName,omitempty"`
+ LocalizedNames []*LocalizedName `protobuf:"bytes,8,rep,name=localizedNames" json:"localizedNames,omitempty"`
+ IssueTime *uint64 `protobuf:"varint,10,opt,name=issueTime" json:"issueTime,omitempty"`
+}
+
+func (x *VerifiedNameDetails) Reset() {
+ *x = VerifiedNameDetails{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VerifiedNameDetails) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VerifiedNameDetails) ProtoMessage() {}
+
+func (x *VerifiedNameDetails) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[16]
+ 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 VerifiedNameDetails.ProtoReflect.Descriptor instead.
+func (*VerifiedNameDetails) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *VerifiedNameDetails) GetSerial() uint64 {
+ if x != nil && x.Serial != nil {
+ return *x.Serial
+ }
+ return 0
+}
+
+func (x *VerifiedNameDetails) GetIssuer() string {
+ if x != nil && x.Issuer != nil {
+ return *x.Issuer
+ }
+ return ""
+}
+
+func (x *VerifiedNameDetails) GetVerifiedName() string {
+ if x != nil && x.VerifiedName != nil {
+ return *x.VerifiedName
+ }
+ return ""
+}
+
+func (x *VerifiedNameDetails) GetLocalizedNames() []*LocalizedName {
+ if x != nil {
+ return x.LocalizedNames
+ }
+ return nil
+}
+
+func (x *VerifiedNameDetails) GetIssueTime() uint64 {
+ if x != nil && x.IssueTime != nil {
+ return *x.IssueTime
+ }
+ return 0
+}
+
+type VerifiedNameCertificate 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"`
+ ServerSignature []byte `protobuf:"bytes,3,opt,name=serverSignature" json:"serverSignature,omitempty"`
+}
+
+func (x *VerifiedNameCertificate) Reset() {
+ *x = VerifiedNameCertificate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VerifiedNameCertificate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VerifiedNameCertificate) ProtoMessage() {}
+
+func (x *VerifiedNameCertificate) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[17]
+ 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 VerifiedNameCertificate.ProtoReflect.Descriptor instead.
+func (*VerifiedNameCertificate) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *VerifiedNameCertificate) GetDetails() []byte {
+ if x != nil {
+ return x.Details
+ }
+ return nil
+}
+
+func (x *VerifiedNameCertificate) GetSignature() []byte {
+ if x != nil {
+ return x.Signature
+ }
+ return nil
+}
+
+func (x *VerifiedNameCertificate) GetServerSignature() []byte {
+ if x != nil {
+ return x.ServerSignature
+ }
+ return nil
+}
+
+type LocalizedName struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Lg *string `protobuf:"bytes,1,opt,name=lg" json:"lg,omitempty"`
+ Lc *string `protobuf:"bytes,2,opt,name=lc" json:"lc,omitempty"`
+ VerifiedName *string `protobuf:"bytes,3,opt,name=verifiedName" json:"verifiedName,omitempty"`
+}
+
+func (x *LocalizedName) Reset() {
+ *x = LocalizedName{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalizedName) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalizedName) ProtoMessage() {}
+
+func (x *LocalizedName) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[18]
+ 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 LocalizedName.ProtoReflect.Descriptor instead.
+func (*LocalizedName) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *LocalizedName) GetLg() string {
+ if x != nil && x.Lg != nil {
+ return *x.Lg
+ }
+ return ""
+}
+
+func (x *LocalizedName) GetLc() string {
+ if x != nil && x.Lc != nil {
+ return *x.Lc
+ }
+ return ""
+}
+
+func (x *LocalizedName) GetVerifiedName() string {
+ if x != nil && x.VerifiedName != nil {
+ return *x.VerifiedName
+ }
+ return ""
+}
+
+type SyncActionData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index []byte `protobuf:"bytes,1,opt,name=index" json:"index,omitempty"`
+ Value *SyncActionValue `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
+ Padding []byte `protobuf:"bytes,3,opt,name=padding" json:"padding,omitempty"`
+ Version *int32 `protobuf:"varint,4,opt,name=version" json:"version,omitempty"`
+}
+
+func (x *SyncActionData) Reset() {
+ *x = SyncActionData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncActionData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncActionData) ProtoMessage() {}
+
+func (x *SyncActionData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[19]
+ 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 SyncActionData.ProtoReflect.Descriptor instead.
+func (*SyncActionData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *SyncActionData) GetIndex() []byte {
+ if x != nil {
+ return x.Index
+ }
+ return nil
+}
+
+func (x *SyncActionData) GetValue() *SyncActionValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *SyncActionData) GetPadding() []byte {
+ if x != nil {
+ return x.Padding
+ }
+ return nil
+}
+
+func (x *SyncActionData) GetVersion() int32 {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return 0
+}
+
+type StarAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Starred *bool `protobuf:"varint,1,opt,name=starred" json:"starred,omitempty"`
+}
+
+func (x *StarAction) Reset() {
+ *x = StarAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StarAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StarAction) ProtoMessage() {}
+
+func (x *StarAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[20]
+ 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 StarAction.ProtoReflect.Descriptor instead.
+func (*StarAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *StarAction) GetStarred() bool {
+ if x != nil && x.Starred != nil {
+ return *x.Starred
+ }
+ return false
+}
+
+type ContactAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FullName *string `protobuf:"bytes,1,opt,name=fullName" json:"fullName,omitempty"`
+ FirstName *string `protobuf:"bytes,2,opt,name=firstName" json:"firstName,omitempty"`
+}
+
+func (x *ContactAction) Reset() {
+ *x = ContactAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ContactAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContactAction) ProtoMessage() {}
+
+func (x *ContactAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[21]
+ 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 ContactAction.ProtoReflect.Descriptor instead.
+func (*ContactAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ContactAction) GetFullName() string {
+ if x != nil && x.FullName != nil {
+ return *x.FullName
+ }
+ return ""
+}
+
+func (x *ContactAction) GetFirstName() string {
+ if x != nil && x.FirstName != nil {
+ return *x.FirstName
+ }
+ return ""
+}
+
+type MuteAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Muted *bool `protobuf:"varint,1,opt,name=muted" json:"muted,omitempty"`
+ MuteEndTimestamp *int64 `protobuf:"varint,2,opt,name=muteEndTimestamp" json:"muteEndTimestamp,omitempty"`
+}
+
+func (x *MuteAction) Reset() {
+ *x = MuteAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MuteAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MuteAction) ProtoMessage() {}
+
+func (x *MuteAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[22]
+ 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 MuteAction.ProtoReflect.Descriptor instead.
+func (*MuteAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *MuteAction) GetMuted() bool {
+ if x != nil && x.Muted != nil {
+ return *x.Muted
+ }
+ return false
+}
+
+func (x *MuteAction) GetMuteEndTimestamp() int64 {
+ if x != nil && x.MuteEndTimestamp != nil {
+ return *x.MuteEndTimestamp
+ }
+ return 0
+}
+
+type PinAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Pinned *bool `protobuf:"varint,1,opt,name=pinned" json:"pinned,omitempty"`
+}
+
+func (x *PinAction) Reset() {
+ *x = PinAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PinAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PinAction) ProtoMessage() {}
+
+func (x *PinAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[23]
+ 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 PinAction.ProtoReflect.Descriptor instead.
+func (*PinAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *PinAction) GetPinned() bool {
+ if x != nil && x.Pinned != nil {
+ return *x.Pinned
+ }
+ return false
+}
+
+type SecurityNotificationSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ShowNotification *bool `protobuf:"varint,1,opt,name=showNotification" json:"showNotification,omitempty"`
+}
+
+func (x *SecurityNotificationSetting) Reset() {
+ *x = SecurityNotificationSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SecurityNotificationSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SecurityNotificationSetting) ProtoMessage() {}
+
+func (x *SecurityNotificationSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[24]
+ 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 SecurityNotificationSetting.ProtoReflect.Descriptor instead.
+func (*SecurityNotificationSetting) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *SecurityNotificationSetting) GetShowNotification() bool {
+ if x != nil && x.ShowNotification != nil {
+ return *x.ShowNotification
+ }
+ return false
+}
+
+type PushNameSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+}
+
+func (x *PushNameSetting) Reset() {
+ *x = PushNameSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PushNameSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PushNameSetting) ProtoMessage() {}
+
+func (x *PushNameSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[25]
+ 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 PushNameSetting.ProtoReflect.Descriptor instead.
+func (*PushNameSetting) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *PushNameSetting) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+type LocaleSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Locale *string `protobuf:"bytes,1,opt,name=locale" json:"locale,omitempty"`
+}
+
+func (x *LocaleSetting) Reset() {
+ *x = LocaleSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocaleSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocaleSetting) ProtoMessage() {}
+
+func (x *LocaleSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[26]
+ 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 LocaleSetting.ProtoReflect.Descriptor instead.
+func (*LocaleSetting) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *LocaleSetting) GetLocale() string {
+ if x != nil && x.Locale != nil {
+ return *x.Locale
+ }
+ return ""
+}
+
+type QuickReplyAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Shortcut *string `protobuf:"bytes,1,opt,name=shortcut" json:"shortcut,omitempty"`
+ Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
+ Keywords []string `protobuf:"bytes,3,rep,name=keywords" json:"keywords,omitempty"`
+ Count *int32 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
+ Deleted *bool `protobuf:"varint,5,opt,name=deleted" json:"deleted,omitempty"`
+}
+
+func (x *QuickReplyAction) Reset() {
+ *x = QuickReplyAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *QuickReplyAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QuickReplyAction) ProtoMessage() {}
+
+func (x *QuickReplyAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[27]
+ 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 QuickReplyAction.ProtoReflect.Descriptor instead.
+func (*QuickReplyAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *QuickReplyAction) GetShortcut() string {
+ if x != nil && x.Shortcut != nil {
+ return *x.Shortcut
+ }
+ return ""
+}
+
+func (x *QuickReplyAction) GetMessage() string {
+ if x != nil && x.Message != nil {
+ return *x.Message
+ }
+ return ""
+}
+
+func (x *QuickReplyAction) GetKeywords() []string {
+ if x != nil {
+ return x.Keywords
+ }
+ return nil
+}
+
+func (x *QuickReplyAction) GetCount() int32 {
+ if x != nil && x.Count != nil {
+ return *x.Count
+ }
+ return 0
+}
+
+func (x *QuickReplyAction) GetDeleted() bool {
+ if x != nil && x.Deleted != nil {
+ return *x.Deleted
+ }
+ return false
+}
+
+type LabelAssociationAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Labeled *bool `protobuf:"varint,1,opt,name=labeled" json:"labeled,omitempty"`
+}
+
+func (x *LabelAssociationAction) Reset() {
+ *x = LabelAssociationAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LabelAssociationAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LabelAssociationAction) ProtoMessage() {}
+
+func (x *LabelAssociationAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[28]
+ 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 LabelAssociationAction.ProtoReflect.Descriptor instead.
+func (*LabelAssociationAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *LabelAssociationAction) GetLabeled() bool {
+ if x != nil && x.Labeled != nil {
+ return *x.Labeled
+ }
+ return false
+}
+
+type LabelEditAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Color *int32 `protobuf:"varint,2,opt,name=color" json:"color,omitempty"`
+ PredefinedId *int32 `protobuf:"varint,3,opt,name=predefinedId" json:"predefinedId,omitempty"`
+ Deleted *bool `protobuf:"varint,4,opt,name=deleted" json:"deleted,omitempty"`
+}
+
+func (x *LabelEditAction) Reset() {
+ *x = LabelEditAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LabelEditAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LabelEditAction) ProtoMessage() {}
+
+func (x *LabelEditAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[29]
+ 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 LabelEditAction.ProtoReflect.Descriptor instead.
+func (*LabelEditAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *LabelEditAction) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *LabelEditAction) GetColor() int32 {
+ if x != nil && x.Color != nil {
+ return *x.Color
+ }
+ return 0
+}
+
+func (x *LabelEditAction) GetPredefinedId() int32 {
+ if x != nil && x.PredefinedId != nil {
+ return *x.PredefinedId
+ }
+ return 0
+}
+
+func (x *LabelEditAction) GetDeleted() bool {
+ if x != nil && x.Deleted != nil {
+ return *x.Deleted
+ }
+ return false
+}
+
+type RecentStickerWeightsAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Weights []*RecentStickerWeight `protobuf:"bytes,1,rep,name=weights" json:"weights,omitempty"`
+}
+
+func (x *RecentStickerWeightsAction) Reset() {
+ *x = RecentStickerWeightsAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecentStickerWeightsAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecentStickerWeightsAction) ProtoMessage() {}
+
+func (x *RecentStickerWeightsAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[30]
+ 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 RecentStickerWeightsAction.ProtoReflect.Descriptor instead.
+func (*RecentStickerWeightsAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *RecentStickerWeightsAction) GetWeights() []*RecentStickerWeight {
+ if x != nil {
+ return x.Weights
+ }
+ return nil
+}
+
+type RecentStickerMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DirectPath *string `protobuf:"bytes,1,opt,name=directPath" json:"directPath,omitempty"`
+ EncFilehash *string `protobuf:"bytes,2,opt,name=encFilehash" json:"encFilehash,omitempty"`
+ MediaKey *string `protobuf:"bytes,3,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ StanzaId *string `protobuf:"bytes,4,opt,name=stanzaId" json:"stanzaId,omitempty"`
+ ChatJid *string `protobuf:"bytes,5,opt,name=chatJid" json:"chatJid,omitempty"`
+ Participant *string `protobuf:"bytes,6,opt,name=participant" json:"participant,omitempty"`
+ IsSentByMe *bool `protobuf:"varint,7,opt,name=isSentByMe" json:"isSentByMe,omitempty"`
+}
+
+func (x *RecentStickerMetadata) Reset() {
+ *x = RecentStickerMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecentStickerMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecentStickerMetadata) ProtoMessage() {}
+
+func (x *RecentStickerMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[31]
+ 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 RecentStickerMetadata.ProtoReflect.Descriptor instead.
+func (*RecentStickerMetadata) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *RecentStickerMetadata) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *RecentStickerMetadata) GetEncFilehash() string {
+ if x != nil && x.EncFilehash != nil {
+ return *x.EncFilehash
+ }
+ return ""
+}
+
+func (x *RecentStickerMetadata) GetMediaKey() string {
+ if x != nil && x.MediaKey != nil {
+ return *x.MediaKey
+ }
+ return ""
+}
+
+func (x *RecentStickerMetadata) GetStanzaId() string {
+ if x != nil && x.StanzaId != nil {
+ return *x.StanzaId
+ }
+ return ""
+}
+
+func (x *RecentStickerMetadata) GetChatJid() string {
+ if x != nil && x.ChatJid != nil {
+ return *x.ChatJid
+ }
+ return ""
+}
+
+func (x *RecentStickerMetadata) GetParticipant() string {
+ if x != nil && x.Participant != nil {
+ return *x.Participant
+ }
+ return ""
+}
+
+func (x *RecentStickerMetadata) GetIsSentByMe() bool {
+ if x != nil && x.IsSentByMe != nil {
+ return *x.IsSentByMe
+ }
+ return false
+}
+
+type RecentEmojiWeightsAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Weights []*RecentEmojiWeight `protobuf:"bytes,1,rep,name=weights" json:"weights,omitempty"`
+}
+
+func (x *RecentEmojiWeightsAction) Reset() {
+ *x = RecentEmojiWeightsAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecentEmojiWeightsAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecentEmojiWeightsAction) ProtoMessage() {}
+
+func (x *RecentEmojiWeightsAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[32]
+ 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 RecentEmojiWeightsAction.ProtoReflect.Descriptor instead.
+func (*RecentEmojiWeightsAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *RecentEmojiWeightsAction) GetWeights() []*RecentEmojiWeight {
+ if x != nil {
+ return x.Weights
+ }
+ return nil
+}
+
+type FavoriteStickerAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DirectPath *string `protobuf:"bytes,1,opt,name=directPath" json:"directPath,omitempty"`
+ LastUploadTimestamp *string `protobuf:"bytes,2,opt,name=lastUploadTimestamp" json:"lastUploadTimestamp,omitempty"`
+ Handle *string `protobuf:"bytes,3,opt,name=handle" json:"handle,omitempty"`
+ EncFilehash *string `protobuf:"bytes,4,opt,name=encFilehash" json:"encFilehash,omitempty"`
+ StickerHashWithoutMeta *string `protobuf:"bytes,5,opt,name=stickerHashWithoutMeta" json:"stickerHashWithoutMeta,omitempty"`
+ MediaKey *string `protobuf:"bytes,6,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,7,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ IsFavorite *bool `protobuf:"varint,8,opt,name=isFavorite" json:"isFavorite,omitempty"`
+}
+
+func (x *FavoriteStickerAction) Reset() {
+ *x = FavoriteStickerAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FavoriteStickerAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FavoriteStickerAction) ProtoMessage() {}
+
+func (x *FavoriteStickerAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[33]
+ 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 FavoriteStickerAction.ProtoReflect.Descriptor instead.
+func (*FavoriteStickerAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *FavoriteStickerAction) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *FavoriteStickerAction) GetLastUploadTimestamp() string {
+ if x != nil && x.LastUploadTimestamp != nil {
+ return *x.LastUploadTimestamp
+ }
+ return ""
+}
+
+func (x *FavoriteStickerAction) GetHandle() string {
+ if x != nil && x.Handle != nil {
+ return *x.Handle
+ }
+ return ""
+}
+
+func (x *FavoriteStickerAction) GetEncFilehash() string {
+ if x != nil && x.EncFilehash != nil {
+ return *x.EncFilehash
+ }
+ return ""
+}
+
+func (x *FavoriteStickerAction) GetStickerHashWithoutMeta() string {
+ if x != nil && x.StickerHashWithoutMeta != nil {
+ return *x.StickerHashWithoutMeta
+ }
+ return ""
+}
+
+func (x *FavoriteStickerAction) GetMediaKey() string {
+ if x != nil && x.MediaKey != nil {
+ return *x.MediaKey
+ }
+ return ""
+}
+
+func (x *FavoriteStickerAction) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *FavoriteStickerAction) GetIsFavorite() bool {
+ if x != nil && x.IsFavorite != nil {
+ return *x.IsFavorite
+ }
+ return false
+}
+
+type ArchiveChatAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Archived *bool `protobuf:"varint,1,opt,name=archived" json:"archived,omitempty"`
+ MessageRange *SyncActionMessageRange `protobuf:"bytes,2,opt,name=messageRange" json:"messageRange,omitempty"`
+}
+
+func (x *ArchiveChatAction) Reset() {
+ *x = ArchiveChatAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArchiveChatAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArchiveChatAction) ProtoMessage() {}
+
+func (x *ArchiveChatAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[34]
+ 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 ArchiveChatAction.ProtoReflect.Descriptor instead.
+func (*ArchiveChatAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *ArchiveChatAction) GetArchived() bool {
+ if x != nil && x.Archived != nil {
+ return *x.Archived
+ }
+ return false
+}
+
+func (x *ArchiveChatAction) GetMessageRange() *SyncActionMessageRange {
+ if x != nil {
+ return x.MessageRange
+ }
+ return nil
+}
+
+type DeleteMessageForMeAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeleteMedia *bool `protobuf:"varint,1,opt,name=deleteMedia" json:"deleteMedia,omitempty"`
+ MessageTimestamp *int64 `protobuf:"varint,2,opt,name=messageTimestamp" json:"messageTimestamp,omitempty"`
+}
+
+func (x *DeleteMessageForMeAction) Reset() {
+ *x = DeleteMessageForMeAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteMessageForMeAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteMessageForMeAction) ProtoMessage() {}
+
+func (x *DeleteMessageForMeAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[35]
+ 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 DeleteMessageForMeAction.ProtoReflect.Descriptor instead.
+func (*DeleteMessageForMeAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *DeleteMessageForMeAction) GetDeleteMedia() bool {
+ if x != nil && x.DeleteMedia != nil {
+ return *x.DeleteMedia
+ }
+ return false
+}
+
+func (x *DeleteMessageForMeAction) GetMessageTimestamp() int64 {
+ if x != nil && x.MessageTimestamp != nil {
+ return *x.MessageTimestamp
+ }
+ return 0
+}
+
+type MarkChatAsReadAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Read *bool `protobuf:"varint,1,opt,name=read" json:"read,omitempty"`
+ MessageRange *SyncActionMessageRange `protobuf:"bytes,2,opt,name=messageRange" json:"messageRange,omitempty"`
+}
+
+func (x *MarkChatAsReadAction) Reset() {
+ *x = MarkChatAsReadAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MarkChatAsReadAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MarkChatAsReadAction) ProtoMessage() {}
+
+func (x *MarkChatAsReadAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[36]
+ 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 MarkChatAsReadAction.ProtoReflect.Descriptor instead.
+func (*MarkChatAsReadAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *MarkChatAsReadAction) GetRead() bool {
+ if x != nil && x.Read != nil {
+ return *x.Read
+ }
+ return false
+}
+
+func (x *MarkChatAsReadAction) GetMessageRange() *SyncActionMessageRange {
+ if x != nil {
+ return x.MessageRange
+ }
+ return nil
+}
+
+type ClearChatAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MessageRange *SyncActionMessageRange `protobuf:"bytes,1,opt,name=messageRange" json:"messageRange,omitempty"`
+}
+
+func (x *ClearChatAction) Reset() {
+ *x = ClearChatAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClearChatAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClearChatAction) ProtoMessage() {}
+
+func (x *ClearChatAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[37]
+ 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 ClearChatAction.ProtoReflect.Descriptor instead.
+func (*ClearChatAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *ClearChatAction) GetMessageRange() *SyncActionMessageRange {
+ if x != nil {
+ return x.MessageRange
+ }
+ return nil
+}
+
+type DeleteChatAction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MessageRange *SyncActionMessageRange `protobuf:"bytes,1,opt,name=messageRange" json:"messageRange,omitempty"`
+}
+
+func (x *DeleteChatAction) Reset() {
+ *x = DeleteChatAction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteChatAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteChatAction) ProtoMessage() {}
+
+func (x *DeleteChatAction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[38]
+ 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 DeleteChatAction.ProtoReflect.Descriptor instead.
+func (*DeleteChatAction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *DeleteChatAction) GetMessageRange() *SyncActionMessageRange {
+ if x != nil {
+ return x.MessageRange
+ }
+ return nil
+}
+
+type UnarchiveChatsSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UnarchiveChats *bool `protobuf:"varint,1,opt,name=unarchiveChats" json:"unarchiveChats,omitempty"`
+}
+
+func (x *UnarchiveChatsSetting) Reset() {
+ *x = UnarchiveChatsSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UnarchiveChatsSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnarchiveChatsSetting) ProtoMessage() {}
+
+func (x *UnarchiveChatsSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[39]
+ 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 UnarchiveChatsSetting.ProtoReflect.Descriptor instead.
+func (*UnarchiveChatsSetting) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *UnarchiveChatsSetting) GetUnarchiveChats() bool {
+ if x != nil && x.UnarchiveChats != nil {
+ return *x.UnarchiveChats
+ }
+ return false
+}
+
+type SyncActionMessageRange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LastMessageTimestamp *int64 `protobuf:"varint,1,opt,name=lastMessageTimestamp" json:"lastMessageTimestamp,omitempty"`
+ LastSystemMessageTimestamp *int64 `protobuf:"varint,2,opt,name=lastSystemMessageTimestamp" json:"lastSystemMessageTimestamp,omitempty"`
+ Messages []*SyncActionMessage `protobuf:"bytes,3,rep,name=messages" json:"messages,omitempty"`
+}
+
+func (x *SyncActionMessageRange) Reset() {
+ *x = SyncActionMessageRange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncActionMessageRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncActionMessageRange) ProtoMessage() {}
+
+func (x *SyncActionMessageRange) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[40]
+ 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 SyncActionMessageRange.ProtoReflect.Descriptor instead.
+func (*SyncActionMessageRange) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *SyncActionMessageRange) GetLastMessageTimestamp() int64 {
+ if x != nil && x.LastMessageTimestamp != nil {
+ return *x.LastMessageTimestamp
+ }
+ return 0
+}
+
+func (x *SyncActionMessageRange) GetLastSystemMessageTimestamp() int64 {
+ if x != nil && x.LastSystemMessageTimestamp != nil {
+ return *x.LastSystemMessageTimestamp
+ }
+ return 0
+}
+
+func (x *SyncActionMessageRange) GetMessages() []*SyncActionMessage {
+ if x != nil {
+ return x.Messages
+ }
+ return nil
+}
+
+type SyncActionMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+ Timestamp *int64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
+}
+
+func (x *SyncActionMessage) Reset() {
+ *x = SyncActionMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncActionMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncActionMessage) ProtoMessage() {}
+
+func (x *SyncActionMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[41]
+ 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 SyncActionMessage.ProtoReflect.Descriptor instead.
+func (*SyncActionMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *SyncActionMessage) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+func (x *SyncActionMessage) GetTimestamp() int64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+type KeyExpiration struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExpiredKeyEpoch *int32 `protobuf:"varint,1,opt,name=expiredKeyEpoch" json:"expiredKeyEpoch,omitempty"`
+}
+
+func (x *KeyExpiration) Reset() {
+ *x = KeyExpiration{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *KeyExpiration) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KeyExpiration) ProtoMessage() {}
+
+func (x *KeyExpiration) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[42]
+ 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 KeyExpiration.ProtoReflect.Descriptor instead.
+func (*KeyExpiration) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{42}
+}
+
+func (x *KeyExpiration) GetExpiredKeyEpoch() int32 {
+ if x != nil && x.ExpiredKeyEpoch != nil {
+ return *x.ExpiredKeyEpoch
+ }
+ return 0
+}
+
+type PrimaryFeature struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Flags []string `protobuf:"bytes,1,rep,name=flags" json:"flags,omitempty"`
+}
+
+func (x *PrimaryFeature) Reset() {
+ *x = PrimaryFeature{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PrimaryFeature) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PrimaryFeature) ProtoMessage() {}
+
+func (x *PrimaryFeature) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[43]
+ 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 PrimaryFeature.ProtoReflect.Descriptor instead.
+func (*PrimaryFeature) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *PrimaryFeature) GetFlags() []string {
+ if x != nil {
+ return x.Flags
+ }
+ return nil
+}
+
+type AndroidUnsupportedActions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Allowed *bool `protobuf:"varint,1,opt,name=allowed" json:"allowed,omitempty"`
+}
+
+func (x *AndroidUnsupportedActions) Reset() {
+ *x = AndroidUnsupportedActions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AndroidUnsupportedActions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AndroidUnsupportedActions) ProtoMessage() {}
+
+func (x *AndroidUnsupportedActions) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[44]
+ 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 AndroidUnsupportedActions.ProtoReflect.Descriptor instead.
+func (*AndroidUnsupportedActions) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{44}
+}
+
+func (x *AndroidUnsupportedActions) GetAllowed() bool {
+ if x != nil && x.Allowed != nil {
+ return *x.Allowed
+ }
+ return false
+}
+
+type SyncActionValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Timestamp *int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
+ StarAction *StarAction `protobuf:"bytes,2,opt,name=starAction" json:"starAction,omitempty"`
+ ContactAction *ContactAction `protobuf:"bytes,3,opt,name=contactAction" json:"contactAction,omitempty"`
+ MuteAction *MuteAction `protobuf:"bytes,4,opt,name=muteAction" json:"muteAction,omitempty"`
+ PinAction *PinAction `protobuf:"bytes,5,opt,name=pinAction" json:"pinAction,omitempty"`
+ SecurityNotificationSetting *SecurityNotificationSetting `protobuf:"bytes,6,opt,name=securityNotificationSetting" json:"securityNotificationSetting,omitempty"`
+ PushNameSetting *PushNameSetting `protobuf:"bytes,7,opt,name=pushNameSetting" json:"pushNameSetting,omitempty"`
+ QuickReplyAction *QuickReplyAction `protobuf:"bytes,8,opt,name=quickReplyAction" json:"quickReplyAction,omitempty"`
+ RecentStickerWeightsAction *RecentStickerWeightsAction `protobuf:"bytes,9,opt,name=recentStickerWeightsAction" json:"recentStickerWeightsAction,omitempty"`
+ RecentStickerMetadata *RecentStickerMetadata `protobuf:"bytes,10,opt,name=recentStickerMetadata" json:"recentStickerMetadata,omitempty"`
+ RecentEmojiWeightsAction *RecentEmojiWeightsAction `protobuf:"bytes,11,opt,name=recentEmojiWeightsAction" json:"recentEmojiWeightsAction,omitempty"`
+ LabelEditAction *LabelEditAction `protobuf:"bytes,14,opt,name=labelEditAction" json:"labelEditAction,omitempty"`
+ LabelAssociationAction *LabelAssociationAction `protobuf:"bytes,15,opt,name=labelAssociationAction" json:"labelAssociationAction,omitempty"`
+ LocaleSetting *LocaleSetting `protobuf:"bytes,16,opt,name=localeSetting" json:"localeSetting,omitempty"`
+ ArchiveChatAction *ArchiveChatAction `protobuf:"bytes,17,opt,name=archiveChatAction" json:"archiveChatAction,omitempty"`
+ DeleteMessageForMeAction *DeleteMessageForMeAction `protobuf:"bytes,18,opt,name=deleteMessageForMeAction" json:"deleteMessageForMeAction,omitempty"`
+ KeyExpiration *KeyExpiration `protobuf:"bytes,19,opt,name=keyExpiration" json:"keyExpiration,omitempty"`
+ MarkChatAsReadAction *MarkChatAsReadAction `protobuf:"bytes,20,opt,name=markChatAsReadAction" json:"markChatAsReadAction,omitempty"`
+ ClearChatAction *ClearChatAction `protobuf:"bytes,21,opt,name=clearChatAction" json:"clearChatAction,omitempty"`
+ DeleteChatAction *DeleteChatAction `protobuf:"bytes,22,opt,name=deleteChatAction" json:"deleteChatAction,omitempty"`
+ UnarchiveChatsSetting *UnarchiveChatsSetting `protobuf:"bytes,23,opt,name=unarchiveChatsSetting" json:"unarchiveChatsSetting,omitempty"`
+ PrimaryFeature *PrimaryFeature `protobuf:"bytes,24,opt,name=primaryFeature" json:"primaryFeature,omitempty"`
+ FavoriteStickerAction *FavoriteStickerAction `protobuf:"bytes,25,opt,name=favoriteStickerAction" json:"favoriteStickerAction,omitempty"`
+ AndroidUnsupportedActions *AndroidUnsupportedActions `protobuf:"bytes,26,opt,name=androidUnsupportedActions" json:"androidUnsupportedActions,omitempty"`
+}
+
+func (x *SyncActionValue) Reset() {
+ *x = SyncActionValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncActionValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncActionValue) ProtoMessage() {}
+
+func (x *SyncActionValue) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[45]
+ 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 SyncActionValue.ProtoReflect.Descriptor instead.
+func (*SyncActionValue) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{45}
+}
+
+func (x *SyncActionValue) GetTimestamp() int64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+func (x *SyncActionValue) GetStarAction() *StarAction {
+ if x != nil {
+ return x.StarAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetContactAction() *ContactAction {
+ if x != nil {
+ return x.ContactAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetMuteAction() *MuteAction {
+ if x != nil {
+ return x.MuteAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetPinAction() *PinAction {
+ if x != nil {
+ return x.PinAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetSecurityNotificationSetting() *SecurityNotificationSetting {
+ if x != nil {
+ return x.SecurityNotificationSetting
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetPushNameSetting() *PushNameSetting {
+ if x != nil {
+ return x.PushNameSetting
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetQuickReplyAction() *QuickReplyAction {
+ if x != nil {
+ return x.QuickReplyAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetRecentStickerWeightsAction() *RecentStickerWeightsAction {
+ if x != nil {
+ return x.RecentStickerWeightsAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetRecentStickerMetadata() *RecentStickerMetadata {
+ if x != nil {
+ return x.RecentStickerMetadata
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetRecentEmojiWeightsAction() *RecentEmojiWeightsAction {
+ if x != nil {
+ return x.RecentEmojiWeightsAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetLabelEditAction() *LabelEditAction {
+ if x != nil {
+ return x.LabelEditAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetLabelAssociationAction() *LabelAssociationAction {
+ if x != nil {
+ return x.LabelAssociationAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetLocaleSetting() *LocaleSetting {
+ if x != nil {
+ return x.LocaleSetting
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetArchiveChatAction() *ArchiveChatAction {
+ if x != nil {
+ return x.ArchiveChatAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetDeleteMessageForMeAction() *DeleteMessageForMeAction {
+ if x != nil {
+ return x.DeleteMessageForMeAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetKeyExpiration() *KeyExpiration {
+ if x != nil {
+ return x.KeyExpiration
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetMarkChatAsReadAction() *MarkChatAsReadAction {
+ if x != nil {
+ return x.MarkChatAsReadAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetClearChatAction() *ClearChatAction {
+ if x != nil {
+ return x.ClearChatAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetDeleteChatAction() *DeleteChatAction {
+ if x != nil {
+ return x.DeleteChatAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetUnarchiveChatsSetting() *UnarchiveChatsSetting {
+ if x != nil {
+ return x.UnarchiveChatsSetting
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetPrimaryFeature() *PrimaryFeature {
+ if x != nil {
+ return x.PrimaryFeature
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetFavoriteStickerAction() *FavoriteStickerAction {
+ if x != nil {
+ return x.FavoriteStickerAction
+ }
+ return nil
+}
+
+func (x *SyncActionValue) GetAndroidUnsupportedActions() *AndroidUnsupportedActions {
+ if x != nil {
+ return x.AndroidUnsupportedActions
+ }
+ return nil
+}
+
+type RecentEmojiWeight struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Emoji *string `protobuf:"bytes,1,opt,name=emoji" json:"emoji,omitempty"`
+ Weight *float32 `protobuf:"fixed32,2,opt,name=weight" json:"weight,omitempty"`
+}
+
+func (x *RecentEmojiWeight) Reset() {
+ *x = RecentEmojiWeight{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecentEmojiWeight) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecentEmojiWeight) ProtoMessage() {}
+
+func (x *RecentEmojiWeight) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[46]
+ 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 RecentEmojiWeight.ProtoReflect.Descriptor instead.
+func (*RecentEmojiWeight) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{46}
+}
+
+func (x *RecentEmojiWeight) GetEmoji() string {
+ if x != nil && x.Emoji != nil {
+ return *x.Emoji
+ }
+ return ""
+}
+
+func (x *RecentEmojiWeight) GetWeight() float32 {
+ if x != nil && x.Weight != nil {
+ return *x.Weight
+ }
+ return 0
+}
+
+type RecentStickerWeight struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Filehash *string `protobuf:"bytes,1,opt,name=filehash" json:"filehash,omitempty"`
+ Weight *float32 `protobuf:"fixed32,2,opt,name=weight" json:"weight,omitempty"`
+}
+
+func (x *RecentStickerWeight) Reset() {
+ *x = RecentStickerWeight{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecentStickerWeight) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecentStickerWeight) ProtoMessage() {}
+
+func (x *RecentStickerWeight) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[47]
+ 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 RecentStickerWeight.ProtoReflect.Descriptor instead.
+func (*RecentStickerWeight) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{47}
+}
+
+func (x *RecentStickerWeight) GetFilehash() string {
+ if x != nil && x.Filehash != nil {
+ return *x.Filehash
+ }
+ return ""
+}
+
+func (x *RecentStickerWeight) GetWeight() float32 {
+ if x != nil && x.Weight != nil {
+ return *x.Weight
+ }
+ return 0
+}
+
+type SyncdPatch struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Version *SyncdVersion `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
+ Mutations []*SyncdMutation `protobuf:"bytes,2,rep,name=mutations" json:"mutations,omitempty"`
+ ExternalMutations *ExternalBlobReference `protobuf:"bytes,3,opt,name=externalMutations" json:"externalMutations,omitempty"`
+ SnapshotMac []byte `protobuf:"bytes,4,opt,name=snapshotMac" json:"snapshotMac,omitempty"`
+ PatchMac []byte `protobuf:"bytes,5,opt,name=patchMac" json:"patchMac,omitempty"`
+ KeyId *KeyId `protobuf:"bytes,6,opt,name=keyId" json:"keyId,omitempty"`
+ ExitCode *ExitCode `protobuf:"bytes,7,opt,name=exitCode" json:"exitCode,omitempty"`
+ DeviceIndex *uint32 `protobuf:"varint,8,opt,name=deviceIndex" json:"deviceIndex,omitempty"`
+}
+
+func (x *SyncdPatch) Reset() {
+ *x = SyncdPatch{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdPatch) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdPatch) ProtoMessage() {}
+
+func (x *SyncdPatch) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[48]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdPatch.ProtoReflect.Descriptor instead.
+func (*SyncdPatch) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{48}
+}
+
+func (x *SyncdPatch) GetVersion() *SyncdVersion {
+ if x != nil {
+ return x.Version
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetMutations() []*SyncdMutation {
+ if x != nil {
+ return x.Mutations
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetExternalMutations() *ExternalBlobReference {
+ if x != nil {
+ return x.ExternalMutations
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetSnapshotMac() []byte {
+ if x != nil {
+ return x.SnapshotMac
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetPatchMac() []byte {
+ if x != nil {
+ return x.PatchMac
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetKeyId() *KeyId {
+ if x != nil {
+ return x.KeyId
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetExitCode() *ExitCode {
+ if x != nil {
+ return x.ExitCode
+ }
+ return nil
+}
+
+func (x *SyncdPatch) GetDeviceIndex() uint32 {
+ if x != nil && x.DeviceIndex != nil {
+ return *x.DeviceIndex
+ }
+ return 0
+}
+
+type SyncdMutation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Operation *SyncdMutation_SyncdMutationSyncdOperation `protobuf:"varint,1,opt,name=operation,enum=proto.SyncdMutation_SyncdMutationSyncdOperation" json:"operation,omitempty"`
+ Record *SyncdRecord `protobuf:"bytes,2,opt,name=record" json:"record,omitempty"`
+}
+
+func (x *SyncdMutation) Reset() {
+ *x = SyncdMutation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdMutation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdMutation) ProtoMessage() {}
+
+func (x *SyncdMutation) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[49]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdMutation.ProtoReflect.Descriptor instead.
+func (*SyncdMutation) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{49}
+}
+
+func (x *SyncdMutation) GetOperation() SyncdMutation_SyncdMutationSyncdOperation {
+ if x != nil && x.Operation != nil {
+ return *x.Operation
+ }
+ return SyncdMutation_SET
+}
+
+func (x *SyncdMutation) GetRecord() *SyncdRecord {
+ if x != nil {
+ return x.Record
+ }
+ return nil
+}
+
+type SyncdMutations struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Mutations []*SyncdMutation `protobuf:"bytes,1,rep,name=mutations" json:"mutations,omitempty"`
+}
+
+func (x *SyncdMutations) Reset() {
+ *x = SyncdMutations{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdMutations) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdMutations) ProtoMessage() {}
+
+func (x *SyncdMutations) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[50]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdMutations.ProtoReflect.Descriptor instead.
+func (*SyncdMutations) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{50}
+}
+
+func (x *SyncdMutations) GetMutations() []*SyncdMutation {
+ if x != nil {
+ return x.Mutations
+ }
+ return nil
+}
+
+type SyncdSnapshot struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Version *SyncdVersion `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
+ Records []*SyncdRecord `protobuf:"bytes,2,rep,name=records" json:"records,omitempty"`
+ Mac []byte `protobuf:"bytes,3,opt,name=mac" json:"mac,omitempty"`
+ KeyId *KeyId `protobuf:"bytes,4,opt,name=keyId" json:"keyId,omitempty"`
+}
+
+func (x *SyncdSnapshot) Reset() {
+ *x = SyncdSnapshot{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdSnapshot) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdSnapshot) ProtoMessage() {}
+
+func (x *SyncdSnapshot) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[51]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdSnapshot.ProtoReflect.Descriptor instead.
+func (*SyncdSnapshot) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{51}
+}
+
+func (x *SyncdSnapshot) GetVersion() *SyncdVersion {
+ if x != nil {
+ return x.Version
+ }
+ return nil
+}
+
+func (x *SyncdSnapshot) GetRecords() []*SyncdRecord {
+ if x != nil {
+ return x.Records
+ }
+ return nil
+}
+
+func (x *SyncdSnapshot) GetMac() []byte {
+ if x != nil {
+ return x.Mac
+ }
+ return nil
+}
+
+func (x *SyncdSnapshot) GetKeyId() *KeyId {
+ if x != nil {
+ return x.KeyId
+ }
+ return nil
+}
+
+type ExternalBlobReference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MediaKey []byte `protobuf:"bytes,1,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ DirectPath *string `protobuf:"bytes,2,opt,name=directPath" json:"directPath,omitempty"`
+ Handle *string `protobuf:"bytes,3,opt,name=handle" json:"handle,omitempty"`
+ FileSizeBytes *uint64 `protobuf:"varint,4,opt,name=fileSizeBytes" json:"fileSizeBytes,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,5,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,6,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+}
+
+func (x *ExternalBlobReference) Reset() {
+ *x = ExternalBlobReference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExternalBlobReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExternalBlobReference) ProtoMessage() {}
+
+func (x *ExternalBlobReference) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[52]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExternalBlobReference.ProtoReflect.Descriptor instead.
+func (*ExternalBlobReference) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{52}
+}
+
+func (x *ExternalBlobReference) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *ExternalBlobReference) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *ExternalBlobReference) GetHandle() string {
+ if x != nil && x.Handle != nil {
+ return *x.Handle
+ }
+ return ""
+}
+
+func (x *ExternalBlobReference) GetFileSizeBytes() uint64 {
+ if x != nil && x.FileSizeBytes != nil {
+ return *x.FileSizeBytes
+ }
+ return 0
+}
+
+func (x *ExternalBlobReference) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *ExternalBlobReference) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+type SyncdRecord struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *SyncdIndex `protobuf:"bytes,1,opt,name=index" json:"index,omitempty"`
+ Value *SyncdValue `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
+ KeyId *KeyId `protobuf:"bytes,3,opt,name=keyId" json:"keyId,omitempty"`
+}
+
+func (x *SyncdRecord) Reset() {
+ *x = SyncdRecord{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdRecord) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdRecord) ProtoMessage() {}
+
+func (x *SyncdRecord) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[53]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdRecord.ProtoReflect.Descriptor instead.
+func (*SyncdRecord) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{53}
+}
+
+func (x *SyncdRecord) GetIndex() *SyncdIndex {
+ if x != nil {
+ return x.Index
+ }
+ return nil
+}
+
+func (x *SyncdRecord) GetValue() *SyncdValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *SyncdRecord) GetKeyId() *KeyId {
+ if x != nil {
+ return x.KeyId
+ }
+ return nil
+}
+
+type KeyId struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
+}
+
+func (x *KeyId) Reset() {
+ *x = KeyId{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *KeyId) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KeyId) ProtoMessage() {}
+
+func (x *KeyId) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[54]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use KeyId.ProtoReflect.Descriptor instead.
+func (*KeyId) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{54}
+}
+
+func (x *KeyId) GetId() []byte {
+ if x != nil {
+ return x.Id
+ }
+ return nil
+}
+
+type SyncdValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Blob []byte `protobuf:"bytes,1,opt,name=blob" json:"blob,omitempty"`
+}
+
+func (x *SyncdValue) Reset() {
+ *x = SyncdValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[55]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdValue) ProtoMessage() {}
+
+func (x *SyncdValue) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[55]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdValue.ProtoReflect.Descriptor instead.
+func (*SyncdValue) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{55}
+}
+
+func (x *SyncdValue) GetBlob() []byte {
+ if x != nil {
+ return x.Blob
+ }
+ return nil
+}
+
+type SyncdIndex struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Blob []byte `protobuf:"bytes,1,opt,name=blob" json:"blob,omitempty"`
+}
+
+func (x *SyncdIndex) Reset() {
+ *x = SyncdIndex{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[56]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdIndex) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdIndex) ProtoMessage() {}
+
+func (x *SyncdIndex) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[56]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdIndex.ProtoReflect.Descriptor instead.
+func (*SyncdIndex) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{56}
+}
+
+func (x *SyncdIndex) GetBlob() []byte {
+ if x != nil {
+ return x.Blob
+ }
+ return nil
+}
+
+type ExitCode struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Code *uint64 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
+ Text *string `protobuf:"bytes,2,opt,name=text" json:"text,omitempty"`
+}
+
+func (x *ExitCode) Reset() {
+ *x = ExitCode{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[57]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExitCode) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExitCode) ProtoMessage() {}
+
+func (x *ExitCode) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[57]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExitCode.ProtoReflect.Descriptor instead.
+func (*ExitCode) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{57}
+}
+
+func (x *ExitCode) GetCode() uint64 {
+ if x != nil && x.Code != nil {
+ return *x.Code
+ }
+ return 0
+}
+
+func (x *ExitCode) GetText() string {
+ if x != nil && x.Text != nil {
+ return *x.Text
+ }
+ return ""
+}
+
+type SyncdVersion struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Version *uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
+}
+
+func (x *SyncdVersion) Reset() {
+ *x = SyncdVersion{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[58]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SyncdVersion) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncdVersion) ProtoMessage() {}
+
+func (x *SyncdVersion) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[58]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncdVersion.ProtoReflect.Descriptor instead.
+func (*SyncdVersion) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{58}
+}
+
+func (x *SyncdVersion) GetVersion() uint64 {
+ if x != nil && x.Version != nil {
+ return *x.Version
+ }
+ return 0
+}
+
+type ServerErrorReceipt struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ StanzaId *string `protobuf:"bytes,1,opt,name=stanzaId" json:"stanzaId,omitempty"`
+}
+
+func (x *ServerErrorReceipt) Reset() {
+ *x = ServerErrorReceipt{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[59]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ServerErrorReceipt) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerErrorReceipt) ProtoMessage() {}
+
+func (x *ServerErrorReceipt) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[59]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerErrorReceipt.ProtoReflect.Descriptor instead.
+func (*ServerErrorReceipt) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{59}
+}
+
+func (x *ServerErrorReceipt) GetStanzaId() string {
+ if x != nil && x.StanzaId != nil {
+ return *x.StanzaId
+ }
+ return ""
+}
+
+type MediaRetryNotification struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ StanzaId *string `protobuf:"bytes,1,opt,name=stanzaId" json:"stanzaId,omitempty"`
+ DirectPath *string `protobuf:"bytes,2,opt,name=directPath" json:"directPath,omitempty"`
+ Result *MediaRetryNotification_MediaRetryNotificationResultType `protobuf:"varint,3,opt,name=result,enum=proto.MediaRetryNotification_MediaRetryNotificationResultType" json:"result,omitempty"`
+}
+
+func (x *MediaRetryNotification) Reset() {
+ *x = MediaRetryNotification{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[60]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MediaRetryNotification) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MediaRetryNotification) ProtoMessage() {}
+
+func (x *MediaRetryNotification) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[60]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MediaRetryNotification.ProtoReflect.Descriptor instead.
+func (*MediaRetryNotification) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{60}
+}
+
+func (x *MediaRetryNotification) GetStanzaId() string {
+ if x != nil && x.StanzaId != nil {
+ return *x.StanzaId
+ }
+ return ""
+}
+
+func (x *MediaRetryNotification) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *MediaRetryNotification) GetResult() MediaRetryNotification_MediaRetryNotificationResultType {
+ if x != nil && x.Result != nil {
+ return *x.Result
+ }
+ return MediaRetryNotification_GENERAL_ERROR
+}
+
+type MsgOpaqueData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Body *string `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
+ Caption *string `protobuf:"bytes,3,opt,name=caption" json:"caption,omitempty"`
+ Lng *float64 `protobuf:"fixed64,5,opt,name=lng" json:"lng,omitempty"`
+ Lat *float64 `protobuf:"fixed64,7,opt,name=lat" json:"lat,omitempty"`
+ PaymentAmount1000 *int32 `protobuf:"varint,8,opt,name=paymentAmount1000" json:"paymentAmount1000,omitempty"`
+ PaymentNoteMsgBody *string `protobuf:"bytes,9,opt,name=paymentNoteMsgBody" json:"paymentNoteMsgBody,omitempty"`
+ CanonicalUrl *string `protobuf:"bytes,10,opt,name=canonicalUrl" json:"canonicalUrl,omitempty"`
+ MatchedText *string `protobuf:"bytes,11,opt,name=matchedText" json:"matchedText,omitempty"`
+ Title *string `protobuf:"bytes,12,opt,name=title" json:"title,omitempty"`
+ Description *string `protobuf:"bytes,13,opt,name=description" json:"description,omitempty"`
+ FutureproofBuffer []byte `protobuf:"bytes,14,opt,name=futureproofBuffer" json:"futureproofBuffer,omitempty"`
+ ClientUrl *string `protobuf:"bytes,15,opt,name=clientUrl" json:"clientUrl,omitempty"`
+ Loc *string `protobuf:"bytes,16,opt,name=loc" json:"loc,omitempty"`
+}
+
+func (x *MsgOpaqueData) Reset() {
+ *x = MsgOpaqueData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[61]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MsgOpaqueData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MsgOpaqueData) ProtoMessage() {}
+
+func (x *MsgOpaqueData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[61]
+ 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 MsgOpaqueData.ProtoReflect.Descriptor instead.
+func (*MsgOpaqueData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{61}
+}
+
+func (x *MsgOpaqueData) GetBody() string {
+ if x != nil && x.Body != nil {
+ return *x.Body
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetCaption() string {
+ if x != nil && x.Caption != nil {
+ return *x.Caption
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetLng() float64 {
+ if x != nil && x.Lng != nil {
+ return *x.Lng
+ }
+ return 0
+}
+
+func (x *MsgOpaqueData) GetLat() float64 {
+ if x != nil && x.Lat != nil {
+ return *x.Lat
+ }
+ return 0
+}
+
+func (x *MsgOpaqueData) GetPaymentAmount1000() int32 {
+ if x != nil && x.PaymentAmount1000 != nil {
+ return *x.PaymentAmount1000
+ }
+ return 0
+}
+
+func (x *MsgOpaqueData) GetPaymentNoteMsgBody() string {
+ if x != nil && x.PaymentNoteMsgBody != nil {
+ return *x.PaymentNoteMsgBody
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetCanonicalUrl() string {
+ if x != nil && x.CanonicalUrl != nil {
+ return *x.CanonicalUrl
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetMatchedText() string {
+ if x != nil && x.MatchedText != nil {
+ return *x.MatchedText
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetFutureproofBuffer() []byte {
+ if x != nil {
+ return x.FutureproofBuffer
+ }
+ return nil
+}
+
+func (x *MsgOpaqueData) GetClientUrl() string {
+ if x != nil && x.ClientUrl != nil {
+ return *x.ClientUrl
+ }
+ return ""
+}
+
+func (x *MsgOpaqueData) GetLoc() string {
+ if x != nil && x.Loc != nil {
+ return *x.Loc
+ }
+ return ""
+}
+
+type MsgRowOpaqueData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CurrentMsg *MsgOpaqueData `protobuf:"bytes,1,opt,name=currentMsg" json:"currentMsg,omitempty"`
+ QuotedMsg *MsgOpaqueData `protobuf:"bytes,2,opt,name=quotedMsg" json:"quotedMsg,omitempty"`
+}
+
+func (x *MsgRowOpaqueData) Reset() {
+ *x = MsgRowOpaqueData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[62]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MsgRowOpaqueData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MsgRowOpaqueData) ProtoMessage() {}
+
+func (x *MsgRowOpaqueData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[62]
+ 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 MsgRowOpaqueData.ProtoReflect.Descriptor instead.
+func (*MsgRowOpaqueData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{62}
+}
+
+func (x *MsgRowOpaqueData) GetCurrentMsg() *MsgOpaqueData {
+ if x != nil {
+ return x.CurrentMsg
+ }
+ return nil
+}
+
+func (x *MsgRowOpaqueData) GetQuotedMsg() *MsgOpaqueData {
+ if x != nil {
+ return x.QuotedMsg
+ }
+ return nil
+}
+
+type GlobalSettings struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LightThemeWallpaper *WallpaperSettings `protobuf:"bytes,1,opt,name=lightThemeWallpaper" json:"lightThemeWallpaper,omitempty"`
+ MediaVisibility *MediaVisibility `protobuf:"varint,2,opt,name=mediaVisibility,enum=proto.MediaVisibility" json:"mediaVisibility,omitempty"`
+ DarkThemeWallpaper *WallpaperSettings `protobuf:"bytes,3,opt,name=darkThemeWallpaper" json:"darkThemeWallpaper,omitempty"`
+}
+
+func (x *GlobalSettings) Reset() {
+ *x = GlobalSettings{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[63]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GlobalSettings) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GlobalSettings) ProtoMessage() {}
+
+func (x *GlobalSettings) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[63]
+ 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 GlobalSettings.ProtoReflect.Descriptor instead.
+func (*GlobalSettings) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{63}
+}
+
+func (x *GlobalSettings) GetLightThemeWallpaper() *WallpaperSettings {
+ if x != nil {
+ return x.LightThemeWallpaper
+ }
+ return nil
+}
+
+func (x *GlobalSettings) GetMediaVisibility() MediaVisibility {
+ if x != nil && x.MediaVisibility != nil {
+ return *x.MediaVisibility
+ }
+ return MediaVisibility_DEFAULT
+}
+
+func (x *GlobalSettings) GetDarkThemeWallpaper() *WallpaperSettings {
+ if x != nil {
+ return x.DarkThemeWallpaper
+ }
+ return nil
+}
+
+type WallpaperSettings struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Filename *string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
+ Opacity *uint32 `protobuf:"varint,2,opt,name=opacity" json:"opacity,omitempty"`
+}
+
+func (x *WallpaperSettings) Reset() {
+ *x = WallpaperSettings{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[64]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WallpaperSettings) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WallpaperSettings) ProtoMessage() {}
+
+func (x *WallpaperSettings) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[64]
+ 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 WallpaperSettings.ProtoReflect.Descriptor instead.
+func (*WallpaperSettings) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{64}
+}
+
+func (x *WallpaperSettings) GetFilename() string {
+ if x != nil && x.Filename != nil {
+ return *x.Filename
+ }
+ return ""
+}
+
+func (x *WallpaperSettings) GetOpacity() uint32 {
+ if x != nil && x.Opacity != nil {
+ return *x.Opacity
+ }
+ return 0
+}
+
+type GroupParticipant struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserJid *string `protobuf:"bytes,1,req,name=userJid" json:"userJid,omitempty"`
+ Rank *GroupParticipant_GroupParticipantRank `protobuf:"varint,2,opt,name=rank,enum=proto.GroupParticipant_GroupParticipantRank" json:"rank,omitempty"`
+}
+
+func (x *GroupParticipant) Reset() {
+ *x = GroupParticipant{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[65]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GroupParticipant) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GroupParticipant) ProtoMessage() {}
+
+func (x *GroupParticipant) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[65]
+ 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 GroupParticipant.ProtoReflect.Descriptor instead.
+func (*GroupParticipant) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{65}
+}
+
+func (x *GroupParticipant) GetUserJid() string {
+ if x != nil && x.UserJid != nil {
+ return *x.UserJid
+ }
+ return ""
+}
+
+func (x *GroupParticipant) GetRank() GroupParticipant_GroupParticipantRank {
+ if x != nil && x.Rank != nil {
+ return *x.Rank
+ }
+ return GroupParticipant_REGULAR
+}
+
+type Pushname struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
+ Pushname *string `protobuf:"bytes,2,opt,name=pushname" json:"pushname,omitempty"`
+}
+
+func (x *Pushname) Reset() {
+ *x = Pushname{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[66]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Pushname) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Pushname) ProtoMessage() {}
+
+func (x *Pushname) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[66]
+ 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 Pushname.ProtoReflect.Descriptor instead.
+func (*Pushname) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{66}
+}
+
+func (x *Pushname) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+func (x *Pushname) GetPushname() string {
+ if x != nil && x.Pushname != nil {
+ return *x.Pushname
+ }
+ return ""
+}
+
+type HistorySyncMsg struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Message *WebMessageInfo `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
+ MsgOrderId *uint64 `protobuf:"varint,2,opt,name=msgOrderId" json:"msgOrderId,omitempty"`
+}
+
+func (x *HistorySyncMsg) Reset() {
+ *x = HistorySyncMsg{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[67]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HistorySyncMsg) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HistorySyncMsg) ProtoMessage() {}
+
+func (x *HistorySyncMsg) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[67]
+ 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 HistorySyncMsg.ProtoReflect.Descriptor instead.
+func (*HistorySyncMsg) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{67}
+}
+
+func (x *HistorySyncMsg) GetMessage() *WebMessageInfo {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+func (x *HistorySyncMsg) GetMsgOrderId() uint64 {
+ if x != nil && x.MsgOrderId != nil {
+ return *x.MsgOrderId
+ }
+ return 0
+}
+
+type Conversation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *string `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
+ Messages []*HistorySyncMsg `protobuf:"bytes,2,rep,name=messages" json:"messages,omitempty"`
+ NewJid *string `protobuf:"bytes,3,opt,name=newJid" json:"newJid,omitempty"`
+ OldJid *string `protobuf:"bytes,4,opt,name=oldJid" json:"oldJid,omitempty"`
+ LastMsgTimestamp *uint64 `protobuf:"varint,5,opt,name=lastMsgTimestamp" json:"lastMsgTimestamp,omitempty"`
+ UnreadCount *uint32 `protobuf:"varint,6,opt,name=unreadCount" json:"unreadCount,omitempty"`
+ ReadOnly *bool `protobuf:"varint,7,opt,name=readOnly" json:"readOnly,omitempty"`
+ EndOfHistoryTransfer *bool `protobuf:"varint,8,opt,name=endOfHistoryTransfer" json:"endOfHistoryTransfer,omitempty"`
+ EphemeralExpiration *uint32 `protobuf:"varint,9,opt,name=ephemeralExpiration" json:"ephemeralExpiration,omitempty"`
+ EphemeralSettingTimestamp *int64 `protobuf:"varint,10,opt,name=ephemeralSettingTimestamp" json:"ephemeralSettingTimestamp,omitempty"`
+ EndOfHistoryTransferType *Conversation_ConversationEndOfHistoryTransferType `protobuf:"varint,11,opt,name=endOfHistoryTransferType,enum=proto.Conversation_ConversationEndOfHistoryTransferType" json:"endOfHistoryTransferType,omitempty"`
+ ConversationTimestamp *uint64 `protobuf:"varint,12,opt,name=conversationTimestamp" json:"conversationTimestamp,omitempty"`
+ Name *string `protobuf:"bytes,13,opt,name=name" json:"name,omitempty"`
+ PHash *string `protobuf:"bytes,14,opt,name=pHash" json:"pHash,omitempty"`
+ NotSpam *bool `protobuf:"varint,15,opt,name=notSpam" json:"notSpam,omitempty"`
+ Archived *bool `protobuf:"varint,16,opt,name=archived" json:"archived,omitempty"`
+ DisappearingMode *DisappearingMode `protobuf:"bytes,17,opt,name=disappearingMode" json:"disappearingMode,omitempty"`
+ UnreadMentionCount *uint32 `protobuf:"varint,18,opt,name=unreadMentionCount" json:"unreadMentionCount,omitempty"`
+ MarkedAsUnread *bool `protobuf:"varint,19,opt,name=markedAsUnread" json:"markedAsUnread,omitempty"`
+ Participant []*GroupParticipant `protobuf:"bytes,20,rep,name=participant" json:"participant,omitempty"`
+ TcToken []byte `protobuf:"bytes,21,opt,name=tcToken" json:"tcToken,omitempty"`
+ TcTokenTimestamp *uint64 `protobuf:"varint,22,opt,name=tcTokenTimestamp" json:"tcTokenTimestamp,omitempty"`
+ ContactPrimaryIdentityKey []byte `protobuf:"bytes,23,opt,name=contactPrimaryIdentityKey" json:"contactPrimaryIdentityKey,omitempty"`
+ Pinned *uint32 `protobuf:"varint,24,opt,name=pinned" json:"pinned,omitempty"`
+ MuteEndTime *uint64 `protobuf:"varint,25,opt,name=muteEndTime" json:"muteEndTime,omitempty"`
+ Wallpaper *WallpaperSettings `protobuf:"bytes,26,opt,name=wallpaper" json:"wallpaper,omitempty"`
+ MediaVisibility *MediaVisibility `protobuf:"varint,27,opt,name=mediaVisibility,enum=proto.MediaVisibility" json:"mediaVisibility,omitempty"`
+ TcTokenSenderTimestamp *uint64 `protobuf:"varint,28,opt,name=tcTokenSenderTimestamp" json:"tcTokenSenderTimestamp,omitempty"`
+ Suspended *bool `protobuf:"varint,29,opt,name=suspended" json:"suspended,omitempty"`
+}
+
+func (x *Conversation) Reset() {
+ *x = Conversation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[68]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Conversation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Conversation) ProtoMessage() {}
+
+func (x *Conversation) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[68]
+ 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 Conversation.ProtoReflect.Descriptor instead.
+func (*Conversation) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{68}
+}
+
+func (x *Conversation) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+func (x *Conversation) GetMessages() []*HistorySyncMsg {
+ if x != nil {
+ return x.Messages
+ }
+ return nil
+}
+
+func (x *Conversation) GetNewJid() string {
+ if x != nil && x.NewJid != nil {
+ return *x.NewJid
+ }
+ return ""
+}
+
+func (x *Conversation) GetOldJid() string {
+ if x != nil && x.OldJid != nil {
+ return *x.OldJid
+ }
+ return ""
+}
+
+func (x *Conversation) GetLastMsgTimestamp() uint64 {
+ if x != nil && x.LastMsgTimestamp != nil {
+ return *x.LastMsgTimestamp
+ }
+ return 0
+}
+
+func (x *Conversation) GetUnreadCount() uint32 {
+ if x != nil && x.UnreadCount != nil {
+ return *x.UnreadCount
+ }
+ return 0
+}
+
+func (x *Conversation) GetReadOnly() bool {
+ if x != nil && x.ReadOnly != nil {
+ return *x.ReadOnly
+ }
+ return false
+}
+
+func (x *Conversation) GetEndOfHistoryTransfer() bool {
+ if x != nil && x.EndOfHistoryTransfer != nil {
+ return *x.EndOfHistoryTransfer
+ }
+ return false
+}
+
+func (x *Conversation) GetEphemeralExpiration() uint32 {
+ if x != nil && x.EphemeralExpiration != nil {
+ return *x.EphemeralExpiration
+ }
+ return 0
+}
+
+func (x *Conversation) GetEphemeralSettingTimestamp() int64 {
+ if x != nil && x.EphemeralSettingTimestamp != nil {
+ return *x.EphemeralSettingTimestamp
+ }
+ return 0
+}
+
+func (x *Conversation) GetEndOfHistoryTransferType() Conversation_ConversationEndOfHistoryTransferType {
+ if x != nil && x.EndOfHistoryTransferType != nil {
+ return *x.EndOfHistoryTransferType
+ }
+ return Conversation_COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY
+}
+
+func (x *Conversation) GetConversationTimestamp() uint64 {
+ if x != nil && x.ConversationTimestamp != nil {
+ return *x.ConversationTimestamp
+ }
+ return 0
+}
+
+func (x *Conversation) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *Conversation) GetPHash() string {
+ if x != nil && x.PHash != nil {
+ return *x.PHash
+ }
+ return ""
+}
+
+func (x *Conversation) GetNotSpam() bool {
+ if x != nil && x.NotSpam != nil {
+ return *x.NotSpam
+ }
+ return false
+}
+
+func (x *Conversation) GetArchived() bool {
+ if x != nil && x.Archived != nil {
+ return *x.Archived
+ }
+ return false
+}
+
+func (x *Conversation) GetDisappearingMode() *DisappearingMode {
+ if x != nil {
+ return x.DisappearingMode
+ }
+ return nil
+}
+
+func (x *Conversation) GetUnreadMentionCount() uint32 {
+ if x != nil && x.UnreadMentionCount != nil {
+ return *x.UnreadMentionCount
+ }
+ return 0
+}
+
+func (x *Conversation) GetMarkedAsUnread() bool {
+ if x != nil && x.MarkedAsUnread != nil {
+ return *x.MarkedAsUnread
+ }
+ return false
+}
+
+func (x *Conversation) GetParticipant() []*GroupParticipant {
+ if x != nil {
+ return x.Participant
+ }
+ return nil
+}
+
+func (x *Conversation) GetTcToken() []byte {
+ if x != nil {
+ return x.TcToken
+ }
+ return nil
+}
+
+func (x *Conversation) GetTcTokenTimestamp() uint64 {
+ if x != nil && x.TcTokenTimestamp != nil {
+ return *x.TcTokenTimestamp
+ }
+ return 0
+}
+
+func (x *Conversation) GetContactPrimaryIdentityKey() []byte {
+ if x != nil {
+ return x.ContactPrimaryIdentityKey
+ }
+ return nil
+}
+
+func (x *Conversation) GetPinned() uint32 {
+ if x != nil && x.Pinned != nil {
+ return *x.Pinned
+ }
+ return 0
+}
+
+func (x *Conversation) GetMuteEndTime() uint64 {
+ if x != nil && x.MuteEndTime != nil {
+ return *x.MuteEndTime
+ }
+ return 0
+}
+
+func (x *Conversation) GetWallpaper() *WallpaperSettings {
+ if x != nil {
+ return x.Wallpaper
+ }
+ return nil
+}
+
+func (x *Conversation) GetMediaVisibility() MediaVisibility {
+ if x != nil && x.MediaVisibility != nil {
+ return *x.MediaVisibility
+ }
+ return MediaVisibility_DEFAULT
+}
+
+func (x *Conversation) GetTcTokenSenderTimestamp() uint64 {
+ if x != nil && x.TcTokenSenderTimestamp != nil {
+ return *x.TcTokenSenderTimestamp
+ }
+ return 0
+}
+
+func (x *Conversation) GetSuspended() bool {
+ if x != nil && x.Suspended != nil {
+ return *x.Suspended
+ }
+ return false
+}
+
+type HistorySync struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SyncType *HistorySync_HistorySyncHistorySyncType `protobuf:"varint,1,req,name=syncType,enum=proto.HistorySync_HistorySyncHistorySyncType" json:"syncType,omitempty"`
+ Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations" json:"conversations,omitempty"`
+ StatusV3Messages []*WebMessageInfo `protobuf:"bytes,3,rep,name=statusV3Messages" json:"statusV3Messages,omitempty"`
+ ChunkOrder *uint32 `protobuf:"varint,5,opt,name=chunkOrder" json:"chunkOrder,omitempty"`
+ Progress *uint32 `protobuf:"varint,6,opt,name=progress" json:"progress,omitempty"`
+ Pushnames []*Pushname `protobuf:"bytes,7,rep,name=pushnames" json:"pushnames,omitempty"`
+ GlobalSettings *GlobalSettings `protobuf:"bytes,8,opt,name=globalSettings" json:"globalSettings,omitempty"`
+ ThreadIdUserSecret []byte `protobuf:"bytes,9,opt,name=threadIdUserSecret" json:"threadIdUserSecret,omitempty"`
+ ThreadDsTimeframeOffset *uint32 `protobuf:"varint,10,opt,name=threadDsTimeframeOffset" json:"threadDsTimeframeOffset,omitempty"`
+}
+
+func (x *HistorySync) Reset() {
+ *x = HistorySync{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[69]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HistorySync) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HistorySync) ProtoMessage() {}
+
+func (x *HistorySync) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[69]
+ 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 HistorySync.ProtoReflect.Descriptor instead.
+func (*HistorySync) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{69}
+}
+
+func (x *HistorySync) GetSyncType() HistorySync_HistorySyncHistorySyncType {
+ if x != nil && x.SyncType != nil {
+ return *x.SyncType
+ }
+ return HistorySync_INITIAL_BOOTSTRAP
+}
+
+func (x *HistorySync) GetConversations() []*Conversation {
+ if x != nil {
+ return x.Conversations
+ }
+ return nil
+}
+
+func (x *HistorySync) GetStatusV3Messages() []*WebMessageInfo {
+ if x != nil {
+ return x.StatusV3Messages
+ }
+ return nil
+}
+
+func (x *HistorySync) GetChunkOrder() uint32 {
+ if x != nil && x.ChunkOrder != nil {
+ return *x.ChunkOrder
+ }
+ return 0
+}
+
+func (x *HistorySync) GetProgress() uint32 {
+ if x != nil && x.Progress != nil {
+ return *x.Progress
+ }
+ return 0
+}
+
+func (x *HistorySync) GetPushnames() []*Pushname {
+ if x != nil {
+ return x.Pushnames
+ }
+ return nil
+}
+
+func (x *HistorySync) GetGlobalSettings() *GlobalSettings {
+ if x != nil {
+ return x.GlobalSettings
+ }
+ return nil
+}
+
+func (x *HistorySync) GetThreadIdUserSecret() []byte {
+ if x != nil {
+ return x.ThreadIdUserSecret
+ }
+ return nil
+}
+
+func (x *HistorySync) GetThreadDsTimeframeOffset() uint32 {
+ if x != nil && x.ThreadDsTimeframeOffset != nil {
+ return *x.ThreadDsTimeframeOffset
+ }
+ return 0
+}
+
+type EphemeralSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Duration *int32 `protobuf:"fixed32,1,opt,name=duration" json:"duration,omitempty"`
+ Timestamp *int64 `protobuf:"fixed64,2,opt,name=timestamp" json:"timestamp,omitempty"`
+}
+
+func (x *EphemeralSetting) Reset() {
+ *x = EphemeralSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[70]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *EphemeralSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EphemeralSetting) ProtoMessage() {}
+
+func (x *EphemeralSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[70]
+ 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 EphemeralSetting.ProtoReflect.Descriptor instead.
+func (*EphemeralSetting) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{70}
+}
+
+func (x *EphemeralSetting) GetDuration() int32 {
+ if x != nil && x.Duration != nil {
+ return *x.Duration
+ }
+ return 0
+}
+
+func (x *EphemeralSetting) GetTimestamp() int64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+type InteractiveAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PolygonVertices []*Point `protobuf:"bytes,1,rep,name=polygonVertices" json:"polygonVertices,omitempty"`
+ // Types that are assignable to Action:
+ // *InteractiveAnnotation_Location
+ Action isInteractiveAnnotation_Action `protobuf_oneof:"action"`
+}
+
+func (x *InteractiveAnnotation) Reset() {
+ *x = InteractiveAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[71]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InteractiveAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InteractiveAnnotation) ProtoMessage() {}
+
+func (x *InteractiveAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[71]
+ 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 InteractiveAnnotation.ProtoReflect.Descriptor instead.
+func (*InteractiveAnnotation) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{71}
+}
+
+func (x *InteractiveAnnotation) GetPolygonVertices() []*Point {
+ if x != nil {
+ return x.PolygonVertices
+ }
+ return nil
+}
+
+func (m *InteractiveAnnotation) GetAction() isInteractiveAnnotation_Action {
+ if m != nil {
+ return m.Action
+ }
+ return nil
+}
+
+func (x *InteractiveAnnotation) GetLocation() *Location {
+ if x, ok := x.GetAction().(*InteractiveAnnotation_Location); ok {
+ return x.Location
+ }
+ return nil
+}
+
+type isInteractiveAnnotation_Action interface {
+ isInteractiveAnnotation_Action()
+}
+
+type InteractiveAnnotation_Location struct {
+ Location *Location `protobuf:"bytes,2,opt,name=location,oneof"`
+}
+
+func (*InteractiveAnnotation_Location) isInteractiveAnnotation_Action() {}
+
+type DeviceListMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SenderKeyHash []byte `protobuf:"bytes,1,opt,name=senderKeyHash" json:"senderKeyHash,omitempty"`
+ SenderTimestamp *uint64 `protobuf:"varint,2,opt,name=senderTimestamp" json:"senderTimestamp,omitempty"`
+ SenderKeyIndexes []uint32 `protobuf:"varint,3,rep,packed,name=senderKeyIndexes" json:"senderKeyIndexes,omitempty"`
+ RecipientKeyHash []byte `protobuf:"bytes,8,opt,name=recipientKeyHash" json:"recipientKeyHash,omitempty"`
+ RecipientTimestamp *uint64 `protobuf:"varint,9,opt,name=recipientTimestamp" json:"recipientTimestamp,omitempty"`
+ RecipientKeyIndexes []uint32 `protobuf:"varint,10,rep,packed,name=recipientKeyIndexes" json:"recipientKeyIndexes,omitempty"`
+}
+
+func (x *DeviceListMetadata) Reset() {
+ *x = DeviceListMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[72]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceListMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceListMetadata) ProtoMessage() {}
+
+func (x *DeviceListMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[72]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceListMetadata.ProtoReflect.Descriptor instead.
+func (*DeviceListMetadata) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{72}
+}
+
+func (x *DeviceListMetadata) GetSenderKeyHash() []byte {
+ if x != nil {
+ return x.SenderKeyHash
+ }
+ return nil
+}
+
+func (x *DeviceListMetadata) GetSenderTimestamp() uint64 {
+ if x != nil && x.SenderTimestamp != nil {
+ return *x.SenderTimestamp
+ }
+ return 0
+}
+
+func (x *DeviceListMetadata) GetSenderKeyIndexes() []uint32 {
+ if x != nil {
+ return x.SenderKeyIndexes
+ }
+ return nil
+}
+
+func (x *DeviceListMetadata) GetRecipientKeyHash() []byte {
+ if x != nil {
+ return x.RecipientKeyHash
+ }
+ return nil
+}
+
+func (x *DeviceListMetadata) GetRecipientTimestamp() uint64 {
+ if x != nil && x.RecipientTimestamp != nil {
+ return *x.RecipientTimestamp
+ }
+ return 0
+}
+
+func (x *DeviceListMetadata) GetRecipientKeyIndexes() []uint32 {
+ if x != nil {
+ return x.RecipientKeyIndexes
+ }
+ return nil
+}
+
+type MessageContextInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceListMetadata *DeviceListMetadata `protobuf:"bytes,1,opt,name=deviceListMetadata" json:"deviceListMetadata,omitempty"`
+ DeviceListMetadataVersion *int32 `protobuf:"varint,2,opt,name=deviceListMetadataVersion" json:"deviceListMetadataVersion,omitempty"`
+}
+
+func (x *MessageContextInfo) Reset() {
+ *x = MessageContextInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[73]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MessageContextInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageContextInfo) ProtoMessage() {}
+
+func (x *MessageContextInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[73]
+ 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 MessageContextInfo.ProtoReflect.Descriptor instead.
+func (*MessageContextInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{73}
+}
+
+func (x *MessageContextInfo) GetDeviceListMetadata() *DeviceListMetadata {
+ if x != nil {
+ return x.DeviceListMetadata
+ }
+ return nil
+}
+
+func (x *MessageContextInfo) GetDeviceListMetadataVersion() int32 {
+ if x != nil && x.DeviceListMetadataVersion != nil {
+ return *x.DeviceListMetadataVersion
+ }
+ return 0
+}
+
+type AdReplyInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ AdvertiserName *string `protobuf:"bytes,1,opt,name=advertiserName" json:"advertiserName,omitempty"`
+ MediaType *AdReplyInfo_AdReplyInfoMediaType `protobuf:"varint,2,opt,name=mediaType,enum=proto.AdReplyInfo_AdReplyInfoMediaType" json:"mediaType,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ Caption *string `protobuf:"bytes,17,opt,name=caption" json:"caption,omitempty"`
+}
+
+func (x *AdReplyInfo) Reset() {
+ *x = AdReplyInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[74]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AdReplyInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AdReplyInfo) ProtoMessage() {}
+
+func (x *AdReplyInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[74]
+ 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 AdReplyInfo.ProtoReflect.Descriptor instead.
+func (*AdReplyInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{74}
+}
+
+func (x *AdReplyInfo) GetAdvertiserName() string {
+ if x != nil && x.AdvertiserName != nil {
+ return *x.AdvertiserName
+ }
+ return ""
+}
+
+func (x *AdReplyInfo) GetMediaType() AdReplyInfo_AdReplyInfoMediaType {
+ if x != nil && x.MediaType != nil {
+ return *x.MediaType
+ }
+ return AdReplyInfo_NONE
+}
+
+func (x *AdReplyInfo) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *AdReplyInfo) GetCaption() string {
+ if x != nil && x.Caption != nil {
+ return *x.Caption
+ }
+ return ""
+}
+
+type ExternalAdReplyInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ Body *string `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"`
+ MediaType *ExternalAdReplyInfo_ExternalAdReplyInfoMediaType `protobuf:"varint,3,opt,name=mediaType,enum=proto.ExternalAdReplyInfo_ExternalAdReplyInfoMediaType" json:"mediaType,omitempty"`
+ ThumbnailUrl *string `protobuf:"bytes,4,opt,name=thumbnailUrl" json:"thumbnailUrl,omitempty"`
+ MediaUrl *string `protobuf:"bytes,5,opt,name=mediaUrl" json:"mediaUrl,omitempty"`
+ Thumbnail []byte `protobuf:"bytes,6,opt,name=thumbnail" json:"thumbnail,omitempty"`
+ SourceType *string `protobuf:"bytes,7,opt,name=sourceType" json:"sourceType,omitempty"`
+ SourceId *string `protobuf:"bytes,8,opt,name=sourceId" json:"sourceId,omitempty"`
+ SourceUrl *string `protobuf:"bytes,9,opt,name=sourceUrl" json:"sourceUrl,omitempty"`
+ ContainsAutoReply *bool `protobuf:"varint,10,opt,name=containsAutoReply" json:"containsAutoReply,omitempty"`
+}
+
+func (x *ExternalAdReplyInfo) Reset() {
+ *x = ExternalAdReplyInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[75]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExternalAdReplyInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExternalAdReplyInfo) ProtoMessage() {}
+
+func (x *ExternalAdReplyInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[75]
+ 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 ExternalAdReplyInfo.ProtoReflect.Descriptor instead.
+func (*ExternalAdReplyInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{75}
+}
+
+func (x *ExternalAdReplyInfo) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetBody() string {
+ if x != nil && x.Body != nil {
+ return *x.Body
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetMediaType() ExternalAdReplyInfo_ExternalAdReplyInfoMediaType {
+ if x != nil && x.MediaType != nil {
+ return *x.MediaType
+ }
+ return ExternalAdReplyInfo_NONE
+}
+
+func (x *ExternalAdReplyInfo) GetThumbnailUrl() string {
+ if x != nil && x.ThumbnailUrl != nil {
+ return *x.ThumbnailUrl
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetMediaUrl() string {
+ if x != nil && x.MediaUrl != nil {
+ return *x.MediaUrl
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetThumbnail() []byte {
+ if x != nil {
+ return x.Thumbnail
+ }
+ return nil
+}
+
+func (x *ExternalAdReplyInfo) GetSourceType() string {
+ if x != nil && x.SourceType != nil {
+ return *x.SourceType
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetSourceId() string {
+ if x != nil && x.SourceId != nil {
+ return *x.SourceId
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetSourceUrl() string {
+ if x != nil && x.SourceUrl != nil {
+ return *x.SourceUrl
+ }
+ return ""
+}
+
+func (x *ExternalAdReplyInfo) GetContainsAutoReply() bool {
+ if x != nil && x.ContainsAutoReply != nil {
+ return *x.ContainsAutoReply
+ }
+ return false
+}
+
+type ContextInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ StanzaId *string `protobuf:"bytes,1,opt,name=stanzaId" json:"stanzaId,omitempty"`
+ Participant *string `protobuf:"bytes,2,opt,name=participant" json:"participant,omitempty"`
+ QuotedMessage *Message `protobuf:"bytes,3,opt,name=quotedMessage" json:"quotedMessage,omitempty"`
+ RemoteJid *string `protobuf:"bytes,4,opt,name=remoteJid" json:"remoteJid,omitempty"`
+ MentionedJid []string `protobuf:"bytes,15,rep,name=mentionedJid" json:"mentionedJid,omitempty"`
+ ConversionSource *string `protobuf:"bytes,18,opt,name=conversionSource" json:"conversionSource,omitempty"`
+ ConversionData []byte `protobuf:"bytes,19,opt,name=conversionData" json:"conversionData,omitempty"`
+ ConversionDelaySeconds *uint32 `protobuf:"varint,20,opt,name=conversionDelaySeconds" json:"conversionDelaySeconds,omitempty"`
+ ForwardingScore *uint32 `protobuf:"varint,21,opt,name=forwardingScore" json:"forwardingScore,omitempty"`
+ IsForwarded *bool `protobuf:"varint,22,opt,name=isForwarded" json:"isForwarded,omitempty"`
+ QuotedAd *AdReplyInfo `protobuf:"bytes,23,opt,name=quotedAd" json:"quotedAd,omitempty"`
+ PlaceholderKey *MessageKey `protobuf:"bytes,24,opt,name=placeholderKey" json:"placeholderKey,omitempty"`
+ Expiration *uint32 `protobuf:"varint,25,opt,name=expiration" json:"expiration,omitempty"`
+ EphemeralSettingTimestamp *int64 `protobuf:"varint,26,opt,name=ephemeralSettingTimestamp" json:"ephemeralSettingTimestamp,omitempty"`
+ EphemeralSharedSecret []byte `protobuf:"bytes,27,opt,name=ephemeralSharedSecret" json:"ephemeralSharedSecret,omitempty"`
+ ExternalAdReply *ExternalAdReplyInfo `protobuf:"bytes,28,opt,name=externalAdReply" json:"externalAdReply,omitempty"`
+ EntryPointConversionSource *string `protobuf:"bytes,29,opt,name=entryPointConversionSource" json:"entryPointConversionSource,omitempty"`
+ EntryPointConversionApp *string `protobuf:"bytes,30,opt,name=entryPointConversionApp" json:"entryPointConversionApp,omitempty"`
+ EntryPointConversionDelaySeconds *uint32 `protobuf:"varint,31,opt,name=entryPointConversionDelaySeconds" json:"entryPointConversionDelaySeconds,omitempty"`
+ DisappearingMode *DisappearingMode `protobuf:"bytes,32,opt,name=disappearingMode" json:"disappearingMode,omitempty"`
+ ActionLink *ActionLink `protobuf:"bytes,33,opt,name=actionLink" json:"actionLink,omitempty"`
+ GroupSubject *string `protobuf:"bytes,34,opt,name=groupSubject" json:"groupSubject,omitempty"`
+ ParentGroupJid *string `protobuf:"bytes,35,opt,name=parentGroupJid" json:"parentGroupJid,omitempty"`
+}
+
+func (x *ContextInfo) Reset() {
+ *x = ContextInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[76]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ContextInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContextInfo) ProtoMessage() {}
+
+func (x *ContextInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[76]
+ 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 ContextInfo.ProtoReflect.Descriptor instead.
+func (*ContextInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{76}
+}
+
+func (x *ContextInfo) GetStanzaId() string {
+ if x != nil && x.StanzaId != nil {
+ return *x.StanzaId
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetParticipant() string {
+ if x != nil && x.Participant != nil {
+ return *x.Participant
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetQuotedMessage() *Message {
+ if x != nil {
+ return x.QuotedMessage
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetRemoteJid() string {
+ if x != nil && x.RemoteJid != nil {
+ return *x.RemoteJid
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetMentionedJid() []string {
+ if x != nil {
+ return x.MentionedJid
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetConversionSource() string {
+ if x != nil && x.ConversionSource != nil {
+ return *x.ConversionSource
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetConversionData() []byte {
+ if x != nil {
+ return x.ConversionData
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetConversionDelaySeconds() uint32 {
+ if x != nil && x.ConversionDelaySeconds != nil {
+ return *x.ConversionDelaySeconds
+ }
+ return 0
+}
+
+func (x *ContextInfo) GetForwardingScore() uint32 {
+ if x != nil && x.ForwardingScore != nil {
+ return *x.ForwardingScore
+ }
+ return 0
+}
+
+func (x *ContextInfo) GetIsForwarded() bool {
+ if x != nil && x.IsForwarded != nil {
+ return *x.IsForwarded
+ }
+ return false
+}
+
+func (x *ContextInfo) GetQuotedAd() *AdReplyInfo {
+ if x != nil {
+ return x.QuotedAd
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetPlaceholderKey() *MessageKey {
+ if x != nil {
+ return x.PlaceholderKey
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetExpiration() uint32 {
+ if x != nil && x.Expiration != nil {
+ return *x.Expiration
+ }
+ return 0
+}
+
+func (x *ContextInfo) GetEphemeralSettingTimestamp() int64 {
+ if x != nil && x.EphemeralSettingTimestamp != nil {
+ return *x.EphemeralSettingTimestamp
+ }
+ return 0
+}
+
+func (x *ContextInfo) GetEphemeralSharedSecret() []byte {
+ if x != nil {
+ return x.EphemeralSharedSecret
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetExternalAdReply() *ExternalAdReplyInfo {
+ if x != nil {
+ return x.ExternalAdReply
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetEntryPointConversionSource() string {
+ if x != nil && x.EntryPointConversionSource != nil {
+ return *x.EntryPointConversionSource
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetEntryPointConversionApp() string {
+ if x != nil && x.EntryPointConversionApp != nil {
+ return *x.EntryPointConversionApp
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetEntryPointConversionDelaySeconds() uint32 {
+ if x != nil && x.EntryPointConversionDelaySeconds != nil {
+ return *x.EntryPointConversionDelaySeconds
+ }
+ return 0
+}
+
+func (x *ContextInfo) GetDisappearingMode() *DisappearingMode {
+ if x != nil {
+ return x.DisappearingMode
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetActionLink() *ActionLink {
+ if x != nil {
+ return x.ActionLink
+ }
+ return nil
+}
+
+func (x *ContextInfo) GetGroupSubject() string {
+ if x != nil && x.GroupSubject != nil {
+ return *x.GroupSubject
+ }
+ return ""
+}
+
+func (x *ContextInfo) GetParentGroupJid() string {
+ if x != nil && x.ParentGroupJid != nil {
+ return *x.ParentGroupJid
+ }
+ return ""
+}
+
+type SenderKeyDistributionMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ GroupId *string `protobuf:"bytes,1,opt,name=groupId" json:"groupId,omitempty"`
+ AxolotlSenderKeyDistributionMessage []byte `protobuf:"bytes,2,opt,name=axolotlSenderKeyDistributionMessage" json:"axolotlSenderKeyDistributionMessage,omitempty"`
+}
+
+func (x *SenderKeyDistributionMessage) Reset() {
+ *x = SenderKeyDistributionMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[77]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SenderKeyDistributionMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SenderKeyDistributionMessage) ProtoMessage() {}
+
+func (x *SenderKeyDistributionMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[77]
+ 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 SenderKeyDistributionMessage.ProtoReflect.Descriptor instead.
+func (*SenderKeyDistributionMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{77}
+}
+
+func (x *SenderKeyDistributionMessage) GetGroupId() string {
+ if x != nil && x.GroupId != nil {
+ return *x.GroupId
+ }
+ return ""
+}
+
+func (x *SenderKeyDistributionMessage) GetAxolotlSenderKeyDistributionMessage() []byte {
+ if x != nil {
+ return x.AxolotlSenderKeyDistributionMessage
+ }
+ return nil
+}
+
+type ImageMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
+ Mimetype *string `protobuf:"bytes,2,opt,name=mimetype" json:"mimetype,omitempty"`
+ Caption *string `protobuf:"bytes,3,opt,name=caption" json:"caption,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,4,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileLength *uint64 `protobuf:"varint,5,opt,name=fileLength" json:"fileLength,omitempty"`
+ Height *uint32 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"`
+ Width *uint32 `protobuf:"varint,7,opt,name=width" json:"width,omitempty"`
+ MediaKey []byte `protobuf:"bytes,8,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,9,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ InteractiveAnnotations []*InteractiveAnnotation `protobuf:"bytes,10,rep,name=interactiveAnnotations" json:"interactiveAnnotations,omitempty"`
+ DirectPath *string `protobuf:"bytes,11,opt,name=directPath" json:"directPath,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,12,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ FirstScanSidecar []byte `protobuf:"bytes,18,opt,name=firstScanSidecar" json:"firstScanSidecar,omitempty"`
+ FirstScanLength *uint32 `protobuf:"varint,19,opt,name=firstScanLength" json:"firstScanLength,omitempty"`
+ ExperimentGroupId *uint32 `protobuf:"varint,20,opt,name=experimentGroupId" json:"experimentGroupId,omitempty"`
+ ScansSidecar []byte `protobuf:"bytes,21,opt,name=scansSidecar" json:"scansSidecar,omitempty"`
+ ScanLengths []uint32 `protobuf:"varint,22,rep,name=scanLengths" json:"scanLengths,omitempty"`
+ MidQualityFileSha256 []byte `protobuf:"bytes,23,opt,name=midQualityFileSha256" json:"midQualityFileSha256,omitempty"`
+ MidQualityFileEncSha256 []byte `protobuf:"bytes,24,opt,name=midQualityFileEncSha256" json:"midQualityFileEncSha256,omitempty"`
+ ViewOnce *bool `protobuf:"varint,25,opt,name=viewOnce" json:"viewOnce,omitempty"`
+ ThumbnailDirectPath *string `protobuf:"bytes,26,opt,name=thumbnailDirectPath" json:"thumbnailDirectPath,omitempty"`
+ ThumbnailSha256 []byte `protobuf:"bytes,27,opt,name=thumbnailSha256" json:"thumbnailSha256,omitempty"`
+ ThumbnailEncSha256 []byte `protobuf:"bytes,28,opt,name=thumbnailEncSha256" json:"thumbnailEncSha256,omitempty"`
+ StaticUrl *string `protobuf:"bytes,29,opt,name=staticUrl" json:"staticUrl,omitempty"`
+}
+
+func (x *ImageMessage) Reset() {
+ *x = ImageMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[78]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ImageMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImageMessage) ProtoMessage() {}
+
+func (x *ImageMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[78]
+ 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 ImageMessage.ProtoReflect.Descriptor instead.
+func (*ImageMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{78}
+}
+
+func (x *ImageMessage) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *ImageMessage) GetMimetype() string {
+ if x != nil && x.Mimetype != nil {
+ return *x.Mimetype
+ }
+ return ""
+}
+
+func (x *ImageMessage) GetCaption() string {
+ if x != nil && x.Caption != nil {
+ return *x.Caption
+ }
+ return ""
+}
+
+func (x *ImageMessage) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *ImageMessage) GetHeight() uint32 {
+ if x != nil && x.Height != nil {
+ return *x.Height
+ }
+ return 0
+}
+
+func (x *ImageMessage) GetWidth() uint32 {
+ if x != nil && x.Width != nil {
+ return *x.Width
+ }
+ return 0
+}
+
+func (x *ImageMessage) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetInteractiveAnnotations() []*InteractiveAnnotation {
+ if x != nil {
+ return x.InteractiveAnnotations
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *ImageMessage) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *ImageMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetFirstScanSidecar() []byte {
+ if x != nil {
+ return x.FirstScanSidecar
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetFirstScanLength() uint32 {
+ if x != nil && x.FirstScanLength != nil {
+ return *x.FirstScanLength
+ }
+ return 0
+}
+
+func (x *ImageMessage) GetExperimentGroupId() uint32 {
+ if x != nil && x.ExperimentGroupId != nil {
+ return *x.ExperimentGroupId
+ }
+ return 0
+}
+
+func (x *ImageMessage) GetScansSidecar() []byte {
+ if x != nil {
+ return x.ScansSidecar
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetScanLengths() []uint32 {
+ if x != nil {
+ return x.ScanLengths
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetMidQualityFileSha256() []byte {
+ if x != nil {
+ return x.MidQualityFileSha256
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetMidQualityFileEncSha256() []byte {
+ if x != nil {
+ return x.MidQualityFileEncSha256
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetViewOnce() bool {
+ if x != nil && x.ViewOnce != nil {
+ return *x.ViewOnce
+ }
+ return false
+}
+
+func (x *ImageMessage) GetThumbnailDirectPath() string {
+ if x != nil && x.ThumbnailDirectPath != nil {
+ return *x.ThumbnailDirectPath
+ }
+ return ""
+}
+
+func (x *ImageMessage) GetThumbnailSha256() []byte {
+ if x != nil {
+ return x.ThumbnailSha256
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetThumbnailEncSha256() []byte {
+ if x != nil {
+ return x.ThumbnailEncSha256
+ }
+ return nil
+}
+
+func (x *ImageMessage) GetStaticUrl() string {
+ if x != nil && x.StaticUrl != nil {
+ return *x.StaticUrl
+ }
+ return ""
+}
+
+type InvoiceMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Note *string `protobuf:"bytes,1,opt,name=note" json:"note,omitempty"`
+ Token *string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
+ AttachmentType *InvoiceMessage_InvoiceMessageAttachmentType `protobuf:"varint,3,opt,name=attachmentType,enum=proto.InvoiceMessage_InvoiceMessageAttachmentType" json:"attachmentType,omitempty"`
+ AttachmentMimetype *string `protobuf:"bytes,4,opt,name=attachmentMimetype" json:"attachmentMimetype,omitempty"`
+ AttachmentMediaKey []byte `protobuf:"bytes,5,opt,name=attachmentMediaKey" json:"attachmentMediaKey,omitempty"`
+ AttachmentMediaKeyTimestamp *int64 `protobuf:"varint,6,opt,name=attachmentMediaKeyTimestamp" json:"attachmentMediaKeyTimestamp,omitempty"`
+ AttachmentFileSha256 []byte `protobuf:"bytes,7,opt,name=attachmentFileSha256" json:"attachmentFileSha256,omitempty"`
+ AttachmentFileEncSha256 []byte `protobuf:"bytes,8,opt,name=attachmentFileEncSha256" json:"attachmentFileEncSha256,omitempty"`
+ AttachmentDirectPath *string `protobuf:"bytes,9,opt,name=attachmentDirectPath" json:"attachmentDirectPath,omitempty"`
+ AttachmentJpegThumbnail []byte `protobuf:"bytes,10,opt,name=attachmentJpegThumbnail" json:"attachmentJpegThumbnail,omitempty"`
+}
+
+func (x *InvoiceMessage) Reset() {
+ *x = InvoiceMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[79]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InvoiceMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvoiceMessage) ProtoMessage() {}
+
+func (x *InvoiceMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[79]
+ 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 InvoiceMessage.ProtoReflect.Descriptor instead.
+func (*InvoiceMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{79}
+}
+
+func (x *InvoiceMessage) GetNote() string {
+ if x != nil && x.Note != nil {
+ return *x.Note
+ }
+ return ""
+}
+
+func (x *InvoiceMessage) GetToken() string {
+ if x != nil && x.Token != nil {
+ return *x.Token
+ }
+ return ""
+}
+
+func (x *InvoiceMessage) GetAttachmentType() InvoiceMessage_InvoiceMessageAttachmentType {
+ if x != nil && x.AttachmentType != nil {
+ return *x.AttachmentType
+ }
+ return InvoiceMessage_IMAGE
+}
+
+func (x *InvoiceMessage) GetAttachmentMimetype() string {
+ if x != nil && x.AttachmentMimetype != nil {
+ return *x.AttachmentMimetype
+ }
+ return ""
+}
+
+func (x *InvoiceMessage) GetAttachmentMediaKey() []byte {
+ if x != nil {
+ return x.AttachmentMediaKey
+ }
+ return nil
+}
+
+func (x *InvoiceMessage) GetAttachmentMediaKeyTimestamp() int64 {
+ if x != nil && x.AttachmentMediaKeyTimestamp != nil {
+ return *x.AttachmentMediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *InvoiceMessage) GetAttachmentFileSha256() []byte {
+ if x != nil {
+ return x.AttachmentFileSha256
+ }
+ return nil
+}
+
+func (x *InvoiceMessage) GetAttachmentFileEncSha256() []byte {
+ if x != nil {
+ return x.AttachmentFileEncSha256
+ }
+ return nil
+}
+
+func (x *InvoiceMessage) GetAttachmentDirectPath() string {
+ if x != nil && x.AttachmentDirectPath != nil {
+ return *x.AttachmentDirectPath
+ }
+ return ""
+}
+
+func (x *InvoiceMessage) GetAttachmentJpegThumbnail() []byte {
+ if x != nil {
+ return x.AttachmentJpegThumbnail
+ }
+ return nil
+}
+
+type ContactMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayName *string `protobuf:"bytes,1,opt,name=displayName" json:"displayName,omitempty"`
+ Vcard *string `protobuf:"bytes,16,opt,name=vcard" json:"vcard,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *ContactMessage) Reset() {
+ *x = ContactMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[80]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ContactMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContactMessage) ProtoMessage() {}
+
+func (x *ContactMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[80]
+ 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 ContactMessage.ProtoReflect.Descriptor instead.
+func (*ContactMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{80}
+}
+
+func (x *ContactMessage) GetDisplayName() string {
+ if x != nil && x.DisplayName != nil {
+ return *x.DisplayName
+ }
+ return ""
+}
+
+func (x *ContactMessage) GetVcard() string {
+ if x != nil && x.Vcard != nil {
+ return *x.Vcard
+ }
+ return ""
+}
+
+func (x *ContactMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type LocationMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ 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"`
+ Address *string `protobuf:"bytes,4,opt,name=address" json:"address,omitempty"`
+ Url *string `protobuf:"bytes,5,opt,name=url" json:"url,omitempty"`
+ IsLive *bool `protobuf:"varint,6,opt,name=isLive" json:"isLive,omitempty"`
+ AccuracyInMeters *uint32 `protobuf:"varint,7,opt,name=accuracyInMeters" json:"accuracyInMeters,omitempty"`
+ SpeedInMps *float32 `protobuf:"fixed32,8,opt,name=speedInMps" json:"speedInMps,omitempty"`
+ DegreesClockwiseFromMagneticNorth *uint32 `protobuf:"varint,9,opt,name=degreesClockwiseFromMagneticNorth" json:"degreesClockwiseFromMagneticNorth,omitempty"`
+ Comment *string `protobuf:"bytes,11,opt,name=comment" json:"comment,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *LocationMessage) Reset() {
+ *x = LocationMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[81]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocationMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocationMessage) ProtoMessage() {}
+
+func (x *LocationMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[81]
+ 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 LocationMessage.ProtoReflect.Descriptor instead.
+func (*LocationMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{81}
+}
+
+func (x *LocationMessage) GetDegreesLatitude() float64 {
+ if x != nil && x.DegreesLatitude != nil {
+ return *x.DegreesLatitude
+ }
+ return 0
+}
+
+func (x *LocationMessage) GetDegreesLongitude() float64 {
+ if x != nil && x.DegreesLongitude != nil {
+ return *x.DegreesLongitude
+ }
+ return 0
+}
+
+func (x *LocationMessage) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *LocationMessage) GetAddress() string {
+ if x != nil && x.Address != nil {
+ return *x.Address
+ }
+ return ""
+}
+
+func (x *LocationMessage) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *LocationMessage) GetIsLive() bool {
+ if x != nil && x.IsLive != nil {
+ return *x.IsLive
+ }
+ return false
+}
+
+func (x *LocationMessage) GetAccuracyInMeters() uint32 {
+ if x != nil && x.AccuracyInMeters != nil {
+ return *x.AccuracyInMeters
+ }
+ return 0
+}
+
+func (x *LocationMessage) GetSpeedInMps() float32 {
+ if x != nil && x.SpeedInMps != nil {
+ return *x.SpeedInMps
+ }
+ return 0
+}
+
+func (x *LocationMessage) GetDegreesClockwiseFromMagneticNorth() uint32 {
+ if x != nil && x.DegreesClockwiseFromMagneticNorth != nil {
+ return *x.DegreesClockwiseFromMagneticNorth
+ }
+ return 0
+}
+
+func (x *LocationMessage) GetComment() string {
+ if x != nil && x.Comment != nil {
+ return *x.Comment
+ }
+ return ""
+}
+
+func (x *LocationMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *LocationMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type ExtendedTextMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
+ MatchedText *string `protobuf:"bytes,2,opt,name=matchedText" json:"matchedText,omitempty"`
+ CanonicalUrl *string `protobuf:"bytes,4,opt,name=canonicalUrl" json:"canonicalUrl,omitempty"`
+ Description *string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
+ Title *string `protobuf:"bytes,6,opt,name=title" json:"title,omitempty"`
+ TextArgb *uint32 `protobuf:"fixed32,7,opt,name=textArgb" json:"textArgb,omitempty"`
+ BackgroundArgb *uint32 `protobuf:"fixed32,8,opt,name=backgroundArgb" json:"backgroundArgb,omitempty"`
+ Font *ExtendedTextMessage_ExtendedTextMessageFontType `protobuf:"varint,9,opt,name=font,enum=proto.ExtendedTextMessage_ExtendedTextMessageFontType" json:"font,omitempty"`
+ PreviewType *ExtendedTextMessage_ExtendedTextMessagePreviewType `protobuf:"varint,10,opt,name=previewType,enum=proto.ExtendedTextMessage_ExtendedTextMessagePreviewType" json:"previewType,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ DoNotPlayInline *bool `protobuf:"varint,18,opt,name=doNotPlayInline" json:"doNotPlayInline,omitempty"`
+ ThumbnailDirectPath *string `protobuf:"bytes,19,opt,name=thumbnailDirectPath" json:"thumbnailDirectPath,omitempty"`
+ ThumbnailSha256 []byte `protobuf:"bytes,20,opt,name=thumbnailSha256" json:"thumbnailSha256,omitempty"`
+ ThumbnailEncSha256 []byte `protobuf:"bytes,21,opt,name=thumbnailEncSha256" json:"thumbnailEncSha256,omitempty"`
+ MediaKey []byte `protobuf:"bytes,22,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,23,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ ThumbnailHeight *uint32 `protobuf:"varint,24,opt,name=thumbnailHeight" json:"thumbnailHeight,omitempty"`
+ ThumbnailWidth *uint32 `protobuf:"varint,25,opt,name=thumbnailWidth" json:"thumbnailWidth,omitempty"`
+ InviteLinkGroupType *ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType `protobuf:"varint,26,opt,name=inviteLinkGroupType,enum=proto.ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType" json:"inviteLinkGroupType,omitempty"`
+}
+
+func (x *ExtendedTextMessage) Reset() {
+ *x = ExtendedTextMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[82]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExtendedTextMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtendedTextMessage) ProtoMessage() {}
+
+func (x *ExtendedTextMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[82]
+ 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 ExtendedTextMessage.ProtoReflect.Descriptor instead.
+func (*ExtendedTextMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{82}
+}
+
+func (x *ExtendedTextMessage) GetText() string {
+ if x != nil && x.Text != nil {
+ return *x.Text
+ }
+ return ""
+}
+
+func (x *ExtendedTextMessage) GetMatchedText() string {
+ if x != nil && x.MatchedText != nil {
+ return *x.MatchedText
+ }
+ return ""
+}
+
+func (x *ExtendedTextMessage) GetCanonicalUrl() string {
+ if x != nil && x.CanonicalUrl != nil {
+ return *x.CanonicalUrl
+ }
+ return ""
+}
+
+func (x *ExtendedTextMessage) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *ExtendedTextMessage) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *ExtendedTextMessage) GetTextArgb() uint32 {
+ if x != nil && x.TextArgb != nil {
+ return *x.TextArgb
+ }
+ return 0
+}
+
+func (x *ExtendedTextMessage) GetBackgroundArgb() uint32 {
+ if x != nil && x.BackgroundArgb != nil {
+ return *x.BackgroundArgb
+ }
+ return 0
+}
+
+func (x *ExtendedTextMessage) GetFont() ExtendedTextMessage_ExtendedTextMessageFontType {
+ if x != nil && x.Font != nil {
+ return *x.Font
+ }
+ return ExtendedTextMessage_SANS_SERIF
+}
+
+func (x *ExtendedTextMessage) GetPreviewType() ExtendedTextMessage_ExtendedTextMessagePreviewType {
+ if x != nil && x.PreviewType != nil {
+ return *x.PreviewType
+ }
+ return ExtendedTextMessage_NONE
+}
+
+func (x *ExtendedTextMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *ExtendedTextMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *ExtendedTextMessage) GetDoNotPlayInline() bool {
+ if x != nil && x.DoNotPlayInline != nil {
+ return *x.DoNotPlayInline
+ }
+ return false
+}
+
+func (x *ExtendedTextMessage) GetThumbnailDirectPath() string {
+ if x != nil && x.ThumbnailDirectPath != nil {
+ return *x.ThumbnailDirectPath
+ }
+ return ""
+}
+
+func (x *ExtendedTextMessage) GetThumbnailSha256() []byte {
+ if x != nil {
+ return x.ThumbnailSha256
+ }
+ return nil
+}
+
+func (x *ExtendedTextMessage) GetThumbnailEncSha256() []byte {
+ if x != nil {
+ return x.ThumbnailEncSha256
+ }
+ return nil
+}
+
+func (x *ExtendedTextMessage) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *ExtendedTextMessage) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *ExtendedTextMessage) GetThumbnailHeight() uint32 {
+ if x != nil && x.ThumbnailHeight != nil {
+ return *x.ThumbnailHeight
+ }
+ return 0
+}
+
+func (x *ExtendedTextMessage) GetThumbnailWidth() uint32 {
+ if x != nil && x.ThumbnailWidth != nil {
+ return *x.ThumbnailWidth
+ }
+ return 0
+}
+
+func (x *ExtendedTextMessage) GetInviteLinkGroupType() ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType {
+ if x != nil && x.InviteLinkGroupType != nil {
+ return *x.InviteLinkGroupType
+ }
+ return ExtendedTextMessage_DEFAULT
+}
+
+type DocumentMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
+ Mimetype *string `protobuf:"bytes,2,opt,name=mimetype" json:"mimetype,omitempty"`
+ Title *string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,4,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileLength *uint64 `protobuf:"varint,5,opt,name=fileLength" json:"fileLength,omitempty"`
+ PageCount *uint32 `protobuf:"varint,6,opt,name=pageCount" json:"pageCount,omitempty"`
+ MediaKey []byte `protobuf:"bytes,7,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ FileName *string `protobuf:"bytes,8,opt,name=fileName" json:"fileName,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,9,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ DirectPath *string `protobuf:"bytes,10,opt,name=directPath" json:"directPath,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,11,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ ContactVcard *bool `protobuf:"varint,12,opt,name=contactVcard" json:"contactVcard,omitempty"`
+ ThumbnailDirectPath *string `protobuf:"bytes,13,opt,name=thumbnailDirectPath" json:"thumbnailDirectPath,omitempty"`
+ ThumbnailSha256 []byte `protobuf:"bytes,14,opt,name=thumbnailSha256" json:"thumbnailSha256,omitempty"`
+ ThumbnailEncSha256 []byte `protobuf:"bytes,15,opt,name=thumbnailEncSha256" json:"thumbnailEncSha256,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ ThumbnailHeight *uint32 `protobuf:"varint,18,opt,name=thumbnailHeight" json:"thumbnailHeight,omitempty"`
+ ThumbnailWidth *uint32 `protobuf:"varint,19,opt,name=thumbnailWidth" json:"thumbnailWidth,omitempty"`
+}
+
+func (x *DocumentMessage) Reset() {
+ *x = DocumentMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[83]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DocumentMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocumentMessage) ProtoMessage() {}
+
+func (x *DocumentMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[83]
+ 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 DocumentMessage.ProtoReflect.Descriptor instead.
+func (*DocumentMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{83}
+}
+
+func (x *DocumentMessage) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *DocumentMessage) GetMimetype() string {
+ if x != nil && x.Mimetype != nil {
+ return *x.Mimetype
+ }
+ return ""
+}
+
+func (x *DocumentMessage) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *DocumentMessage) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *DocumentMessage) GetPageCount() uint32 {
+ if x != nil && x.PageCount != nil {
+ return *x.PageCount
+ }
+ return 0
+}
+
+func (x *DocumentMessage) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetFileName() string {
+ if x != nil && x.FileName != nil {
+ return *x.FileName
+ }
+ return ""
+}
+
+func (x *DocumentMessage) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *DocumentMessage) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *DocumentMessage) GetContactVcard() bool {
+ if x != nil && x.ContactVcard != nil {
+ return *x.ContactVcard
+ }
+ return false
+}
+
+func (x *DocumentMessage) GetThumbnailDirectPath() string {
+ if x != nil && x.ThumbnailDirectPath != nil {
+ return *x.ThumbnailDirectPath
+ }
+ return ""
+}
+
+func (x *DocumentMessage) GetThumbnailSha256() []byte {
+ if x != nil {
+ return x.ThumbnailSha256
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetThumbnailEncSha256() []byte {
+ if x != nil {
+ return x.ThumbnailEncSha256
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *DocumentMessage) GetThumbnailHeight() uint32 {
+ if x != nil && x.ThumbnailHeight != nil {
+ return *x.ThumbnailHeight
+ }
+ return 0
+}
+
+func (x *DocumentMessage) GetThumbnailWidth() uint32 {
+ if x != nil && x.ThumbnailWidth != nil {
+ return *x.ThumbnailWidth
+ }
+ return 0
+}
+
+type AudioMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
+ Mimetype *string `protobuf:"bytes,2,opt,name=mimetype" json:"mimetype,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,3,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileLength *uint64 `protobuf:"varint,4,opt,name=fileLength" json:"fileLength,omitempty"`
+ Seconds *uint32 `protobuf:"varint,5,opt,name=seconds" json:"seconds,omitempty"`
+ Ptt *bool `protobuf:"varint,6,opt,name=ptt" json:"ptt,omitempty"`
+ MediaKey []byte `protobuf:"bytes,7,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,8,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ DirectPath *string `protobuf:"bytes,9,opt,name=directPath" json:"directPath,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,10,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ StreamingSidecar []byte `protobuf:"bytes,18,opt,name=streamingSidecar" json:"streamingSidecar,omitempty"`
+ Waveform []byte `protobuf:"bytes,19,opt,name=waveform" json:"waveform,omitempty"`
+}
+
+func (x *AudioMessage) Reset() {
+ *x = AudioMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[84]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AudioMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AudioMessage) ProtoMessage() {}
+
+func (x *AudioMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[84]
+ 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 AudioMessage.ProtoReflect.Descriptor instead.
+func (*AudioMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{84}
+}
+
+func (x *AudioMessage) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *AudioMessage) GetMimetype() string {
+ if x != nil && x.Mimetype != nil {
+ return *x.Mimetype
+ }
+ return ""
+}
+
+func (x *AudioMessage) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *AudioMessage) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *AudioMessage) GetSeconds() uint32 {
+ if x != nil && x.Seconds != nil {
+ return *x.Seconds
+ }
+ return 0
+}
+
+func (x *AudioMessage) GetPtt() bool {
+ if x != nil && x.Ptt != nil {
+ return *x.Ptt
+ }
+ return false
+}
+
+func (x *AudioMessage) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *AudioMessage) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *AudioMessage) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *AudioMessage) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *AudioMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *AudioMessage) GetStreamingSidecar() []byte {
+ if x != nil {
+ return x.StreamingSidecar
+ }
+ return nil
+}
+
+func (x *AudioMessage) GetWaveform() []byte {
+ if x != nil {
+ return x.Waveform
+ }
+ return nil
+}
+
+type VideoMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
+ Mimetype *string `protobuf:"bytes,2,opt,name=mimetype" json:"mimetype,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,3,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileLength *uint64 `protobuf:"varint,4,opt,name=fileLength" json:"fileLength,omitempty"`
+ Seconds *uint32 `protobuf:"varint,5,opt,name=seconds" json:"seconds,omitempty"`
+ MediaKey []byte `protobuf:"bytes,6,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ Caption *string `protobuf:"bytes,7,opt,name=caption" json:"caption,omitempty"`
+ GifPlayback *bool `protobuf:"varint,8,opt,name=gifPlayback" json:"gifPlayback,omitempty"`
+ Height *uint32 `protobuf:"varint,9,opt,name=height" json:"height,omitempty"`
+ Width *uint32 `protobuf:"varint,10,opt,name=width" json:"width,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,11,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ InteractiveAnnotations []*InteractiveAnnotation `protobuf:"bytes,12,rep,name=interactiveAnnotations" json:"interactiveAnnotations,omitempty"`
+ DirectPath *string `protobuf:"bytes,13,opt,name=directPath" json:"directPath,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,14,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ StreamingSidecar []byte `protobuf:"bytes,18,opt,name=streamingSidecar" json:"streamingSidecar,omitempty"`
+ GifAttribution *VideoMessage_VideoMessageAttribution `protobuf:"varint,19,opt,name=gifAttribution,enum=proto.VideoMessage_VideoMessageAttribution" json:"gifAttribution,omitempty"`
+ ViewOnce *bool `protobuf:"varint,20,opt,name=viewOnce" json:"viewOnce,omitempty"`
+ ThumbnailDirectPath *string `protobuf:"bytes,21,opt,name=thumbnailDirectPath" json:"thumbnailDirectPath,omitempty"`
+ ThumbnailSha256 []byte `protobuf:"bytes,22,opt,name=thumbnailSha256" json:"thumbnailSha256,omitempty"`
+ ThumbnailEncSha256 []byte `protobuf:"bytes,23,opt,name=thumbnailEncSha256" json:"thumbnailEncSha256,omitempty"`
+ StaticUrl *string `protobuf:"bytes,24,opt,name=staticUrl" json:"staticUrl,omitempty"`
+}
+
+func (x *VideoMessage) Reset() {
+ *x = VideoMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[85]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VideoMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VideoMessage) ProtoMessage() {}
+
+func (x *VideoMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[85]
+ 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 VideoMessage.ProtoReflect.Descriptor instead.
+func (*VideoMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{85}
+}
+
+func (x *VideoMessage) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *VideoMessage) GetMimetype() string {
+ if x != nil && x.Mimetype != nil {
+ return *x.Mimetype
+ }
+ return ""
+}
+
+func (x *VideoMessage) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *VideoMessage) GetSeconds() uint32 {
+ if x != nil && x.Seconds != nil {
+ return *x.Seconds
+ }
+ return 0
+}
+
+func (x *VideoMessage) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetCaption() string {
+ if x != nil && x.Caption != nil {
+ return *x.Caption
+ }
+ return ""
+}
+
+func (x *VideoMessage) GetGifPlayback() bool {
+ if x != nil && x.GifPlayback != nil {
+ return *x.GifPlayback
+ }
+ return false
+}
+
+func (x *VideoMessage) GetHeight() uint32 {
+ if x != nil && x.Height != nil {
+ return *x.Height
+ }
+ return 0
+}
+
+func (x *VideoMessage) GetWidth() uint32 {
+ if x != nil && x.Width != nil {
+ return *x.Width
+ }
+ return 0
+}
+
+func (x *VideoMessage) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetInteractiveAnnotations() []*InteractiveAnnotation {
+ if x != nil {
+ return x.InteractiveAnnotations
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *VideoMessage) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *VideoMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetStreamingSidecar() []byte {
+ if x != nil {
+ return x.StreamingSidecar
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetGifAttribution() VideoMessage_VideoMessageAttribution {
+ if x != nil && x.GifAttribution != nil {
+ return *x.GifAttribution
+ }
+ return VideoMessage_NONE
+}
+
+func (x *VideoMessage) GetViewOnce() bool {
+ if x != nil && x.ViewOnce != nil {
+ return *x.ViewOnce
+ }
+ return false
+}
+
+func (x *VideoMessage) GetThumbnailDirectPath() string {
+ if x != nil && x.ThumbnailDirectPath != nil {
+ return *x.ThumbnailDirectPath
+ }
+ return ""
+}
+
+func (x *VideoMessage) GetThumbnailSha256() []byte {
+ if x != nil {
+ return x.ThumbnailSha256
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetThumbnailEncSha256() []byte {
+ if x != nil {
+ return x.ThumbnailEncSha256
+ }
+ return nil
+}
+
+func (x *VideoMessage) GetStaticUrl() string {
+ if x != nil && x.StaticUrl != nil {
+ return *x.StaticUrl
+ }
+ return ""
+}
+
+type Call struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CallKey []byte `protobuf:"bytes,1,opt,name=callKey" json:"callKey,omitempty"`
+ ConversionSource *string `protobuf:"bytes,2,opt,name=conversionSource" json:"conversionSource,omitempty"`
+ ConversionData []byte `protobuf:"bytes,3,opt,name=conversionData" json:"conversionData,omitempty"`
+ ConversionDelaySeconds *uint32 `protobuf:"varint,4,opt,name=conversionDelaySeconds" json:"conversionDelaySeconds,omitempty"`
+}
+
+func (x *Call) Reset() {
+ *x = Call{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[86]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Call) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Call) ProtoMessage() {}
+
+func (x *Call) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[86]
+ 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 Call.ProtoReflect.Descriptor instead.
+func (*Call) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{86}
+}
+
+func (x *Call) GetCallKey() []byte {
+ if x != nil {
+ return x.CallKey
+ }
+ return nil
+}
+
+func (x *Call) GetConversionSource() string {
+ if x != nil && x.ConversionSource != nil {
+ return *x.ConversionSource
+ }
+ return ""
+}
+
+func (x *Call) GetConversionData() []byte {
+ if x != nil {
+ return x.ConversionData
+ }
+ return nil
+}
+
+func (x *Call) GetConversionDelaySeconds() uint32 {
+ if x != nil && x.ConversionDelaySeconds != nil {
+ return *x.ConversionDelaySeconds
+ }
+ return 0
+}
+
+type Chat struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayName *string `protobuf:"bytes,1,opt,name=displayName" json:"displayName,omitempty"`
+ Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
+}
+
+func (x *Chat) Reset() {
+ *x = Chat{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[87]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Chat) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Chat) ProtoMessage() {}
+
+func (x *Chat) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[87]
+ 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 Chat.ProtoReflect.Descriptor instead.
+func (*Chat) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{87}
+}
+
+func (x *Chat) GetDisplayName() string {
+ if x != nil && x.DisplayName != nil {
+ return *x.DisplayName
+ }
+ return ""
+}
+
+func (x *Chat) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+type ProtocolMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+ Type *ProtocolMessage_ProtocolMessageType `protobuf:"varint,2,opt,name=type,enum=proto.ProtocolMessage_ProtocolMessageType" json:"type,omitempty"`
+ EphemeralExpiration *uint32 `protobuf:"varint,4,opt,name=ephemeralExpiration" json:"ephemeralExpiration,omitempty"`
+ EphemeralSettingTimestamp *int64 `protobuf:"varint,5,opt,name=ephemeralSettingTimestamp" json:"ephemeralSettingTimestamp,omitempty"`
+ HistorySyncNotification *HistorySyncNotification `protobuf:"bytes,6,opt,name=historySyncNotification" json:"historySyncNotification,omitempty"`
+ AppStateSyncKeyShare *AppStateSyncKeyShare `protobuf:"bytes,7,opt,name=appStateSyncKeyShare" json:"appStateSyncKeyShare,omitempty"`
+ AppStateSyncKeyRequest *AppStateSyncKeyRequest `protobuf:"bytes,8,opt,name=appStateSyncKeyRequest" json:"appStateSyncKeyRequest,omitempty"`
+ InitialSecurityNotificationSettingSync *InitialSecurityNotificationSettingSync `protobuf:"bytes,9,opt,name=initialSecurityNotificationSettingSync" json:"initialSecurityNotificationSettingSync,omitempty"`
+ AppStateFatalExceptionNotification *AppStateFatalExceptionNotification `protobuf:"bytes,10,opt,name=appStateFatalExceptionNotification" json:"appStateFatalExceptionNotification,omitempty"`
+ DisappearingMode *DisappearingMode `protobuf:"bytes,11,opt,name=disappearingMode" json:"disappearingMode,omitempty"`
+}
+
+func (x *ProtocolMessage) Reset() {
+ *x = ProtocolMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[88]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolMessage) ProtoMessage() {}
+
+func (x *ProtocolMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[88]
+ 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 ProtocolMessage.ProtoReflect.Descriptor instead.
+func (*ProtocolMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{88}
+}
+
+func (x *ProtocolMessage) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+func (x *ProtocolMessage) GetType() ProtocolMessage_ProtocolMessageType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return ProtocolMessage_REVOKE
+}
+
+func (x *ProtocolMessage) GetEphemeralExpiration() uint32 {
+ if x != nil && x.EphemeralExpiration != nil {
+ return *x.EphemeralExpiration
+ }
+ return 0
+}
+
+func (x *ProtocolMessage) GetEphemeralSettingTimestamp() int64 {
+ if x != nil && x.EphemeralSettingTimestamp != nil {
+ return *x.EphemeralSettingTimestamp
+ }
+ return 0
+}
+
+func (x *ProtocolMessage) GetHistorySyncNotification() *HistorySyncNotification {
+ if x != nil {
+ return x.HistorySyncNotification
+ }
+ return nil
+}
+
+func (x *ProtocolMessage) GetAppStateSyncKeyShare() *AppStateSyncKeyShare {
+ if x != nil {
+ return x.AppStateSyncKeyShare
+ }
+ return nil
+}
+
+func (x *ProtocolMessage) GetAppStateSyncKeyRequest() *AppStateSyncKeyRequest {
+ if x != nil {
+ return x.AppStateSyncKeyRequest
+ }
+ return nil
+}
+
+func (x *ProtocolMessage) GetInitialSecurityNotificationSettingSync() *InitialSecurityNotificationSettingSync {
+ if x != nil {
+ return x.InitialSecurityNotificationSettingSync
+ }
+ return nil
+}
+
+func (x *ProtocolMessage) GetAppStateFatalExceptionNotification() *AppStateFatalExceptionNotification {
+ if x != nil {
+ return x.AppStateFatalExceptionNotification
+ }
+ return nil
+}
+
+func (x *ProtocolMessage) GetDisappearingMode() *DisappearingMode {
+ if x != nil {
+ return x.DisappearingMode
+ }
+ return nil
+}
+
+type HistorySyncNotification struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FileSha256 []byte `protobuf:"bytes,1,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileLength *uint64 `protobuf:"varint,2,opt,name=fileLength" json:"fileLength,omitempty"`
+ MediaKey []byte `protobuf:"bytes,3,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,4,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ DirectPath *string `protobuf:"bytes,5,opt,name=directPath" json:"directPath,omitempty"`
+ SyncType *HistorySyncNotification_HistorySyncNotificationHistorySyncType `protobuf:"varint,6,opt,name=syncType,enum=proto.HistorySyncNotification_HistorySyncNotificationHistorySyncType" json:"syncType,omitempty"`
+ ChunkOrder *uint32 `protobuf:"varint,7,opt,name=chunkOrder" json:"chunkOrder,omitempty"`
+ OriginalMessageId *string `protobuf:"bytes,8,opt,name=originalMessageId" json:"originalMessageId,omitempty"`
+}
+
+func (x *HistorySyncNotification) Reset() {
+ *x = HistorySyncNotification{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[89]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HistorySyncNotification) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HistorySyncNotification) ProtoMessage() {}
+
+func (x *HistorySyncNotification) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[89]
+ 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 HistorySyncNotification.ProtoReflect.Descriptor instead.
+func (*HistorySyncNotification) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{89}
+}
+
+func (x *HistorySyncNotification) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *HistorySyncNotification) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *HistorySyncNotification) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *HistorySyncNotification) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *HistorySyncNotification) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *HistorySyncNotification) GetSyncType() HistorySyncNotification_HistorySyncNotificationHistorySyncType {
+ if x != nil && x.SyncType != nil {
+ return *x.SyncType
+ }
+ return HistorySyncNotification_INITIAL_BOOTSTRAP
+}
+
+func (x *HistorySyncNotification) GetChunkOrder() uint32 {
+ if x != nil && x.ChunkOrder != nil {
+ return *x.ChunkOrder
+ }
+ return 0
+}
+
+func (x *HistorySyncNotification) GetOriginalMessageId() string {
+ if x != nil && x.OriginalMessageId != nil {
+ return *x.OriginalMessageId
+ }
+ return ""
+}
+
+type AppStateSyncKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ KeyId *AppStateSyncKeyId `protobuf:"bytes,1,opt,name=keyId" json:"keyId,omitempty"`
+ KeyData *AppStateSyncKeyData `protobuf:"bytes,2,opt,name=keyData" json:"keyData,omitempty"`
+}
+
+func (x *AppStateSyncKey) Reset() {
+ *x = AppStateSyncKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[90]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateSyncKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateSyncKey) ProtoMessage() {}
+
+func (x *AppStateSyncKey) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[90]
+ 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 AppStateSyncKey.ProtoReflect.Descriptor instead.
+func (*AppStateSyncKey) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{90}
+}
+
+func (x *AppStateSyncKey) GetKeyId() *AppStateSyncKeyId {
+ if x != nil {
+ return x.KeyId
+ }
+ return nil
+}
+
+func (x *AppStateSyncKey) GetKeyData() *AppStateSyncKeyData {
+ if x != nil {
+ return x.KeyData
+ }
+ return nil
+}
+
+type AppStateSyncKeyId struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ KeyId []byte `protobuf:"bytes,1,opt,name=keyId" json:"keyId,omitempty"`
+}
+
+func (x *AppStateSyncKeyId) Reset() {
+ *x = AppStateSyncKeyId{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[91]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateSyncKeyId) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateSyncKeyId) ProtoMessage() {}
+
+func (x *AppStateSyncKeyId) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[91]
+ 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 AppStateSyncKeyId.ProtoReflect.Descriptor instead.
+func (*AppStateSyncKeyId) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{91}
+}
+
+func (x *AppStateSyncKeyId) GetKeyId() []byte {
+ if x != nil {
+ return x.KeyId
+ }
+ return nil
+}
+
+type AppStateSyncKeyFingerprint struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RawId *uint32 `protobuf:"varint,1,opt,name=rawId" json:"rawId,omitempty"`
+ CurrentIndex *uint32 `protobuf:"varint,2,opt,name=currentIndex" json:"currentIndex,omitempty"`
+ DeviceIndexes []uint32 `protobuf:"varint,3,rep,packed,name=deviceIndexes" json:"deviceIndexes,omitempty"`
+}
+
+func (x *AppStateSyncKeyFingerprint) Reset() {
+ *x = AppStateSyncKeyFingerprint{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[92]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateSyncKeyFingerprint) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateSyncKeyFingerprint) ProtoMessage() {}
+
+func (x *AppStateSyncKeyFingerprint) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[92]
+ 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 AppStateSyncKeyFingerprint.ProtoReflect.Descriptor instead.
+func (*AppStateSyncKeyFingerprint) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{92}
+}
+
+func (x *AppStateSyncKeyFingerprint) GetRawId() uint32 {
+ if x != nil && x.RawId != nil {
+ return *x.RawId
+ }
+ return 0
+}
+
+func (x *AppStateSyncKeyFingerprint) GetCurrentIndex() uint32 {
+ if x != nil && x.CurrentIndex != nil {
+ return *x.CurrentIndex
+ }
+ return 0
+}
+
+func (x *AppStateSyncKeyFingerprint) GetDeviceIndexes() []uint32 {
+ if x != nil {
+ return x.DeviceIndexes
+ }
+ return nil
+}
+
+type AppStateSyncKeyData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ KeyData []byte `protobuf:"bytes,1,opt,name=keyData" json:"keyData,omitempty"`
+ Fingerprint *AppStateSyncKeyFingerprint `protobuf:"bytes,2,opt,name=fingerprint" json:"fingerprint,omitempty"`
+ Timestamp *int64 `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"`
+}
+
+func (x *AppStateSyncKeyData) Reset() {
+ *x = AppStateSyncKeyData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[93]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateSyncKeyData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateSyncKeyData) ProtoMessage() {}
+
+func (x *AppStateSyncKeyData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[93]
+ 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 AppStateSyncKeyData.ProtoReflect.Descriptor instead.
+func (*AppStateSyncKeyData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{93}
+}
+
+func (x *AppStateSyncKeyData) GetKeyData() []byte {
+ if x != nil {
+ return x.KeyData
+ }
+ return nil
+}
+
+func (x *AppStateSyncKeyData) GetFingerprint() *AppStateSyncKeyFingerprint {
+ if x != nil {
+ return x.Fingerprint
+ }
+ return nil
+}
+
+func (x *AppStateSyncKeyData) GetTimestamp() int64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+type AppStateSyncKeyShare struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Keys []*AppStateSyncKey `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
+}
+
+func (x *AppStateSyncKeyShare) Reset() {
+ *x = AppStateSyncKeyShare{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[94]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateSyncKeyShare) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateSyncKeyShare) ProtoMessage() {}
+
+func (x *AppStateSyncKeyShare) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[94]
+ 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 AppStateSyncKeyShare.ProtoReflect.Descriptor instead.
+func (*AppStateSyncKeyShare) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{94}
+}
+
+func (x *AppStateSyncKeyShare) GetKeys() []*AppStateSyncKey {
+ if x != nil {
+ return x.Keys
+ }
+ return nil
+}
+
+type AppStateSyncKeyRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ KeyIds []*AppStateSyncKeyId `protobuf:"bytes,1,rep,name=keyIds" json:"keyIds,omitempty"`
+}
+
+func (x *AppStateSyncKeyRequest) Reset() {
+ *x = AppStateSyncKeyRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[95]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateSyncKeyRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateSyncKeyRequest) ProtoMessage() {}
+
+func (x *AppStateSyncKeyRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[95]
+ 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 AppStateSyncKeyRequest.ProtoReflect.Descriptor instead.
+func (*AppStateSyncKeyRequest) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{95}
+}
+
+func (x *AppStateSyncKeyRequest) GetKeyIds() []*AppStateSyncKeyId {
+ if x != nil {
+ return x.KeyIds
+ }
+ return nil
+}
+
+type AppStateFatalExceptionNotification struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CollectionNames []string `protobuf:"bytes,1,rep,name=collectionNames" json:"collectionNames,omitempty"`
+ Timestamp *int64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
+}
+
+func (x *AppStateFatalExceptionNotification) Reset() {
+ *x = AppStateFatalExceptionNotification{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[96]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppStateFatalExceptionNotification) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppStateFatalExceptionNotification) ProtoMessage() {}
+
+func (x *AppStateFatalExceptionNotification) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[96]
+ 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 AppStateFatalExceptionNotification.ProtoReflect.Descriptor instead.
+func (*AppStateFatalExceptionNotification) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{96}
+}
+
+func (x *AppStateFatalExceptionNotification) GetCollectionNames() []string {
+ if x != nil {
+ return x.CollectionNames
+ }
+ return nil
+}
+
+func (x *AppStateFatalExceptionNotification) GetTimestamp() int64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+type InitialSecurityNotificationSettingSync struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SecurityNotificationEnabled *bool `protobuf:"varint,1,opt,name=securityNotificationEnabled" json:"securityNotificationEnabled,omitempty"`
+}
+
+func (x *InitialSecurityNotificationSettingSync) Reset() {
+ *x = InitialSecurityNotificationSettingSync{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[97]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InitialSecurityNotificationSettingSync) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InitialSecurityNotificationSettingSync) ProtoMessage() {}
+
+func (x *InitialSecurityNotificationSettingSync) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[97]
+ 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 InitialSecurityNotificationSettingSync.ProtoReflect.Descriptor instead.
+func (*InitialSecurityNotificationSettingSync) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{97}
+}
+
+func (x *InitialSecurityNotificationSettingSync) GetSecurityNotificationEnabled() bool {
+ if x != nil && x.SecurityNotificationEnabled != nil {
+ return *x.SecurityNotificationEnabled
+ }
+ return false
+}
+
+type ContactsArrayMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayName *string `protobuf:"bytes,1,opt,name=displayName" json:"displayName,omitempty"`
+ Contacts []*ContactMessage `protobuf:"bytes,2,rep,name=contacts" json:"contacts,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *ContactsArrayMessage) Reset() {
+ *x = ContactsArrayMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[98]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ContactsArrayMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContactsArrayMessage) ProtoMessage() {}
+
+func (x *ContactsArrayMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[98]
+ 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 ContactsArrayMessage.ProtoReflect.Descriptor instead.
+func (*ContactsArrayMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{98}
+}
+
+func (x *ContactsArrayMessage) GetDisplayName() string {
+ if x != nil && x.DisplayName != nil {
+ return *x.DisplayName
+ }
+ return ""
+}
+
+func (x *ContactsArrayMessage) GetContacts() []*ContactMessage {
+ if x != nil {
+ return x.Contacts
+ }
+ return nil
+}
+
+func (x *ContactsArrayMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type HSMCurrency struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CurrencyCode *string `protobuf:"bytes,1,opt,name=currencyCode" json:"currencyCode,omitempty"`
+ Amount1000 *int64 `protobuf:"varint,2,opt,name=amount1000" json:"amount1000,omitempty"`
+}
+
+func (x *HSMCurrency) Reset() {
+ *x = HSMCurrency{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[99]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HSMCurrency) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HSMCurrency) ProtoMessage() {}
+
+func (x *HSMCurrency) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[99]
+ 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 HSMCurrency.ProtoReflect.Descriptor instead.
+func (*HSMCurrency) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{99}
+}
+
+func (x *HSMCurrency) GetCurrencyCode() string {
+ if x != nil && x.CurrencyCode != nil {
+ return *x.CurrencyCode
+ }
+ return ""
+}
+
+func (x *HSMCurrency) GetAmount1000() int64 {
+ if x != nil && x.Amount1000 != nil {
+ return *x.Amount1000
+ }
+ return 0
+}
+
+type HSMDateTimeComponent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DayOfWeek *HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType `protobuf:"varint,1,opt,name=dayOfWeek,enum=proto.HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType" json:"dayOfWeek,omitempty"`
+ Year *uint32 `protobuf:"varint,2,opt,name=year" json:"year,omitempty"`
+ Month *uint32 `protobuf:"varint,3,opt,name=month" json:"month,omitempty"`
+ DayOfMonth *uint32 `protobuf:"varint,4,opt,name=dayOfMonth" json:"dayOfMonth,omitempty"`
+ Hour *uint32 `protobuf:"varint,5,opt,name=hour" json:"hour,omitempty"`
+ Minute *uint32 `protobuf:"varint,6,opt,name=minute" json:"minute,omitempty"`
+ Calendar *HSMDateTimeComponent_HSMDateTimeComponentCalendarType `protobuf:"varint,7,opt,name=calendar,enum=proto.HSMDateTimeComponent_HSMDateTimeComponentCalendarType" json:"calendar,omitempty"`
+}
+
+func (x *HSMDateTimeComponent) Reset() {
+ *x = HSMDateTimeComponent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[100]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HSMDateTimeComponent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HSMDateTimeComponent) ProtoMessage() {}
+
+func (x *HSMDateTimeComponent) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[100]
+ 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 HSMDateTimeComponent.ProtoReflect.Descriptor instead.
+func (*HSMDateTimeComponent) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{100}
+}
+
+func (x *HSMDateTimeComponent) GetDayOfWeek() HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType {
+ if x != nil && x.DayOfWeek != nil {
+ return *x.DayOfWeek
+ }
+ return HSMDateTimeComponent_MONDAY
+}
+
+func (x *HSMDateTimeComponent) GetYear() uint32 {
+ if x != nil && x.Year != nil {
+ return *x.Year
+ }
+ return 0
+}
+
+func (x *HSMDateTimeComponent) GetMonth() uint32 {
+ if x != nil && x.Month != nil {
+ return *x.Month
+ }
+ return 0
+}
+
+func (x *HSMDateTimeComponent) GetDayOfMonth() uint32 {
+ if x != nil && x.DayOfMonth != nil {
+ return *x.DayOfMonth
+ }
+ return 0
+}
+
+func (x *HSMDateTimeComponent) GetHour() uint32 {
+ if x != nil && x.Hour != nil {
+ return *x.Hour
+ }
+ return 0
+}
+
+func (x *HSMDateTimeComponent) GetMinute() uint32 {
+ if x != nil && x.Minute != nil {
+ return *x.Minute
+ }
+ return 0
+}
+
+func (x *HSMDateTimeComponent) GetCalendar() HSMDateTimeComponent_HSMDateTimeComponentCalendarType {
+ if x != nil && x.Calendar != nil {
+ return *x.Calendar
+ }
+ return HSMDateTimeComponent_GREGORIAN
+}
+
+type HSMDateTimeUnixEpoch struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Timestamp *int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
+}
+
+func (x *HSMDateTimeUnixEpoch) Reset() {
+ *x = HSMDateTimeUnixEpoch{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[101]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HSMDateTimeUnixEpoch) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HSMDateTimeUnixEpoch) ProtoMessage() {}
+
+func (x *HSMDateTimeUnixEpoch) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[101]
+ 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 HSMDateTimeUnixEpoch.ProtoReflect.Descriptor instead.
+func (*HSMDateTimeUnixEpoch) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{101}
+}
+
+func (x *HSMDateTimeUnixEpoch) GetTimestamp() int64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+type HSMDateTime struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to DatetimeOneof:
+ // *HSMDateTime_Component
+ // *HSMDateTime_UnixEpoch
+ DatetimeOneof isHSMDateTime_DatetimeOneof `protobuf_oneof:"datetimeOneof"`
+}
+
+func (x *HSMDateTime) Reset() {
+ *x = HSMDateTime{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[102]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HSMDateTime) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HSMDateTime) ProtoMessage() {}
+
+func (x *HSMDateTime) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[102]
+ 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 HSMDateTime.ProtoReflect.Descriptor instead.
+func (*HSMDateTime) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{102}
+}
+
+func (m *HSMDateTime) GetDatetimeOneof() isHSMDateTime_DatetimeOneof {
+ if m != nil {
+ return m.DatetimeOneof
+ }
+ return nil
+}
+
+func (x *HSMDateTime) GetComponent() *HSMDateTimeComponent {
+ if x, ok := x.GetDatetimeOneof().(*HSMDateTime_Component); ok {
+ return x.Component
+ }
+ return nil
+}
+
+func (x *HSMDateTime) GetUnixEpoch() *HSMDateTimeUnixEpoch {
+ if x, ok := x.GetDatetimeOneof().(*HSMDateTime_UnixEpoch); ok {
+ return x.UnixEpoch
+ }
+ return nil
+}
+
+type isHSMDateTime_DatetimeOneof interface {
+ isHSMDateTime_DatetimeOneof()
+}
+
+type HSMDateTime_Component struct {
+ Component *HSMDateTimeComponent `protobuf:"bytes,1,opt,name=component,oneof"`
+}
+
+type HSMDateTime_UnixEpoch struct {
+ UnixEpoch *HSMDateTimeUnixEpoch `protobuf:"bytes,2,opt,name=unixEpoch,oneof"`
+}
+
+func (*HSMDateTime_Component) isHSMDateTime_DatetimeOneof() {}
+
+func (*HSMDateTime_UnixEpoch) isHSMDateTime_DatetimeOneof() {}
+
+type HSMLocalizableParameter struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Default *string `protobuf:"bytes,1,opt,name=default" json:"default,omitempty"`
+ // Types that are assignable to ParamOneof:
+ // *HSMLocalizableParameter_Currency
+ // *HSMLocalizableParameter_DateTime
+ ParamOneof isHSMLocalizableParameter_ParamOneof `protobuf_oneof:"paramOneof"`
+}
+
+func (x *HSMLocalizableParameter) Reset() {
+ *x = HSMLocalizableParameter{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[103]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HSMLocalizableParameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HSMLocalizableParameter) ProtoMessage() {}
+
+func (x *HSMLocalizableParameter) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[103]
+ 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 HSMLocalizableParameter.ProtoReflect.Descriptor instead.
+func (*HSMLocalizableParameter) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{103}
+}
+
+func (x *HSMLocalizableParameter) GetDefault() string {
+ if x != nil && x.Default != nil {
+ return *x.Default
+ }
+ return ""
+}
+
+func (m *HSMLocalizableParameter) GetParamOneof() isHSMLocalizableParameter_ParamOneof {
+ if m != nil {
+ return m.ParamOneof
+ }
+ return nil
+}
+
+func (x *HSMLocalizableParameter) GetCurrency() *HSMCurrency {
+ if x, ok := x.GetParamOneof().(*HSMLocalizableParameter_Currency); ok {
+ return x.Currency
+ }
+ return nil
+}
+
+func (x *HSMLocalizableParameter) GetDateTime() *HSMDateTime {
+ if x, ok := x.GetParamOneof().(*HSMLocalizableParameter_DateTime); ok {
+ return x.DateTime
+ }
+ return nil
+}
+
+type isHSMLocalizableParameter_ParamOneof interface {
+ isHSMLocalizableParameter_ParamOneof()
+}
+
+type HSMLocalizableParameter_Currency struct {
+ Currency *HSMCurrency `protobuf:"bytes,2,opt,name=currency,oneof"`
+}
+
+type HSMLocalizableParameter_DateTime struct {
+ DateTime *HSMDateTime `protobuf:"bytes,3,opt,name=dateTime,oneof"`
+}
+
+func (*HSMLocalizableParameter_Currency) isHSMLocalizableParameter_ParamOneof() {}
+
+func (*HSMLocalizableParameter_DateTime) isHSMLocalizableParameter_ParamOneof() {}
+
+type HighlyStructuredMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Namespace *string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
+ ElementName *string `protobuf:"bytes,2,opt,name=elementName" json:"elementName,omitempty"`
+ Params []string `protobuf:"bytes,3,rep,name=params" json:"params,omitempty"`
+ FallbackLg *string `protobuf:"bytes,4,opt,name=fallbackLg" json:"fallbackLg,omitempty"`
+ FallbackLc *string `protobuf:"bytes,5,opt,name=fallbackLc" json:"fallbackLc,omitempty"`
+ LocalizableParams []*HSMLocalizableParameter `protobuf:"bytes,6,rep,name=localizableParams" json:"localizableParams,omitempty"`
+ DeterministicLg *string `protobuf:"bytes,7,opt,name=deterministicLg" json:"deterministicLg,omitempty"`
+ DeterministicLc *string `protobuf:"bytes,8,opt,name=deterministicLc" json:"deterministicLc,omitempty"`
+ HydratedHsm *TemplateMessage `protobuf:"bytes,9,opt,name=hydratedHsm" json:"hydratedHsm,omitempty"`
+}
+
+func (x *HighlyStructuredMessage) Reset() {
+ *x = HighlyStructuredMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[104]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HighlyStructuredMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HighlyStructuredMessage) ProtoMessage() {}
+
+func (x *HighlyStructuredMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[104]
+ 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 HighlyStructuredMessage.ProtoReflect.Descriptor instead.
+func (*HighlyStructuredMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{104}
+}
+
+func (x *HighlyStructuredMessage) GetNamespace() string {
+ if x != nil && x.Namespace != nil {
+ return *x.Namespace
+ }
+ return ""
+}
+
+func (x *HighlyStructuredMessage) GetElementName() string {
+ if x != nil && x.ElementName != nil {
+ return *x.ElementName
+ }
+ return ""
+}
+
+func (x *HighlyStructuredMessage) GetParams() []string {
+ if x != nil {
+ return x.Params
+ }
+ return nil
+}
+
+func (x *HighlyStructuredMessage) GetFallbackLg() string {
+ if x != nil && x.FallbackLg != nil {
+ return *x.FallbackLg
+ }
+ return ""
+}
+
+func (x *HighlyStructuredMessage) GetFallbackLc() string {
+ if x != nil && x.FallbackLc != nil {
+ return *x.FallbackLc
+ }
+ return ""
+}
+
+func (x *HighlyStructuredMessage) GetLocalizableParams() []*HSMLocalizableParameter {
+ if x != nil {
+ return x.LocalizableParams
+ }
+ return nil
+}
+
+func (x *HighlyStructuredMessage) GetDeterministicLg() string {
+ if x != nil && x.DeterministicLg != nil {
+ return *x.DeterministicLg
+ }
+ return ""
+}
+
+func (x *HighlyStructuredMessage) GetDeterministicLc() string {
+ if x != nil && x.DeterministicLc != nil {
+ return *x.DeterministicLc
+ }
+ return ""
+}
+
+func (x *HighlyStructuredMessage) GetHydratedHsm() *TemplateMessage {
+ if x != nil {
+ return x.HydratedHsm
+ }
+ return nil
+}
+
+type SendPaymentMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ NoteMessage *Message `protobuf:"bytes,2,opt,name=noteMessage" json:"noteMessage,omitempty"`
+ RequestMessageKey *MessageKey `protobuf:"bytes,3,opt,name=requestMessageKey" json:"requestMessageKey,omitempty"`
+ Background *PaymentBackground `protobuf:"bytes,4,opt,name=background" json:"background,omitempty"`
+}
+
+func (x *SendPaymentMessage) Reset() {
+ *x = SendPaymentMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[105]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SendPaymentMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SendPaymentMessage) ProtoMessage() {}
+
+func (x *SendPaymentMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[105]
+ 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 SendPaymentMessage.ProtoReflect.Descriptor instead.
+func (*SendPaymentMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{105}
+}
+
+func (x *SendPaymentMessage) GetNoteMessage() *Message {
+ if x != nil {
+ return x.NoteMessage
+ }
+ return nil
+}
+
+func (x *SendPaymentMessage) GetRequestMessageKey() *MessageKey {
+ if x != nil {
+ return x.RequestMessageKey
+ }
+ return nil
+}
+
+func (x *SendPaymentMessage) GetBackground() *PaymentBackground {
+ if x != nil {
+ return x.Background
+ }
+ return nil
+}
+
+type RequestPaymentMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ NoteMessage *Message `protobuf:"bytes,4,opt,name=noteMessage" json:"noteMessage,omitempty"`
+ CurrencyCodeIso4217 *string `protobuf:"bytes,1,opt,name=currencyCodeIso4217" json:"currencyCodeIso4217,omitempty"`
+ Amount1000 *uint64 `protobuf:"varint,2,opt,name=amount1000" json:"amount1000,omitempty"`
+ RequestFrom *string `protobuf:"bytes,3,opt,name=requestFrom" json:"requestFrom,omitempty"`
+ ExpiryTimestamp *int64 `protobuf:"varint,5,opt,name=expiryTimestamp" json:"expiryTimestamp,omitempty"`
+ Amount *Money `protobuf:"bytes,6,opt,name=amount" json:"amount,omitempty"`
+ Background *PaymentBackground `protobuf:"bytes,7,opt,name=background" json:"background,omitempty"`
+}
+
+func (x *RequestPaymentMessage) Reset() {
+ *x = RequestPaymentMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[106]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RequestPaymentMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RequestPaymentMessage) ProtoMessage() {}
+
+func (x *RequestPaymentMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[106]
+ 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 RequestPaymentMessage.ProtoReflect.Descriptor instead.
+func (*RequestPaymentMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{106}
+}
+
+func (x *RequestPaymentMessage) GetNoteMessage() *Message {
+ if x != nil {
+ return x.NoteMessage
+ }
+ return nil
+}
+
+func (x *RequestPaymentMessage) GetCurrencyCodeIso4217() string {
+ if x != nil && x.CurrencyCodeIso4217 != nil {
+ return *x.CurrencyCodeIso4217
+ }
+ return ""
+}
+
+func (x *RequestPaymentMessage) GetAmount1000() uint64 {
+ if x != nil && x.Amount1000 != nil {
+ return *x.Amount1000
+ }
+ return 0
+}
+
+func (x *RequestPaymentMessage) GetRequestFrom() string {
+ if x != nil && x.RequestFrom != nil {
+ return *x.RequestFrom
+ }
+ return ""
+}
+
+func (x *RequestPaymentMessage) GetExpiryTimestamp() int64 {
+ if x != nil && x.ExpiryTimestamp != nil {
+ return *x.ExpiryTimestamp
+ }
+ return 0
+}
+
+func (x *RequestPaymentMessage) GetAmount() *Money {
+ if x != nil {
+ return x.Amount
+ }
+ return nil
+}
+
+func (x *RequestPaymentMessage) GetBackground() *PaymentBackground {
+ if x != nil {
+ return x.Background
+ }
+ return nil
+}
+
+type DeclinePaymentRequestMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+}
+
+func (x *DeclinePaymentRequestMessage) Reset() {
+ *x = DeclinePaymentRequestMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[107]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeclinePaymentRequestMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeclinePaymentRequestMessage) ProtoMessage() {}
+
+func (x *DeclinePaymentRequestMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[107]
+ 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 DeclinePaymentRequestMessage.ProtoReflect.Descriptor instead.
+func (*DeclinePaymentRequestMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{107}
+}
+
+func (x *DeclinePaymentRequestMessage) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+type CancelPaymentRequestMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+}
+
+func (x *CancelPaymentRequestMessage) Reset() {
+ *x = CancelPaymentRequestMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[108]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CancelPaymentRequestMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CancelPaymentRequestMessage) ProtoMessage() {}
+
+func (x *CancelPaymentRequestMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[108]
+ 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 CancelPaymentRequestMessage.ProtoReflect.Descriptor instead.
+func (*CancelPaymentRequestMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{108}
+}
+
+func (x *CancelPaymentRequestMessage) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+type PaymentInviteMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ServiceType *PaymentInviteMessage_PaymentInviteMessageServiceType `protobuf:"varint,1,opt,name=serviceType,enum=proto.PaymentInviteMessage_PaymentInviteMessageServiceType" json:"serviceType,omitempty"`
+ ExpiryTimestamp *int64 `protobuf:"varint,2,opt,name=expiryTimestamp" json:"expiryTimestamp,omitempty"`
+}
+
+func (x *PaymentInviteMessage) Reset() {
+ *x = PaymentInviteMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[109]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PaymentInviteMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaymentInviteMessage) ProtoMessage() {}
+
+func (x *PaymentInviteMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[109]
+ 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 PaymentInviteMessage.ProtoReflect.Descriptor instead.
+func (*PaymentInviteMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{109}
+}
+
+func (x *PaymentInviteMessage) GetServiceType() PaymentInviteMessage_PaymentInviteMessageServiceType {
+ if x != nil && x.ServiceType != nil {
+ return *x.ServiceType
+ }
+ return PaymentInviteMessage_UNKNOWN
+}
+
+func (x *PaymentInviteMessage) GetExpiryTimestamp() int64 {
+ if x != nil && x.ExpiryTimestamp != nil {
+ return *x.ExpiryTimestamp
+ }
+ return 0
+}
+
+type LiveLocationMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DegreesLatitude *float64 `protobuf:"fixed64,1,opt,name=degreesLatitude" json:"degreesLatitude,omitempty"`
+ DegreesLongitude *float64 `protobuf:"fixed64,2,opt,name=degreesLongitude" json:"degreesLongitude,omitempty"`
+ AccuracyInMeters *uint32 `protobuf:"varint,3,opt,name=accuracyInMeters" json:"accuracyInMeters,omitempty"`
+ SpeedInMps *float32 `protobuf:"fixed32,4,opt,name=speedInMps" json:"speedInMps,omitempty"`
+ DegreesClockwiseFromMagneticNorth *uint32 `protobuf:"varint,5,opt,name=degreesClockwiseFromMagneticNorth" json:"degreesClockwiseFromMagneticNorth,omitempty"`
+ Caption *string `protobuf:"bytes,6,opt,name=caption" json:"caption,omitempty"`
+ SequenceNumber *int64 `protobuf:"varint,7,opt,name=sequenceNumber" json:"sequenceNumber,omitempty"`
+ TimeOffset *uint32 `protobuf:"varint,8,opt,name=timeOffset" json:"timeOffset,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,16,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *LiveLocationMessage) Reset() {
+ *x = LiveLocationMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[110]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LiveLocationMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LiveLocationMessage) ProtoMessage() {}
+
+func (x *LiveLocationMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[110]
+ 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 LiveLocationMessage.ProtoReflect.Descriptor instead.
+func (*LiveLocationMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{110}
+}
+
+func (x *LiveLocationMessage) GetDegreesLatitude() float64 {
+ if x != nil && x.DegreesLatitude != nil {
+ return *x.DegreesLatitude
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetDegreesLongitude() float64 {
+ if x != nil && x.DegreesLongitude != nil {
+ return *x.DegreesLongitude
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetAccuracyInMeters() uint32 {
+ if x != nil && x.AccuracyInMeters != nil {
+ return *x.AccuracyInMeters
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetSpeedInMps() float32 {
+ if x != nil && x.SpeedInMps != nil {
+ return *x.SpeedInMps
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetDegreesClockwiseFromMagneticNorth() uint32 {
+ if x != nil && x.DegreesClockwiseFromMagneticNorth != nil {
+ return *x.DegreesClockwiseFromMagneticNorth
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetCaption() string {
+ if x != nil && x.Caption != nil {
+ return *x.Caption
+ }
+ return ""
+}
+
+func (x *LiveLocationMessage) GetSequenceNumber() int64 {
+ if x != nil && x.SequenceNumber != nil {
+ return *x.SequenceNumber
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetTimeOffset() uint32 {
+ if x != nil && x.TimeOffset != nil {
+ return *x.TimeOffset
+ }
+ return 0
+}
+
+func (x *LiveLocationMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *LiveLocationMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type StickerMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,2,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,3,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ MediaKey []byte `protobuf:"bytes,4,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ Mimetype *string `protobuf:"bytes,5,opt,name=mimetype" json:"mimetype,omitempty"`
+ Height *uint32 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"`
+ Width *uint32 `protobuf:"varint,7,opt,name=width" json:"width,omitempty"`
+ DirectPath *string `protobuf:"bytes,8,opt,name=directPath" json:"directPath,omitempty"`
+ FileLength *uint64 `protobuf:"varint,9,opt,name=fileLength" json:"fileLength,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,10,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ FirstFrameLength *uint32 `protobuf:"varint,11,opt,name=firstFrameLength" json:"firstFrameLength,omitempty"`
+ FirstFrameSidecar []byte `protobuf:"bytes,12,opt,name=firstFrameSidecar" json:"firstFrameSidecar,omitempty"`
+ IsAnimated *bool `protobuf:"varint,13,opt,name=isAnimated" json:"isAnimated,omitempty"`
+ PngThumbnail []byte `protobuf:"bytes,16,opt,name=pngThumbnail" json:"pngThumbnail,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *StickerMessage) Reset() {
+ *x = StickerMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[111]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StickerMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StickerMessage) ProtoMessage() {}
+
+func (x *StickerMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[111]
+ 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 StickerMessage.ProtoReflect.Descriptor instead.
+func (*StickerMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{111}
+}
+
+func (x *StickerMessage) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *StickerMessage) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *StickerMessage) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *StickerMessage) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *StickerMessage) GetMimetype() string {
+ if x != nil && x.Mimetype != nil {
+ return *x.Mimetype
+ }
+ return ""
+}
+
+func (x *StickerMessage) GetHeight() uint32 {
+ if x != nil && x.Height != nil {
+ return *x.Height
+ }
+ return 0
+}
+
+func (x *StickerMessage) GetWidth() uint32 {
+ if x != nil && x.Width != nil {
+ return *x.Width
+ }
+ return 0
+}
+
+func (x *StickerMessage) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+func (x *StickerMessage) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *StickerMessage) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *StickerMessage) GetFirstFrameLength() uint32 {
+ if x != nil && x.FirstFrameLength != nil {
+ return *x.FirstFrameLength
+ }
+ return 0
+}
+
+func (x *StickerMessage) GetFirstFrameSidecar() []byte {
+ if x != nil {
+ return x.FirstFrameSidecar
+ }
+ return nil
+}
+
+func (x *StickerMessage) GetIsAnimated() bool {
+ if x != nil && x.IsAnimated != nil {
+ return *x.IsAnimated
+ }
+ return false
+}
+
+func (x *StickerMessage) GetPngThumbnail() []byte {
+ if x != nil {
+ return x.PngThumbnail
+ }
+ return nil
+}
+
+func (x *StickerMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type FourRowTemplate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Content *HighlyStructuredMessage `protobuf:"bytes,6,opt,name=content" json:"content,omitempty"`
+ Footer *HighlyStructuredMessage `protobuf:"bytes,7,opt,name=footer" json:"footer,omitempty"`
+ Buttons []*TemplateButton `protobuf:"bytes,8,rep,name=buttons" json:"buttons,omitempty"`
+ // Types that are assignable to Title:
+ // *FourRowTemplate_DocumentMessage
+ // *FourRowTemplate_HighlyStructuredMessage
+ // *FourRowTemplate_ImageMessage
+ // *FourRowTemplate_VideoMessage
+ // *FourRowTemplate_LocationMessage
+ Title isFourRowTemplate_Title `protobuf_oneof:"title"`
+}
+
+func (x *FourRowTemplate) Reset() {
+ *x = FourRowTemplate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[112]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FourRowTemplate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FourRowTemplate) ProtoMessage() {}
+
+func (x *FourRowTemplate) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[112]
+ 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 FourRowTemplate.ProtoReflect.Descriptor instead.
+func (*FourRowTemplate) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{112}
+}
+
+func (x *FourRowTemplate) GetContent() *HighlyStructuredMessage {
+ if x != nil {
+ return x.Content
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetFooter() *HighlyStructuredMessage {
+ if x != nil {
+ return x.Footer
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetButtons() []*TemplateButton {
+ if x != nil {
+ return x.Buttons
+ }
+ return nil
+}
+
+func (m *FourRowTemplate) GetTitle() isFourRowTemplate_Title {
+ if m != nil {
+ return m.Title
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetDocumentMessage() *DocumentMessage {
+ if x, ok := x.GetTitle().(*FourRowTemplate_DocumentMessage); ok {
+ return x.DocumentMessage
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetHighlyStructuredMessage() *HighlyStructuredMessage {
+ if x, ok := x.GetTitle().(*FourRowTemplate_HighlyStructuredMessage); ok {
+ return x.HighlyStructuredMessage
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetImageMessage() *ImageMessage {
+ if x, ok := x.GetTitle().(*FourRowTemplate_ImageMessage); ok {
+ return x.ImageMessage
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetVideoMessage() *VideoMessage {
+ if x, ok := x.GetTitle().(*FourRowTemplate_VideoMessage); ok {
+ return x.VideoMessage
+ }
+ return nil
+}
+
+func (x *FourRowTemplate) GetLocationMessage() *LocationMessage {
+ if x, ok := x.GetTitle().(*FourRowTemplate_LocationMessage); ok {
+ return x.LocationMessage
+ }
+ return nil
+}
+
+type isFourRowTemplate_Title interface {
+ isFourRowTemplate_Title()
+}
+
+type FourRowTemplate_DocumentMessage struct {
+ DocumentMessage *DocumentMessage `protobuf:"bytes,1,opt,name=documentMessage,oneof"`
+}
+
+type FourRowTemplate_HighlyStructuredMessage struct {
+ HighlyStructuredMessage *HighlyStructuredMessage `protobuf:"bytes,2,opt,name=highlyStructuredMessage,oneof"`
+}
+
+type FourRowTemplate_ImageMessage struct {
+ ImageMessage *ImageMessage `protobuf:"bytes,3,opt,name=imageMessage,oneof"`
+}
+
+type FourRowTemplate_VideoMessage struct {
+ VideoMessage *VideoMessage `protobuf:"bytes,4,opt,name=videoMessage,oneof"`
+}
+
+type FourRowTemplate_LocationMessage struct {
+ LocationMessage *LocationMessage `protobuf:"bytes,5,opt,name=locationMessage,oneof"`
+}
+
+func (*FourRowTemplate_DocumentMessage) isFourRowTemplate_Title() {}
+
+func (*FourRowTemplate_HighlyStructuredMessage) isFourRowTemplate_Title() {}
+
+func (*FourRowTemplate_ImageMessage) isFourRowTemplate_Title() {}
+
+func (*FourRowTemplate_VideoMessage) isFourRowTemplate_Title() {}
+
+func (*FourRowTemplate_LocationMessage) isFourRowTemplate_Title() {}
+
+type HydratedFourRowTemplate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ HydratedContentText *string `protobuf:"bytes,6,opt,name=hydratedContentText" json:"hydratedContentText,omitempty"`
+ HydratedFooterText *string `protobuf:"bytes,7,opt,name=hydratedFooterText" json:"hydratedFooterText,omitempty"`
+ HydratedButtons []*HydratedTemplateButton `protobuf:"bytes,8,rep,name=hydratedButtons" json:"hydratedButtons,omitempty"`
+ TemplateId *string `protobuf:"bytes,9,opt,name=templateId" json:"templateId,omitempty"`
+ // Types that are assignable to Title:
+ // *HydratedFourRowTemplate_DocumentMessage
+ // *HydratedFourRowTemplate_HydratedTitleText
+ // *HydratedFourRowTemplate_ImageMessage
+ // *HydratedFourRowTemplate_VideoMessage
+ // *HydratedFourRowTemplate_LocationMessage
+ Title isHydratedFourRowTemplate_Title `protobuf_oneof:"title"`
+}
+
+func (x *HydratedFourRowTemplate) Reset() {
+ *x = HydratedFourRowTemplate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[113]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HydratedFourRowTemplate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HydratedFourRowTemplate) ProtoMessage() {}
+
+func (x *HydratedFourRowTemplate) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[113]
+ 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 HydratedFourRowTemplate.ProtoReflect.Descriptor instead.
+func (*HydratedFourRowTemplate) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{113}
+}
+
+func (x *HydratedFourRowTemplate) GetHydratedContentText() string {
+ if x != nil && x.HydratedContentText != nil {
+ return *x.HydratedContentText
+ }
+ return ""
+}
+
+func (x *HydratedFourRowTemplate) GetHydratedFooterText() string {
+ if x != nil && x.HydratedFooterText != nil {
+ return *x.HydratedFooterText
+ }
+ return ""
+}
+
+func (x *HydratedFourRowTemplate) GetHydratedButtons() []*HydratedTemplateButton {
+ if x != nil {
+ return x.HydratedButtons
+ }
+ return nil
+}
+
+func (x *HydratedFourRowTemplate) GetTemplateId() string {
+ if x != nil && x.TemplateId != nil {
+ return *x.TemplateId
+ }
+ return ""
+}
+
+func (m *HydratedFourRowTemplate) GetTitle() isHydratedFourRowTemplate_Title {
+ if m != nil {
+ return m.Title
+ }
+ return nil
+}
+
+func (x *HydratedFourRowTemplate) GetDocumentMessage() *DocumentMessage {
+ if x, ok := x.GetTitle().(*HydratedFourRowTemplate_DocumentMessage); ok {
+ return x.DocumentMessage
+ }
+ return nil
+}
+
+func (x *HydratedFourRowTemplate) GetHydratedTitleText() string {
+ if x, ok := x.GetTitle().(*HydratedFourRowTemplate_HydratedTitleText); ok {
+ return x.HydratedTitleText
+ }
+ return ""
+}
+
+func (x *HydratedFourRowTemplate) GetImageMessage() *ImageMessage {
+ if x, ok := x.GetTitle().(*HydratedFourRowTemplate_ImageMessage); ok {
+ return x.ImageMessage
+ }
+ return nil
+}
+
+func (x *HydratedFourRowTemplate) GetVideoMessage() *VideoMessage {
+ if x, ok := x.GetTitle().(*HydratedFourRowTemplate_VideoMessage); ok {
+ return x.VideoMessage
+ }
+ return nil
+}
+
+func (x *HydratedFourRowTemplate) GetLocationMessage() *LocationMessage {
+ if x, ok := x.GetTitle().(*HydratedFourRowTemplate_LocationMessage); ok {
+ return x.LocationMessage
+ }
+ return nil
+}
+
+type isHydratedFourRowTemplate_Title interface {
+ isHydratedFourRowTemplate_Title()
+}
+
+type HydratedFourRowTemplate_DocumentMessage struct {
+ DocumentMessage *DocumentMessage `protobuf:"bytes,1,opt,name=documentMessage,oneof"`
+}
+
+type HydratedFourRowTemplate_HydratedTitleText struct {
+ HydratedTitleText string `protobuf:"bytes,2,opt,name=hydratedTitleText,oneof"`
+}
+
+type HydratedFourRowTemplate_ImageMessage struct {
+ ImageMessage *ImageMessage `protobuf:"bytes,3,opt,name=imageMessage,oneof"`
+}
+
+type HydratedFourRowTemplate_VideoMessage struct {
+ VideoMessage *VideoMessage `protobuf:"bytes,4,opt,name=videoMessage,oneof"`
+}
+
+type HydratedFourRowTemplate_LocationMessage struct {
+ LocationMessage *LocationMessage `protobuf:"bytes,5,opt,name=locationMessage,oneof"`
+}
+
+func (*HydratedFourRowTemplate_DocumentMessage) isHydratedFourRowTemplate_Title() {}
+
+func (*HydratedFourRowTemplate_HydratedTitleText) isHydratedFourRowTemplate_Title() {}
+
+func (*HydratedFourRowTemplate_ImageMessage) isHydratedFourRowTemplate_Title() {}
+
+func (*HydratedFourRowTemplate_VideoMessage) isHydratedFourRowTemplate_Title() {}
+
+func (*HydratedFourRowTemplate_LocationMessage) isHydratedFourRowTemplate_Title() {}
+
+type TemplateMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContextInfo *ContextInfo `protobuf:"bytes,3,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ HydratedTemplate *HydratedFourRowTemplate `protobuf:"bytes,4,opt,name=hydratedTemplate" json:"hydratedTemplate,omitempty"`
+ // Types that are assignable to Format:
+ // *TemplateMessage_FourRowTemplate
+ // *TemplateMessage_HydratedFourRowTemplate
+ Format isTemplateMessage_Format `protobuf_oneof:"format"`
+}
+
+func (x *TemplateMessage) Reset() {
+ *x = TemplateMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[114]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TemplateMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TemplateMessage) ProtoMessage() {}
+
+func (x *TemplateMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[114]
+ 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 TemplateMessage.ProtoReflect.Descriptor instead.
+func (*TemplateMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{114}
+}
+
+func (x *TemplateMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *TemplateMessage) GetHydratedTemplate() *HydratedFourRowTemplate {
+ if x != nil {
+ return x.HydratedTemplate
+ }
+ return nil
+}
+
+func (m *TemplateMessage) GetFormat() isTemplateMessage_Format {
+ if m != nil {
+ return m.Format
+ }
+ return nil
+}
+
+func (x *TemplateMessage) GetFourRowTemplate() *FourRowTemplate {
+ if x, ok := x.GetFormat().(*TemplateMessage_FourRowTemplate); ok {
+ return x.FourRowTemplate
+ }
+ return nil
+}
+
+func (x *TemplateMessage) GetHydratedFourRowTemplate() *HydratedFourRowTemplate {
+ if x, ok := x.GetFormat().(*TemplateMessage_HydratedFourRowTemplate); ok {
+ return x.HydratedFourRowTemplate
+ }
+ return nil
+}
+
+type isTemplateMessage_Format interface {
+ isTemplateMessage_Format()
+}
+
+type TemplateMessage_FourRowTemplate struct {
+ FourRowTemplate *FourRowTemplate `protobuf:"bytes,1,opt,name=fourRowTemplate,oneof"`
+}
+
+type TemplateMessage_HydratedFourRowTemplate struct {
+ HydratedFourRowTemplate *HydratedFourRowTemplate `protobuf:"bytes,2,opt,name=hydratedFourRowTemplate,oneof"`
+}
+
+func (*TemplateMessage_FourRowTemplate) isTemplateMessage_Format() {}
+
+func (*TemplateMessage_HydratedFourRowTemplate) isTemplateMessage_Format() {}
+
+type TemplateButtonReplyMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SelectedId *string `protobuf:"bytes,1,opt,name=selectedId" json:"selectedId,omitempty"`
+ SelectedDisplayText *string `protobuf:"bytes,2,opt,name=selectedDisplayText" json:"selectedDisplayText,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,3,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ SelectedIndex *uint32 `protobuf:"varint,4,opt,name=selectedIndex" json:"selectedIndex,omitempty"`
+}
+
+func (x *TemplateButtonReplyMessage) Reset() {
+ *x = TemplateButtonReplyMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[115]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TemplateButtonReplyMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TemplateButtonReplyMessage) ProtoMessage() {}
+
+func (x *TemplateButtonReplyMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[115]
+ 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 TemplateButtonReplyMessage.ProtoReflect.Descriptor instead.
+func (*TemplateButtonReplyMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{115}
+}
+
+func (x *TemplateButtonReplyMessage) GetSelectedId() string {
+ if x != nil && x.SelectedId != nil {
+ return *x.SelectedId
+ }
+ return ""
+}
+
+func (x *TemplateButtonReplyMessage) GetSelectedDisplayText() string {
+ if x != nil && x.SelectedDisplayText != nil {
+ return *x.SelectedDisplayText
+ }
+ return ""
+}
+
+func (x *TemplateButtonReplyMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *TemplateButtonReplyMessage) GetSelectedIndex() uint32 {
+ if x != nil && x.SelectedIndex != nil {
+ return *x.SelectedIndex
+ }
+ return 0
+}
+
+type CatalogSnapshot struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CatalogImage *ImageMessage `protobuf:"bytes,1,opt,name=catalogImage" json:"catalogImage,omitempty"`
+ Title *string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
+ Description *string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
+}
+
+func (x *CatalogSnapshot) Reset() {
+ *x = CatalogSnapshot{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[116]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CatalogSnapshot) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CatalogSnapshot) ProtoMessage() {}
+
+func (x *CatalogSnapshot) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[116]
+ 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 CatalogSnapshot.ProtoReflect.Descriptor instead.
+func (*CatalogSnapshot) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{116}
+}
+
+func (x *CatalogSnapshot) GetCatalogImage() *ImageMessage {
+ if x != nil {
+ return x.CatalogImage
+ }
+ return nil
+}
+
+func (x *CatalogSnapshot) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *CatalogSnapshot) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+type ProductSnapshot struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ProductImage *ImageMessage `protobuf:"bytes,1,opt,name=productImage" json:"productImage,omitempty"`
+ ProductId *string `protobuf:"bytes,2,opt,name=productId" json:"productId,omitempty"`
+ Title *string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"`
+ Description *string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
+ CurrencyCode *string `protobuf:"bytes,5,opt,name=currencyCode" json:"currencyCode,omitempty"`
+ PriceAmount1000 *int64 `protobuf:"varint,6,opt,name=priceAmount1000" json:"priceAmount1000,omitempty"`
+ RetailerId *string `protobuf:"bytes,7,opt,name=retailerId" json:"retailerId,omitempty"`
+ Url *string `protobuf:"bytes,8,opt,name=url" json:"url,omitempty"`
+ ProductImageCount *uint32 `protobuf:"varint,9,opt,name=productImageCount" json:"productImageCount,omitempty"`
+ FirstImageId *string `protobuf:"bytes,11,opt,name=firstImageId" json:"firstImageId,omitempty"`
+ SalePriceAmount1000 *int64 `protobuf:"varint,12,opt,name=salePriceAmount1000" json:"salePriceAmount1000,omitempty"`
+}
+
+func (x *ProductSnapshot) Reset() {
+ *x = ProductSnapshot{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[117]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProductSnapshot) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProductSnapshot) ProtoMessage() {}
+
+func (x *ProductSnapshot) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[117]
+ 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 ProductSnapshot.ProtoReflect.Descriptor instead.
+func (*ProductSnapshot) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{117}
+}
+
+func (x *ProductSnapshot) GetProductImage() *ImageMessage {
+ if x != nil {
+ return x.ProductImage
+ }
+ return nil
+}
+
+func (x *ProductSnapshot) GetProductId() string {
+ if x != nil && x.ProductId != nil {
+ return *x.ProductId
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetCurrencyCode() string {
+ if x != nil && x.CurrencyCode != nil {
+ return *x.CurrencyCode
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetPriceAmount1000() int64 {
+ if x != nil && x.PriceAmount1000 != nil {
+ return *x.PriceAmount1000
+ }
+ return 0
+}
+
+func (x *ProductSnapshot) GetRetailerId() string {
+ if x != nil && x.RetailerId != nil {
+ return *x.RetailerId
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetProductImageCount() uint32 {
+ if x != nil && x.ProductImageCount != nil {
+ return *x.ProductImageCount
+ }
+ return 0
+}
+
+func (x *ProductSnapshot) GetFirstImageId() string {
+ if x != nil && x.FirstImageId != nil {
+ return *x.FirstImageId
+ }
+ return ""
+}
+
+func (x *ProductSnapshot) GetSalePriceAmount1000() int64 {
+ if x != nil && x.SalePriceAmount1000 != nil {
+ return *x.SalePriceAmount1000
+ }
+ return 0
+}
+
+type ProductMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Product *ProductSnapshot `protobuf:"bytes,1,opt,name=product" json:"product,omitempty"`
+ BusinessOwnerJid *string `protobuf:"bytes,2,opt,name=businessOwnerJid" json:"businessOwnerJid,omitempty"`
+ Catalog *CatalogSnapshot `protobuf:"bytes,4,opt,name=catalog" json:"catalog,omitempty"`
+ Body *string `protobuf:"bytes,5,opt,name=body" json:"body,omitempty"`
+ Footer *string `protobuf:"bytes,6,opt,name=footer" json:"footer,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *ProductMessage) Reset() {
+ *x = ProductMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[118]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProductMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProductMessage) ProtoMessage() {}
+
+func (x *ProductMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[118]
+ 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 ProductMessage.ProtoReflect.Descriptor instead.
+func (*ProductMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{118}
+}
+
+func (x *ProductMessage) GetProduct() *ProductSnapshot {
+ if x != nil {
+ return x.Product
+ }
+ return nil
+}
+
+func (x *ProductMessage) GetBusinessOwnerJid() string {
+ if x != nil && x.BusinessOwnerJid != nil {
+ return *x.BusinessOwnerJid
+ }
+ return ""
+}
+
+func (x *ProductMessage) GetCatalog() *CatalogSnapshot {
+ if x != nil {
+ return x.Catalog
+ }
+ return nil
+}
+
+func (x *ProductMessage) GetBody() string {
+ if x != nil && x.Body != nil {
+ return *x.Body
+ }
+ return ""
+}
+
+func (x *ProductMessage) GetFooter() string {
+ if x != nil && x.Footer != nil {
+ return *x.Footer
+ }
+ return ""
+}
+
+func (x *ProductMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type OrderMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OrderId *string `protobuf:"bytes,1,opt,name=orderId" json:"orderId,omitempty"`
+ Thumbnail []byte `protobuf:"bytes,2,opt,name=thumbnail" json:"thumbnail,omitempty"`
+ ItemCount *int32 `protobuf:"varint,3,opt,name=itemCount" json:"itemCount,omitempty"`
+ Status *OrderMessage_OrderMessageOrderStatus `protobuf:"varint,4,opt,name=status,enum=proto.OrderMessage_OrderMessageOrderStatus" json:"status,omitempty"`
+ Surface *OrderMessage_OrderMessageOrderSurface `protobuf:"varint,5,opt,name=surface,enum=proto.OrderMessage_OrderMessageOrderSurface" json:"surface,omitempty"`
+ Message *string `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
+ OrderTitle *string `protobuf:"bytes,7,opt,name=orderTitle" json:"orderTitle,omitempty"`
+ SellerJid *string `protobuf:"bytes,8,opt,name=sellerJid" json:"sellerJid,omitempty"`
+ Token *string `protobuf:"bytes,9,opt,name=token" json:"token,omitempty"`
+ TotalAmount1000 *int64 `protobuf:"varint,10,opt,name=totalAmount1000" json:"totalAmount1000,omitempty"`
+ TotalCurrencyCode *string `protobuf:"bytes,11,opt,name=totalCurrencyCode" json:"totalCurrencyCode,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *OrderMessage) Reset() {
+ *x = OrderMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[119]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrderMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrderMessage) ProtoMessage() {}
+
+func (x *OrderMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[119]
+ 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 OrderMessage.ProtoReflect.Descriptor instead.
+func (*OrderMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{119}
+}
+
+func (x *OrderMessage) GetOrderId() string {
+ if x != nil && x.OrderId != nil {
+ return *x.OrderId
+ }
+ return ""
+}
+
+func (x *OrderMessage) GetThumbnail() []byte {
+ if x != nil {
+ return x.Thumbnail
+ }
+ return nil
+}
+
+func (x *OrderMessage) GetItemCount() int32 {
+ if x != nil && x.ItemCount != nil {
+ return *x.ItemCount
+ }
+ return 0
+}
+
+func (x *OrderMessage) GetStatus() OrderMessage_OrderMessageOrderStatus {
+ if x != nil && x.Status != nil {
+ return *x.Status
+ }
+ return OrderMessage_INQUIRY
+}
+
+func (x *OrderMessage) GetSurface() OrderMessage_OrderMessageOrderSurface {
+ if x != nil && x.Surface != nil {
+ return *x.Surface
+ }
+ return OrderMessage_CATALOG
+}
+
+func (x *OrderMessage) GetMessage() string {
+ if x != nil && x.Message != nil {
+ return *x.Message
+ }
+ return ""
+}
+
+func (x *OrderMessage) GetOrderTitle() string {
+ if x != nil && x.OrderTitle != nil {
+ return *x.OrderTitle
+ }
+ return ""
+}
+
+func (x *OrderMessage) GetSellerJid() string {
+ if x != nil && x.SellerJid != nil {
+ return *x.SellerJid
+ }
+ return ""
+}
+
+func (x *OrderMessage) GetToken() string {
+ if x != nil && x.Token != nil {
+ return *x.Token
+ }
+ return ""
+}
+
+func (x *OrderMessage) GetTotalAmount1000() int64 {
+ if x != nil && x.TotalAmount1000 != nil {
+ return *x.TotalAmount1000
+ }
+ return 0
+}
+
+func (x *OrderMessage) GetTotalCurrencyCode() string {
+ if x != nil && x.TotalCurrencyCode != nil {
+ return *x.TotalCurrencyCode
+ }
+ return ""
+}
+
+func (x *OrderMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type Row struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ Description *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
+ RowId *string `protobuf:"bytes,3,opt,name=rowId" json:"rowId,omitempty"`
+}
+
+func (x *Row) Reset() {
+ *x = Row{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[120]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Row) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Row) ProtoMessage() {}
+
+func (x *Row) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[120]
+ 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 Row.ProtoReflect.Descriptor instead.
+func (*Row) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{120}
+}
+
+func (x *Row) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *Row) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *Row) GetRowId() string {
+ if x != nil && x.RowId != nil {
+ return *x.RowId
+ }
+ return ""
+}
+
+type Section struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ Rows []*Row `protobuf:"bytes,2,rep,name=rows" json:"rows,omitempty"`
+}
+
+func (x *Section) Reset() {
+ *x = Section{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[121]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Section) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Section) ProtoMessage() {}
+
+func (x *Section) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[121]
+ 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 Section.ProtoReflect.Descriptor instead.
+func (*Section) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{121}
+}
+
+func (x *Section) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *Section) GetRows() []*Row {
+ if x != nil {
+ return x.Rows
+ }
+ return nil
+}
+
+type Product struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ProductId *string `protobuf:"bytes,1,opt,name=productId" json:"productId,omitempty"`
+}
+
+func (x *Product) Reset() {
+ *x = Product{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[122]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Product) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Product) ProtoMessage() {}
+
+func (x *Product) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[122]
+ 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 Product.ProtoReflect.Descriptor instead.
+func (*Product) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{122}
+}
+
+func (x *Product) GetProductId() string {
+ if x != nil && x.ProductId != nil {
+ return *x.ProductId
+ }
+ return ""
+}
+
+type ProductSection struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ Products []*Product `protobuf:"bytes,2,rep,name=products" json:"products,omitempty"`
+}
+
+func (x *ProductSection) Reset() {
+ *x = ProductSection{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[123]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProductSection) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProductSection) ProtoMessage() {}
+
+func (x *ProductSection) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[123]
+ 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 ProductSection.ProtoReflect.Descriptor instead.
+func (*ProductSection) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{123}
+}
+
+func (x *ProductSection) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *ProductSection) GetProducts() []*Product {
+ if x != nil {
+ return x.Products
+ }
+ return nil
+}
+
+type ProductListHeaderImage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ProductId *string `protobuf:"bytes,1,opt,name=productId" json:"productId,omitempty"`
+ JpegThumbnail []byte `protobuf:"bytes,2,opt,name=jpegThumbnail" json:"jpegThumbnail,omitempty"`
+}
+
+func (x *ProductListHeaderImage) Reset() {
+ *x = ProductListHeaderImage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[124]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProductListHeaderImage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProductListHeaderImage) ProtoMessage() {}
+
+func (x *ProductListHeaderImage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[124]
+ 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 ProductListHeaderImage.ProtoReflect.Descriptor instead.
+func (*ProductListHeaderImage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{124}
+}
+
+func (x *ProductListHeaderImage) GetProductId() string {
+ if x != nil && x.ProductId != nil {
+ return *x.ProductId
+ }
+ return ""
+}
+
+func (x *ProductListHeaderImage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+type ProductListInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ProductSections []*ProductSection `protobuf:"bytes,1,rep,name=productSections" json:"productSections,omitempty"`
+ HeaderImage *ProductListHeaderImage `protobuf:"bytes,2,opt,name=headerImage" json:"headerImage,omitempty"`
+ BusinessOwnerJid *string `protobuf:"bytes,3,opt,name=businessOwnerJid" json:"businessOwnerJid,omitempty"`
+}
+
+func (x *ProductListInfo) Reset() {
+ *x = ProductListInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[125]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProductListInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProductListInfo) ProtoMessage() {}
+
+func (x *ProductListInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[125]
+ 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 ProductListInfo.ProtoReflect.Descriptor instead.
+func (*ProductListInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{125}
+}
+
+func (x *ProductListInfo) GetProductSections() []*ProductSection {
+ if x != nil {
+ return x.ProductSections
+ }
+ return nil
+}
+
+func (x *ProductListInfo) GetHeaderImage() *ProductListHeaderImage {
+ if x != nil {
+ return x.HeaderImage
+ }
+ return nil
+}
+
+func (x *ProductListInfo) GetBusinessOwnerJid() string {
+ if x != nil && x.BusinessOwnerJid != nil {
+ return *x.BusinessOwnerJid
+ }
+ return ""
+}
+
+type ListMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ Description *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
+ ButtonText *string `protobuf:"bytes,3,opt,name=buttonText" json:"buttonText,omitempty"`
+ ListType *ListMessage_ListMessageListType `protobuf:"varint,4,opt,name=listType,enum=proto.ListMessage_ListMessageListType" json:"listType,omitempty"`
+ Sections []*Section `protobuf:"bytes,5,rep,name=sections" json:"sections,omitempty"`
+ ProductListInfo *ProductListInfo `protobuf:"bytes,6,opt,name=productListInfo" json:"productListInfo,omitempty"`
+ FooterText *string `protobuf:"bytes,7,opt,name=footerText" json:"footerText,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,8,opt,name=contextInfo" json:"contextInfo,omitempty"`
+}
+
+func (x *ListMessage) Reset() {
+ *x = ListMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[126]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListMessage) ProtoMessage() {}
+
+func (x *ListMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[126]
+ 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 ListMessage.ProtoReflect.Descriptor instead.
+func (*ListMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{126}
+}
+
+func (x *ListMessage) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *ListMessage) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *ListMessage) GetButtonText() string {
+ if x != nil && x.ButtonText != nil {
+ return *x.ButtonText
+ }
+ return ""
+}
+
+func (x *ListMessage) GetListType() ListMessage_ListMessageListType {
+ if x != nil && x.ListType != nil {
+ return *x.ListType
+ }
+ return ListMessage_UNKNOWN
+}
+
+func (x *ListMessage) GetSections() []*Section {
+ if x != nil {
+ return x.Sections
+ }
+ return nil
+}
+
+func (x *ListMessage) GetProductListInfo() *ProductListInfo {
+ if x != nil {
+ return x.ProductListInfo
+ }
+ return nil
+}
+
+func (x *ListMessage) GetFooterText() string {
+ if x != nil && x.FooterText != nil {
+ return *x.FooterText
+ }
+ return ""
+}
+
+func (x *ListMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+type SingleSelectReply struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SelectedRowId *string `protobuf:"bytes,1,opt,name=selectedRowId" json:"selectedRowId,omitempty"`
+}
+
+func (x *SingleSelectReply) Reset() {
+ *x = SingleSelectReply{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[127]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SingleSelectReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SingleSelectReply) ProtoMessage() {}
+
+func (x *SingleSelectReply) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[127]
+ 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 SingleSelectReply.ProtoReflect.Descriptor instead.
+func (*SingleSelectReply) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{127}
+}
+
+func (x *SingleSelectReply) GetSelectedRowId() string {
+ if x != nil && x.SelectedRowId != nil {
+ return *x.SelectedRowId
+ }
+ return ""
+}
+
+type ListResponseMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ ListType *ListResponseMessage_ListResponseMessageListType `protobuf:"varint,2,opt,name=listType,enum=proto.ListResponseMessage_ListResponseMessageListType" json:"listType,omitempty"`
+ SingleSelectReply *SingleSelectReply `protobuf:"bytes,3,opt,name=singleSelectReply" json:"singleSelectReply,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,4,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ Description *string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
+}
+
+func (x *ListResponseMessage) Reset() {
+ *x = ListResponseMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[128]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListResponseMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResponseMessage) ProtoMessage() {}
+
+func (x *ListResponseMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[128]
+ 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 ListResponseMessage.ProtoReflect.Descriptor instead.
+func (*ListResponseMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{128}
+}
+
+func (x *ListResponseMessage) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *ListResponseMessage) GetListType() ListResponseMessage_ListResponseMessageListType {
+ if x != nil && x.ListType != nil {
+ return *x.ListType
+ }
+ return ListResponseMessage_UNKNOWN
+}
+
+func (x *ListResponseMessage) GetSingleSelectReply() *SingleSelectReply {
+ if x != nil {
+ return x.SingleSelectReply
+ }
+ return nil
+}
+
+func (x *ListResponseMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *ListResponseMessage) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+type Header struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
+ Subtitle *string `protobuf:"bytes,2,opt,name=subtitle" json:"subtitle,omitempty"`
+ HasMediaAttachment *bool `protobuf:"varint,5,opt,name=hasMediaAttachment" json:"hasMediaAttachment,omitempty"`
+ // Types that are assignable to Media:
+ // *Header_DocumentMessage
+ // *Header_ImageMessage
+ // *Header_JpegThumbnail
+ // *Header_VideoMessage
+ Media isHeader_Media `protobuf_oneof:"media"`
+}
+
+func (x *Header) Reset() {
+ *x = Header{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[129]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Header) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Header) ProtoMessage() {}
+
+func (x *Header) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[129]
+ 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 Header.ProtoReflect.Descriptor instead.
+func (*Header) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{129}
+}
+
+func (x *Header) GetTitle() string {
+ if x != nil && x.Title != nil {
+ return *x.Title
+ }
+ return ""
+}
+
+func (x *Header) GetSubtitle() string {
+ if x != nil && x.Subtitle != nil {
+ return *x.Subtitle
+ }
+ return ""
+}
+
+func (x *Header) GetHasMediaAttachment() bool {
+ if x != nil && x.HasMediaAttachment != nil {
+ return *x.HasMediaAttachment
+ }
+ return false
+}
+
+func (m *Header) GetMedia() isHeader_Media {
+ if m != nil {
+ return m.Media
+ }
+ return nil
+}
+
+func (x *Header) GetDocumentMessage() *DocumentMessage {
+ if x, ok := x.GetMedia().(*Header_DocumentMessage); ok {
+ return x.DocumentMessage
+ }
+ return nil
+}
+
+func (x *Header) GetImageMessage() *ImageMessage {
+ if x, ok := x.GetMedia().(*Header_ImageMessage); ok {
+ return x.ImageMessage
+ }
+ return nil
+}
+
+func (x *Header) GetJpegThumbnail() []byte {
+ if x, ok := x.GetMedia().(*Header_JpegThumbnail); ok {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *Header) GetVideoMessage() *VideoMessage {
+ if x, ok := x.GetMedia().(*Header_VideoMessage); ok {
+ return x.VideoMessage
+ }
+ return nil
+}
+
+type isHeader_Media interface {
+ isHeader_Media()
+}
+
+type Header_DocumentMessage struct {
+ DocumentMessage *DocumentMessage `protobuf:"bytes,3,opt,name=documentMessage,oneof"`
+}
+
+type Header_ImageMessage struct {
+ ImageMessage *ImageMessage `protobuf:"bytes,4,opt,name=imageMessage,oneof"`
+}
+
+type Header_JpegThumbnail struct {
+ JpegThumbnail []byte `protobuf:"bytes,6,opt,name=jpegThumbnail,oneof"`
+}
+
+type Header_VideoMessage struct {
+ VideoMessage *VideoMessage `protobuf:"bytes,7,opt,name=videoMessage,oneof"`
+}
+
+func (*Header_DocumentMessage) isHeader_Media() {}
+
+func (*Header_ImageMessage) isHeader_Media() {}
+
+func (*Header_JpegThumbnail) isHeader_Media() {}
+
+func (*Header_VideoMessage) isHeader_Media() {}
+
+type Body struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
+}
+
+func (x *Body) Reset() {
+ *x = Body{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[130]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Body) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Body) ProtoMessage() {}
+
+func (x *Body) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[130]
+ 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 Body.ProtoReflect.Descriptor instead.
+func (*Body) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{130}
+}
+
+func (x *Body) GetText() string {
+ if x != nil && x.Text != nil {
+ return *x.Text
+ }
+ return ""
+}
+
+type Footer struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Text *string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
+}
+
+func (x *Footer) Reset() {
+ *x = Footer{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[131]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Footer) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Footer) ProtoMessage() {}
+
+func (x *Footer) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[131]
+ 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 Footer.ProtoReflect.Descriptor instead.
+func (*Footer) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{131}
+}
+
+func (x *Footer) GetText() string {
+ if x != nil && x.Text != nil {
+ return *x.Text
+ }
+ return ""
+}
+
+type ShopMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
+ Surface *ShopMessage_ShopMessageSurface `protobuf:"varint,2,opt,name=surface,enum=proto.ShopMessage_ShopMessageSurface" json:"surface,omitempty"`
+ MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"`
+}
+
+func (x *ShopMessage) Reset() {
+ *x = ShopMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[132]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ShopMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ShopMessage) ProtoMessage() {}
+
+func (x *ShopMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[132]
+ 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 ShopMessage.ProtoReflect.Descriptor instead.
+func (*ShopMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{132}
+}
+
+func (x *ShopMessage) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+func (x *ShopMessage) GetSurface() ShopMessage_ShopMessageSurface {
+ if x != nil && x.Surface != nil {
+ return *x.Surface
+ }
+ return ShopMessage_UNKNOWN_SURFACE
+}
+
+func (x *ShopMessage) GetMessageVersion() int32 {
+ if x != nil && x.MessageVersion != nil {
+ return *x.MessageVersion
+ }
+ return 0
+}
+
+type CollectionMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ BizJid *string `protobuf:"bytes,1,opt,name=bizJid" json:"bizJid,omitempty"`
+ Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
+ MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"`
+}
+
+func (x *CollectionMessage) Reset() {
+ *x = CollectionMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[133]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CollectionMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CollectionMessage) ProtoMessage() {}
+
+func (x *CollectionMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[133]
+ 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 CollectionMessage.ProtoReflect.Descriptor instead.
+func (*CollectionMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{133}
+}
+
+func (x *CollectionMessage) GetBizJid() string {
+ if x != nil && x.BizJid != nil {
+ return *x.BizJid
+ }
+ return ""
+}
+
+func (x *CollectionMessage) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+func (x *CollectionMessage) GetMessageVersion() int32 {
+ if x != nil && x.MessageVersion != nil {
+ return *x.MessageVersion
+ }
+ return 0
+}
+
+type NativeFlowButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ ButtonParamsJson *string `protobuf:"bytes,2,opt,name=buttonParamsJson" json:"buttonParamsJson,omitempty"`
+}
+
+func (x *NativeFlowButton) Reset() {
+ *x = NativeFlowButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[134]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NativeFlowButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NativeFlowButton) ProtoMessage() {}
+
+func (x *NativeFlowButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[134]
+ 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 NativeFlowButton.ProtoReflect.Descriptor instead.
+func (*NativeFlowButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{134}
+}
+
+func (x *NativeFlowButton) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *NativeFlowButton) GetButtonParamsJson() string {
+ if x != nil && x.ButtonParamsJson != nil {
+ return *x.ButtonParamsJson
+ }
+ return ""
+}
+
+type NativeFlowMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Buttons []*NativeFlowButton `protobuf:"bytes,1,rep,name=buttons" json:"buttons,omitempty"`
+ MessageParamsJson *string `protobuf:"bytes,2,opt,name=messageParamsJson" json:"messageParamsJson,omitempty"`
+ MessageVersion *int32 `protobuf:"varint,3,opt,name=messageVersion" json:"messageVersion,omitempty"`
+}
+
+func (x *NativeFlowMessage) Reset() {
+ *x = NativeFlowMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[135]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NativeFlowMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NativeFlowMessage) ProtoMessage() {}
+
+func (x *NativeFlowMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[135]
+ 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 NativeFlowMessage.ProtoReflect.Descriptor instead.
+func (*NativeFlowMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{135}
+}
+
+func (x *NativeFlowMessage) GetButtons() []*NativeFlowButton {
+ if x != nil {
+ return x.Buttons
+ }
+ return nil
+}
+
+func (x *NativeFlowMessage) GetMessageParamsJson() string {
+ if x != nil && x.MessageParamsJson != nil {
+ return *x.MessageParamsJson
+ }
+ return ""
+}
+
+func (x *NativeFlowMessage) GetMessageVersion() int32 {
+ if x != nil && x.MessageVersion != nil {
+ return *x.MessageVersion
+ }
+ return 0
+}
+
+type InteractiveMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Header *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
+ Body *Body `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"`
+ Footer *Footer `protobuf:"bytes,3,opt,name=footer" json:"footer,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,15,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ // Types that are assignable to InteractiveMessage:
+ // *InteractiveMessage_ShopStorefrontMessage
+ // *InteractiveMessage_CollectionMessage
+ // *InteractiveMessage_NativeFlowMessage
+ InteractiveMessage isInteractiveMessage_InteractiveMessage `protobuf_oneof:"interactiveMessage"`
+}
+
+func (x *InteractiveMessage) Reset() {
+ *x = InteractiveMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[136]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InteractiveMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InteractiveMessage) ProtoMessage() {}
+
+func (x *InteractiveMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[136]
+ 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 InteractiveMessage.ProtoReflect.Descriptor instead.
+func (*InteractiveMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{136}
+}
+
+func (x *InteractiveMessage) GetHeader() *Header {
+ if x != nil {
+ return x.Header
+ }
+ return nil
+}
+
+func (x *InteractiveMessage) GetBody() *Body {
+ if x != nil {
+ return x.Body
+ }
+ return nil
+}
+
+func (x *InteractiveMessage) GetFooter() *Footer {
+ if x != nil {
+ return x.Footer
+ }
+ return nil
+}
+
+func (x *InteractiveMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (m *InteractiveMessage) GetInteractiveMessage() isInteractiveMessage_InteractiveMessage {
+ if m != nil {
+ return m.InteractiveMessage
+ }
+ return nil
+}
+
+func (x *InteractiveMessage) GetShopStorefrontMessage() *ShopMessage {
+ if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_ShopStorefrontMessage); ok {
+ return x.ShopStorefrontMessage
+ }
+ return nil
+}
+
+func (x *InteractiveMessage) GetCollectionMessage() *CollectionMessage {
+ if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_CollectionMessage); ok {
+ return x.CollectionMessage
+ }
+ return nil
+}
+
+func (x *InteractiveMessage) GetNativeFlowMessage() *NativeFlowMessage {
+ if x, ok := x.GetInteractiveMessage().(*InteractiveMessage_NativeFlowMessage); ok {
+ return x.NativeFlowMessage
+ }
+ return nil
+}
+
+type isInteractiveMessage_InteractiveMessage interface {
+ isInteractiveMessage_InteractiveMessage()
+}
+
+type InteractiveMessage_ShopStorefrontMessage struct {
+ ShopStorefrontMessage *ShopMessage `protobuf:"bytes,4,opt,name=shopStorefrontMessage,oneof"`
+}
+
+type InteractiveMessage_CollectionMessage struct {
+ CollectionMessage *CollectionMessage `protobuf:"bytes,5,opt,name=collectionMessage,oneof"`
+}
+
+type InteractiveMessage_NativeFlowMessage struct {
+ NativeFlowMessage *NativeFlowMessage `protobuf:"bytes,6,opt,name=nativeFlowMessage,oneof"`
+}
+
+func (*InteractiveMessage_ShopStorefrontMessage) isInteractiveMessage_InteractiveMessage() {}
+
+func (*InteractiveMessage_CollectionMessage) isInteractiveMessage_InteractiveMessage() {}
+
+func (*InteractiveMessage_NativeFlowMessage) isInteractiveMessage_InteractiveMessage() {}
+
+type GroupInviteMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ 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 *string `protobuf:"bytes,6,opt,name=caption" json:"caption,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,7,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ GroupType *GroupInviteMessage_GroupInviteMessageGroupType `protobuf:"varint,8,opt,name=groupType,enum=proto.GroupInviteMessage_GroupInviteMessageGroupType" json:"groupType,omitempty"`
+}
+
+func (x *GroupInviteMessage) Reset() {
+ *x = GroupInviteMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[137]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GroupInviteMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GroupInviteMessage) ProtoMessage() {}
+
+func (x *GroupInviteMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[137]
+ 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 GroupInviteMessage.ProtoReflect.Descriptor instead.
+func (*GroupInviteMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{137}
+}
+
+func (x *GroupInviteMessage) GetGroupJid() string {
+ if x != nil && x.GroupJid != nil {
+ return *x.GroupJid
+ }
+ return ""
+}
+
+func (x *GroupInviteMessage) GetInviteCode() string {
+ if x != nil && x.InviteCode != nil {
+ return *x.InviteCode
+ }
+ return ""
+}
+
+func (x *GroupInviteMessage) GetInviteExpiration() int64 {
+ if x != nil && x.InviteExpiration != nil {
+ return *x.InviteExpiration
+ }
+ return 0
+}
+
+func (x *GroupInviteMessage) GetGroupName() string {
+ if x != nil && x.GroupName != nil {
+ return *x.GroupName
+ }
+ return ""
+}
+
+func (x *GroupInviteMessage) GetJpegThumbnail() []byte {
+ if x != nil {
+ return x.JpegThumbnail
+ }
+ return nil
+}
+
+func (x *GroupInviteMessage) GetCaption() string {
+ if x != nil && x.Caption != nil {
+ return *x.Caption
+ }
+ return ""
+}
+
+func (x *GroupInviteMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *GroupInviteMessage) GetGroupType() GroupInviteMessage_GroupInviteMessageGroupType {
+ if x != nil && x.GroupType != nil {
+ return *x.GroupType
+ }
+ return GroupInviteMessage_DEFAULT
+}
+
+type DeviceSentMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DestinationJid *string `protobuf:"bytes,1,opt,name=destinationJid" json:"destinationJid,omitempty"`
+ Message *Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
+ Phash *string `protobuf:"bytes,3,opt,name=phash" json:"phash,omitempty"`
+}
+
+func (x *DeviceSentMessage) Reset() {
+ *x = DeviceSentMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[138]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceSentMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceSentMessage) ProtoMessage() {}
+
+func (x *DeviceSentMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[138]
+ 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 DeviceSentMessage.ProtoReflect.Descriptor instead.
+func (*DeviceSentMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{138}
+}
+
+func (x *DeviceSentMessage) GetDestinationJid() string {
+ if x != nil && x.DestinationJid != nil {
+ return *x.DestinationJid
+ }
+ return ""
+}
+
+func (x *DeviceSentMessage) GetMessage() *Message {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+func (x *DeviceSentMessage) GetPhash() string {
+ if x != nil && x.Phash != nil {
+ return *x.Phash
+ }
+ return ""
+}
+
+type FutureProofMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Message *Message `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
+}
+
+func (x *FutureProofMessage) Reset() {
+ *x = FutureProofMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[139]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FutureProofMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FutureProofMessage) ProtoMessage() {}
+
+func (x *FutureProofMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[139]
+ 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 FutureProofMessage.ProtoReflect.Descriptor instead.
+func (*FutureProofMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{139}
+}
+
+func (x *FutureProofMessage) GetMessage() *Message {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+type ButtonText struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *string `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+}
+
+func (x *ButtonText) Reset() {
+ *x = ButtonText{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[140]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ButtonText) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ButtonText) ProtoMessage() {}
+
+func (x *ButtonText) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[140]
+ 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 ButtonText.ProtoReflect.Descriptor instead.
+func (*ButtonText) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{140}
+}
+
+func (x *ButtonText) GetDisplayText() string {
+ if x != nil && x.DisplayText != nil {
+ return *x.DisplayText
+ }
+ return ""
+}
+
+type NativeFlowInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ ParamsJson *string `protobuf:"bytes,2,opt,name=paramsJson" json:"paramsJson,omitempty"`
+}
+
+func (x *NativeFlowInfo) Reset() {
+ *x = NativeFlowInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[141]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NativeFlowInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NativeFlowInfo) ProtoMessage() {}
+
+func (x *NativeFlowInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[141]
+ 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 NativeFlowInfo.ProtoReflect.Descriptor instead.
+func (*NativeFlowInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{141}
+}
+
+func (x *NativeFlowInfo) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *NativeFlowInfo) GetParamsJson() string {
+ if x != nil && x.ParamsJson != nil {
+ return *x.ParamsJson
+ }
+ return ""
+}
+
+type Button struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ButtonId *string `protobuf:"bytes,1,opt,name=buttonId" json:"buttonId,omitempty"`
+ ButtonText *ButtonText `protobuf:"bytes,2,opt,name=buttonText" json:"buttonText,omitempty"`
+ Type *Button_ButtonType `protobuf:"varint,3,opt,name=type,enum=proto.Button_ButtonType" json:"type,omitempty"`
+ NativeFlowInfo *NativeFlowInfo `protobuf:"bytes,4,opt,name=nativeFlowInfo" json:"nativeFlowInfo,omitempty"`
+}
+
+func (x *Button) Reset() {
+ *x = Button{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[142]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Button) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Button) ProtoMessage() {}
+
+func (x *Button) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[142]
+ 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 Button.ProtoReflect.Descriptor instead.
+func (*Button) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{142}
+}
+
+func (x *Button) GetButtonId() string {
+ if x != nil && x.ButtonId != nil {
+ return *x.ButtonId
+ }
+ return ""
+}
+
+func (x *Button) GetButtonText() *ButtonText {
+ if x != nil {
+ return x.ButtonText
+ }
+ return nil
+}
+
+func (x *Button) GetType() Button_ButtonType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return Button_UNKNOWN
+}
+
+func (x *Button) GetNativeFlowInfo() *NativeFlowInfo {
+ if x != nil {
+ return x.NativeFlowInfo
+ }
+ return nil
+}
+
+type ButtonsMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ContentText *string `protobuf:"bytes,6,opt,name=contentText" json:"contentText,omitempty"`
+ FooterText *string `protobuf:"bytes,7,opt,name=footerText" json:"footerText,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,8,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ Buttons []*Button `protobuf:"bytes,9,rep,name=buttons" json:"buttons,omitempty"`
+ HeaderType *ButtonsMessage_ButtonsMessageHeaderType `protobuf:"varint,10,opt,name=headerType,enum=proto.ButtonsMessage_ButtonsMessageHeaderType" json:"headerType,omitempty"`
+ // Types that are assignable to Header:
+ // *ButtonsMessage_Text
+ // *ButtonsMessage_DocumentMessage
+ // *ButtonsMessage_ImageMessage
+ // *ButtonsMessage_VideoMessage
+ // *ButtonsMessage_LocationMessage
+ Header isButtonsMessage_Header `protobuf_oneof:"header"`
+}
+
+func (x *ButtonsMessage) Reset() {
+ *x = ButtonsMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[143]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ButtonsMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ButtonsMessage) ProtoMessage() {}
+
+func (x *ButtonsMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[143]
+ 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 ButtonsMessage.ProtoReflect.Descriptor instead.
+func (*ButtonsMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{143}
+}
+
+func (x *ButtonsMessage) GetContentText() string {
+ if x != nil && x.ContentText != nil {
+ return *x.ContentText
+ }
+ return ""
+}
+
+func (x *ButtonsMessage) GetFooterText() string {
+ if x != nil && x.FooterText != nil {
+ return *x.FooterText
+ }
+ return ""
+}
+
+func (x *ButtonsMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *ButtonsMessage) GetButtons() []*Button {
+ if x != nil {
+ return x.Buttons
+ }
+ return nil
+}
+
+func (x *ButtonsMessage) GetHeaderType() ButtonsMessage_ButtonsMessageHeaderType {
+ if x != nil && x.HeaderType != nil {
+ return *x.HeaderType
+ }
+ return ButtonsMessage_UNKNOWN
+}
+
+func (m *ButtonsMessage) GetHeader() isButtonsMessage_Header {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (x *ButtonsMessage) GetText() string {
+ if x, ok := x.GetHeader().(*ButtonsMessage_Text); ok {
+ return x.Text
+ }
+ return ""
+}
+
+func (x *ButtonsMessage) GetDocumentMessage() *DocumentMessage {
+ if x, ok := x.GetHeader().(*ButtonsMessage_DocumentMessage); ok {
+ return x.DocumentMessage
+ }
+ return nil
+}
+
+func (x *ButtonsMessage) GetImageMessage() *ImageMessage {
+ if x, ok := x.GetHeader().(*ButtonsMessage_ImageMessage); ok {
+ return x.ImageMessage
+ }
+ return nil
+}
+
+func (x *ButtonsMessage) GetVideoMessage() *VideoMessage {
+ if x, ok := x.GetHeader().(*ButtonsMessage_VideoMessage); ok {
+ return x.VideoMessage
+ }
+ return nil
+}
+
+func (x *ButtonsMessage) GetLocationMessage() *LocationMessage {
+ if x, ok := x.GetHeader().(*ButtonsMessage_LocationMessage); ok {
+ return x.LocationMessage
+ }
+ return nil
+}
+
+type isButtonsMessage_Header interface {
+ isButtonsMessage_Header()
+}
+
+type ButtonsMessage_Text struct {
+ Text string `protobuf:"bytes,1,opt,name=text,oneof"`
+}
+
+type ButtonsMessage_DocumentMessage struct {
+ DocumentMessage *DocumentMessage `protobuf:"bytes,2,opt,name=documentMessage,oneof"`
+}
+
+type ButtonsMessage_ImageMessage struct {
+ ImageMessage *ImageMessage `protobuf:"bytes,3,opt,name=imageMessage,oneof"`
+}
+
+type ButtonsMessage_VideoMessage struct {
+ VideoMessage *VideoMessage `protobuf:"bytes,4,opt,name=videoMessage,oneof"`
+}
+
+type ButtonsMessage_LocationMessage struct {
+ LocationMessage *LocationMessage `protobuf:"bytes,5,opt,name=locationMessage,oneof"`
+}
+
+func (*ButtonsMessage_Text) isButtonsMessage_Header() {}
+
+func (*ButtonsMessage_DocumentMessage) isButtonsMessage_Header() {}
+
+func (*ButtonsMessage_ImageMessage) isButtonsMessage_Header() {}
+
+func (*ButtonsMessage_VideoMessage) isButtonsMessage_Header() {}
+
+func (*ButtonsMessage_LocationMessage) isButtonsMessage_Header() {}
+
+type ButtonsResponseMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SelectedButtonId *string `protobuf:"bytes,1,opt,name=selectedButtonId" json:"selectedButtonId,omitempty"`
+ ContextInfo *ContextInfo `protobuf:"bytes,3,opt,name=contextInfo" json:"contextInfo,omitempty"`
+ Type *ButtonsResponseMessage_ButtonsResponseMessageType `protobuf:"varint,4,opt,name=type,enum=proto.ButtonsResponseMessage_ButtonsResponseMessageType" json:"type,omitempty"`
+ // Types that are assignable to Response:
+ // *ButtonsResponseMessage_SelectedDisplayText
+ Response isButtonsResponseMessage_Response `protobuf_oneof:"response"`
+}
+
+func (x *ButtonsResponseMessage) Reset() {
+ *x = ButtonsResponseMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[144]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ButtonsResponseMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ButtonsResponseMessage) ProtoMessage() {}
+
+func (x *ButtonsResponseMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[144]
+ 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 ButtonsResponseMessage.ProtoReflect.Descriptor instead.
+func (*ButtonsResponseMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{144}
+}
+
+func (x *ButtonsResponseMessage) GetSelectedButtonId() string {
+ if x != nil && x.SelectedButtonId != nil {
+ return *x.SelectedButtonId
+ }
+ return ""
+}
+
+func (x *ButtonsResponseMessage) GetContextInfo() *ContextInfo {
+ if x != nil {
+ return x.ContextInfo
+ }
+ return nil
+}
+
+func (x *ButtonsResponseMessage) GetType() ButtonsResponseMessage_ButtonsResponseMessageType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return ButtonsResponseMessage_UNKNOWN
+}
+
+func (m *ButtonsResponseMessage) GetResponse() isButtonsResponseMessage_Response {
+ if m != nil {
+ return m.Response
+ }
+ return nil
+}
+
+func (x *ButtonsResponseMessage) GetSelectedDisplayText() string {
+ if x, ok := x.GetResponse().(*ButtonsResponseMessage_SelectedDisplayText); ok {
+ return x.SelectedDisplayText
+ }
+ return ""
+}
+
+type isButtonsResponseMessage_Response interface {
+ isButtonsResponseMessage_Response()
+}
+
+type ButtonsResponseMessage_SelectedDisplayText struct {
+ SelectedDisplayText string `protobuf:"bytes,2,opt,name=selectedDisplayText,oneof"`
+}
+
+func (*ButtonsResponseMessage_SelectedDisplayText) isButtonsResponseMessage_Response() {}
+
+type ReactionMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *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"`
+}
+
+func (x *ReactionMessage) Reset() {
+ *x = ReactionMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[145]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReactionMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReactionMessage) ProtoMessage() {}
+
+func (x *ReactionMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[145]
+ 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 ReactionMessage.ProtoReflect.Descriptor instead.
+func (*ReactionMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{145}
+}
+
+func (x *ReactionMessage) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+func (x *ReactionMessage) GetText() string {
+ if x != nil && x.Text != nil {
+ return *x.Text
+ }
+ return ""
+}
+
+func (x *ReactionMessage) GetGroupingKey() string {
+ if x != nil && x.GroupingKey != nil {
+ return *x.GroupingKey
+ }
+ return ""
+}
+
+func (x *ReactionMessage) GetSenderTimestampMs() int64 {
+ if x != nil && x.SenderTimestampMs != nil {
+ return *x.SenderTimestampMs
+ }
+ return 0
+}
+
+type StickerSyncRMRMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Filehash []string `protobuf:"bytes,1,rep,name=filehash" json:"filehash,omitempty"`
+ RmrSource *string `protobuf:"bytes,2,opt,name=rmrSource" json:"rmrSource,omitempty"`
+ RequestTimestamp *int64 `protobuf:"varint,3,opt,name=requestTimestamp" json:"requestTimestamp,omitempty"`
+}
+
+func (x *StickerSyncRMRMessage) Reset() {
+ *x = StickerSyncRMRMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[146]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StickerSyncRMRMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StickerSyncRMRMessage) ProtoMessage() {}
+
+func (x *StickerSyncRMRMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[146]
+ 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 StickerSyncRMRMessage.ProtoReflect.Descriptor instead.
+func (*StickerSyncRMRMessage) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{146}
+}
+
+func (x *StickerSyncRMRMessage) GetFilehash() []string {
+ if x != nil {
+ return x.Filehash
+ }
+ return nil
+}
+
+func (x *StickerSyncRMRMessage) GetRmrSource() string {
+ if x != nil && x.RmrSource != nil {
+ return *x.RmrSource
+ }
+ return ""
+}
+
+func (x *StickerSyncRMRMessage) GetRequestTimestamp() int64 {
+ if x != nil && x.RequestTimestamp != nil {
+ return *x.RequestTimestamp
+ }
+ return 0
+}
+
+type Message struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Conversation *string `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
+ SenderKeyDistributionMessage *SenderKeyDistributionMessage `protobuf:"bytes,2,opt,name=senderKeyDistributionMessage" json:"senderKeyDistributionMessage,omitempty"`
+ ImageMessage *ImageMessage `protobuf:"bytes,3,opt,name=imageMessage" json:"imageMessage,omitempty"`
+ ContactMessage *ContactMessage `protobuf:"bytes,4,opt,name=contactMessage" json:"contactMessage,omitempty"`
+ LocationMessage *LocationMessage `protobuf:"bytes,5,opt,name=locationMessage" json:"locationMessage,omitempty"`
+ ExtendedTextMessage *ExtendedTextMessage `protobuf:"bytes,6,opt,name=extendedTextMessage" json:"extendedTextMessage,omitempty"`
+ DocumentMessage *DocumentMessage `protobuf:"bytes,7,opt,name=documentMessage" json:"documentMessage,omitempty"`
+ AudioMessage *AudioMessage `protobuf:"bytes,8,opt,name=audioMessage" json:"audioMessage,omitempty"`
+ VideoMessage *VideoMessage `protobuf:"bytes,9,opt,name=videoMessage" json:"videoMessage,omitempty"`
+ Call *Call `protobuf:"bytes,10,opt,name=call" json:"call,omitempty"`
+ Chat *Chat `protobuf:"bytes,11,opt,name=chat" json:"chat,omitempty"`
+ ProtocolMessage *ProtocolMessage `protobuf:"bytes,12,opt,name=protocolMessage" json:"protocolMessage,omitempty"`
+ ContactsArrayMessage *ContactsArrayMessage `protobuf:"bytes,13,opt,name=contactsArrayMessage" json:"contactsArrayMessage,omitempty"`
+ HighlyStructuredMessage *HighlyStructuredMessage `protobuf:"bytes,14,opt,name=highlyStructuredMessage" json:"highlyStructuredMessage,omitempty"`
+ FastRatchetKeySenderKeyDistributionMessage *SenderKeyDistributionMessage `protobuf:"bytes,15,opt,name=fastRatchetKeySenderKeyDistributionMessage" json:"fastRatchetKeySenderKeyDistributionMessage,omitempty"`
+ SendPaymentMessage *SendPaymentMessage `protobuf:"bytes,16,opt,name=sendPaymentMessage" json:"sendPaymentMessage,omitempty"`
+ LiveLocationMessage *LiveLocationMessage `protobuf:"bytes,18,opt,name=liveLocationMessage" json:"liveLocationMessage,omitempty"`
+ RequestPaymentMessage *RequestPaymentMessage `protobuf:"bytes,22,opt,name=requestPaymentMessage" json:"requestPaymentMessage,omitempty"`
+ DeclinePaymentRequestMessage *DeclinePaymentRequestMessage `protobuf:"bytes,23,opt,name=declinePaymentRequestMessage" json:"declinePaymentRequestMessage,omitempty"`
+ CancelPaymentRequestMessage *CancelPaymentRequestMessage `protobuf:"bytes,24,opt,name=cancelPaymentRequestMessage" json:"cancelPaymentRequestMessage,omitempty"`
+ TemplateMessage *TemplateMessage `protobuf:"bytes,25,opt,name=templateMessage" json:"templateMessage,omitempty"`
+ StickerMessage *StickerMessage `protobuf:"bytes,26,opt,name=stickerMessage" json:"stickerMessage,omitempty"`
+ GroupInviteMessage *GroupInviteMessage `protobuf:"bytes,28,opt,name=groupInviteMessage" json:"groupInviteMessage,omitempty"`
+ TemplateButtonReplyMessage *TemplateButtonReplyMessage `protobuf:"bytes,29,opt,name=templateButtonReplyMessage" json:"templateButtonReplyMessage,omitempty"`
+ ProductMessage *ProductMessage `protobuf:"bytes,30,opt,name=productMessage" json:"productMessage,omitempty"`
+ DeviceSentMessage *DeviceSentMessage `protobuf:"bytes,31,opt,name=deviceSentMessage" json:"deviceSentMessage,omitempty"`
+ MessageContextInfo *MessageContextInfo `protobuf:"bytes,35,opt,name=messageContextInfo" json:"messageContextInfo,omitempty"`
+ ListMessage *ListMessage `protobuf:"bytes,36,opt,name=listMessage" json:"listMessage,omitempty"`
+ ViewOnceMessage *FutureProofMessage `protobuf:"bytes,37,opt,name=viewOnceMessage" json:"viewOnceMessage,omitempty"`
+ OrderMessage *OrderMessage `protobuf:"bytes,38,opt,name=orderMessage" json:"orderMessage,omitempty"`
+ ListResponseMessage *ListResponseMessage `protobuf:"bytes,39,opt,name=listResponseMessage" json:"listResponseMessage,omitempty"`
+ EphemeralMessage *FutureProofMessage `protobuf:"bytes,40,opt,name=ephemeralMessage" json:"ephemeralMessage,omitempty"`
+ InvoiceMessage *InvoiceMessage `protobuf:"bytes,41,opt,name=invoiceMessage" json:"invoiceMessage,omitempty"`
+ ButtonsMessage *ButtonsMessage `protobuf:"bytes,42,opt,name=buttonsMessage" json:"buttonsMessage,omitempty"`
+ ButtonsResponseMessage *ButtonsResponseMessage `protobuf:"bytes,43,opt,name=buttonsResponseMessage" json:"buttonsResponseMessage,omitempty"`
+ PaymentInviteMessage *PaymentInviteMessage `protobuf:"bytes,44,opt,name=paymentInviteMessage" json:"paymentInviteMessage,omitempty"`
+ InteractiveMessage *InteractiveMessage `protobuf:"bytes,45,opt,name=interactiveMessage" json:"interactiveMessage,omitempty"`
+ ReactionMessage *ReactionMessage `protobuf:"bytes,46,opt,name=reactionMessage" json:"reactionMessage,omitempty"`
+ StickerSyncRmrMessage *StickerSyncRMRMessage `protobuf:"bytes,47,opt,name=stickerSyncRmrMessage" json:"stickerSyncRmrMessage,omitempty"`
+}
+
+func (x *Message) Reset() {
+ *x = Message{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[147]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[147]
+ 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 Message.ProtoReflect.Descriptor instead.
+func (*Message) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{147}
+}
+
+func (x *Message) GetConversation() string {
+ if x != nil && x.Conversation != nil {
+ return *x.Conversation
+ }
+ return ""
+}
+
+func (x *Message) GetSenderKeyDistributionMessage() *SenderKeyDistributionMessage {
+ if x != nil {
+ return x.SenderKeyDistributionMessage
+ }
+ return nil
+}
+
+func (x *Message) GetImageMessage() *ImageMessage {
+ if x != nil {
+ return x.ImageMessage
+ }
+ return nil
+}
+
+func (x *Message) GetContactMessage() *ContactMessage {
+ if x != nil {
+ return x.ContactMessage
+ }
+ return nil
+}
+
+func (x *Message) GetLocationMessage() *LocationMessage {
+ if x != nil {
+ return x.LocationMessage
+ }
+ return nil
+}
+
+func (x *Message) GetExtendedTextMessage() *ExtendedTextMessage {
+ if x != nil {
+ return x.ExtendedTextMessage
+ }
+ return nil
+}
+
+func (x *Message) GetDocumentMessage() *DocumentMessage {
+ if x != nil {
+ return x.DocumentMessage
+ }
+ return nil
+}
+
+func (x *Message) GetAudioMessage() *AudioMessage {
+ if x != nil {
+ return x.AudioMessage
+ }
+ return nil
+}
+
+func (x *Message) GetVideoMessage() *VideoMessage {
+ if x != nil {
+ return x.VideoMessage
+ }
+ return nil
+}
+
+func (x *Message) GetCall() *Call {
+ if x != nil {
+ return x.Call
+ }
+ return nil
+}
+
+func (x *Message) GetChat() *Chat {
+ if x != nil {
+ return x.Chat
+ }
+ return nil
+}
+
+func (x *Message) GetProtocolMessage() *ProtocolMessage {
+ if x != nil {
+ return x.ProtocolMessage
+ }
+ return nil
+}
+
+func (x *Message) GetContactsArrayMessage() *ContactsArrayMessage {
+ if x != nil {
+ return x.ContactsArrayMessage
+ }
+ return nil
+}
+
+func (x *Message) GetHighlyStructuredMessage() *HighlyStructuredMessage {
+ if x != nil {
+ return x.HighlyStructuredMessage
+ }
+ return nil
+}
+
+func (x *Message) GetFastRatchetKeySenderKeyDistributionMessage() *SenderKeyDistributionMessage {
+ if x != nil {
+ return x.FastRatchetKeySenderKeyDistributionMessage
+ }
+ return nil
+}
+
+func (x *Message) GetSendPaymentMessage() *SendPaymentMessage {
+ if x != nil {
+ return x.SendPaymentMessage
+ }
+ return nil
+}
+
+func (x *Message) GetLiveLocationMessage() *LiveLocationMessage {
+ if x != nil {
+ return x.LiveLocationMessage
+ }
+ return nil
+}
+
+func (x *Message) GetRequestPaymentMessage() *RequestPaymentMessage {
+ if x != nil {
+ return x.RequestPaymentMessage
+ }
+ return nil
+}
+
+func (x *Message) GetDeclinePaymentRequestMessage() *DeclinePaymentRequestMessage {
+ if x != nil {
+ return x.DeclinePaymentRequestMessage
+ }
+ return nil
+}
+
+func (x *Message) GetCancelPaymentRequestMessage() *CancelPaymentRequestMessage {
+ if x != nil {
+ return x.CancelPaymentRequestMessage
+ }
+ return nil
+}
+
+func (x *Message) GetTemplateMessage() *TemplateMessage {
+ if x != nil {
+ return x.TemplateMessage
+ }
+ return nil
+}
+
+func (x *Message) GetStickerMessage() *StickerMessage {
+ if x != nil {
+ return x.StickerMessage
+ }
+ return nil
+}
+
+func (x *Message) GetGroupInviteMessage() *GroupInviteMessage {
+ if x != nil {
+ return x.GroupInviteMessage
+ }
+ return nil
+}
+
+func (x *Message) GetTemplateButtonReplyMessage() *TemplateButtonReplyMessage {
+ if x != nil {
+ return x.TemplateButtonReplyMessage
+ }
+ return nil
+}
+
+func (x *Message) GetProductMessage() *ProductMessage {
+ if x != nil {
+ return x.ProductMessage
+ }
+ return nil
+}
+
+func (x *Message) GetDeviceSentMessage() *DeviceSentMessage {
+ if x != nil {
+ return x.DeviceSentMessage
+ }
+ return nil
+}
+
+func (x *Message) GetMessageContextInfo() *MessageContextInfo {
+ if x != nil {
+ return x.MessageContextInfo
+ }
+ return nil
+}
+
+func (x *Message) GetListMessage() *ListMessage {
+ if x != nil {
+ return x.ListMessage
+ }
+ return nil
+}
+
+func (x *Message) GetViewOnceMessage() *FutureProofMessage {
+ if x != nil {
+ return x.ViewOnceMessage
+ }
+ return nil
+}
+
+func (x *Message) GetOrderMessage() *OrderMessage {
+ if x != nil {
+ return x.OrderMessage
+ }
+ return nil
+}
+
+func (x *Message) GetListResponseMessage() *ListResponseMessage {
+ if x != nil {
+ return x.ListResponseMessage
+ }
+ return nil
+}
+
+func (x *Message) GetEphemeralMessage() *FutureProofMessage {
+ if x != nil {
+ return x.EphemeralMessage
+ }
+ return nil
+}
+
+func (x *Message) GetInvoiceMessage() *InvoiceMessage {
+ if x != nil {
+ return x.InvoiceMessage
+ }
+ return nil
+}
+
+func (x *Message) GetButtonsMessage() *ButtonsMessage {
+ if x != nil {
+ return x.ButtonsMessage
+ }
+ return nil
+}
+
+func (x *Message) GetButtonsResponseMessage() *ButtonsResponseMessage {
+ if x != nil {
+ return x.ButtonsResponseMessage
+ }
+ return nil
+}
+
+func (x *Message) GetPaymentInviteMessage() *PaymentInviteMessage {
+ if x != nil {
+ return x.PaymentInviteMessage
+ }
+ return nil
+}
+
+func (x *Message) GetInteractiveMessage() *InteractiveMessage {
+ if x != nil {
+ return x.InteractiveMessage
+ }
+ return nil
+}
+
+func (x *Message) GetReactionMessage() *ReactionMessage {
+ if x != nil {
+ return x.ReactionMessage
+ }
+ return nil
+}
+
+func (x *Message) GetStickerSyncRmrMessage() *StickerSyncRMRMessage {
+ if x != nil {
+ return x.StickerSyncRmrMessage
+ }
+ return nil
+}
+
+type ActionLink struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
+ ButtonTitle *string `protobuf:"bytes,2,opt,name=buttonTitle" json:"buttonTitle,omitempty"`
+}
+
+func (x *ActionLink) Reset() {
+ *x = ActionLink{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[148]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ActionLink) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ActionLink) ProtoMessage() {}
+
+func (x *ActionLink) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[148]
+ 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 ActionLink.ProtoReflect.Descriptor instead.
+func (*ActionLink) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{148}
+}
+
+func (x *ActionLink) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+func (x *ActionLink) GetButtonTitle() string {
+ if x != nil && x.ButtonTitle != nil {
+ return *x.ButtonTitle
+ }
+ return ""
+}
+
+type DisappearingMode struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Initiator *DisappearingMode_DisappearingModeInitiator `protobuf:"varint,1,opt,name=initiator,enum=proto.DisappearingMode_DisappearingModeInitiator" json:"initiator,omitempty"`
+}
+
+func (x *DisappearingMode) Reset() {
+ *x = DisappearingMode{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[149]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisappearingMode) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisappearingMode) ProtoMessage() {}
+
+func (x *DisappearingMode) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[149]
+ 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 DisappearingMode.ProtoReflect.Descriptor instead.
+func (*DisappearingMode) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{149}
+}
+
+func (x *DisappearingMode) GetInitiator() DisappearingMode_DisappearingModeInitiator {
+ if x != nil && x.Initiator != nil {
+ return *x.Initiator
+ }
+ return DisappearingMode_CHANGED_IN_CHAT
+}
+
+// Renamed from MediaData
+type PBMediaData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MediaKey []byte `protobuf:"bytes,1,opt,name=mediaKey" json:"mediaKey,omitempty"`
+ MediaKeyTimestamp *int64 `protobuf:"varint,2,opt,name=mediaKeyTimestamp" json:"mediaKeyTimestamp,omitempty"`
+ FileSha256 []byte `protobuf:"bytes,3,opt,name=fileSha256" json:"fileSha256,omitempty"`
+ FileEncSha256 []byte `protobuf:"bytes,4,opt,name=fileEncSha256" json:"fileEncSha256,omitempty"`
+ DirectPath *string `protobuf:"bytes,5,opt,name=directPath" json:"directPath,omitempty"`
+}
+
+func (x *PBMediaData) Reset() {
+ *x = PBMediaData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[150]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PBMediaData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PBMediaData) ProtoMessage() {}
+
+func (x *PBMediaData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[150]
+ 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 PBMediaData.ProtoReflect.Descriptor instead.
+func (*PBMediaData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{150}
+}
+
+func (x *PBMediaData) GetMediaKey() []byte {
+ if x != nil {
+ return x.MediaKey
+ }
+ return nil
+}
+
+func (x *PBMediaData) GetMediaKeyTimestamp() int64 {
+ if x != nil && x.MediaKeyTimestamp != nil {
+ return *x.MediaKeyTimestamp
+ }
+ return 0
+}
+
+func (x *PBMediaData) GetFileSha256() []byte {
+ if x != nil {
+ return x.FileSha256
+ }
+ return nil
+}
+
+func (x *PBMediaData) GetFileEncSha256() []byte {
+ if x != nil {
+ return x.FileEncSha256
+ }
+ return nil
+}
+
+func (x *PBMediaData) GetDirectPath() string {
+ if x != nil && x.DirectPath != nil {
+ return *x.DirectPath
+ }
+ return ""
+}
+
+type PaymentBackground struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
+ FileLength *uint64 `protobuf:"varint,2,opt,name=fileLength" json:"fileLength,omitempty"`
+ Width *uint32 `protobuf:"varint,3,opt,name=width" json:"width,omitempty"`
+ Height *uint32 `protobuf:"varint,4,opt,name=height" json:"height,omitempty"`
+ Mimetype *string `protobuf:"bytes,5,opt,name=mimetype" json:"mimetype,omitempty"`
+ PlaceholderArgb *uint32 `protobuf:"fixed32,6,opt,name=placeholderArgb" json:"placeholderArgb,omitempty"`
+ TextArgb *uint32 `protobuf:"fixed32,7,opt,name=textArgb" json:"textArgb,omitempty"`
+ SubtextArgb *uint32 `protobuf:"fixed32,8,opt,name=subtextArgb" json:"subtextArgb,omitempty"`
+ MediaData *PBMediaData `protobuf:"bytes,9,opt,name=mediaData" json:"mediaData,omitempty"`
+ Type *PaymentBackground_PaymentBackgroundType `protobuf:"varint,10,opt,name=type,enum=proto.PaymentBackground_PaymentBackgroundType" json:"type,omitempty"`
+}
+
+func (x *PaymentBackground) Reset() {
+ *x = PaymentBackground{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[151]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PaymentBackground) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaymentBackground) ProtoMessage() {}
+
+func (x *PaymentBackground) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[151]
+ 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 PaymentBackground.ProtoReflect.Descriptor instead.
+func (*PaymentBackground) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{151}
+}
+
+func (x *PaymentBackground) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+func (x *PaymentBackground) GetFileLength() uint64 {
+ if x != nil && x.FileLength != nil {
+ return *x.FileLength
+ }
+ return 0
+}
+
+func (x *PaymentBackground) GetWidth() uint32 {
+ if x != nil && x.Width != nil {
+ return *x.Width
+ }
+ return 0
+}
+
+func (x *PaymentBackground) GetHeight() uint32 {
+ if x != nil && x.Height != nil {
+ return *x.Height
+ }
+ return 0
+}
+
+func (x *PaymentBackground) GetMimetype() string {
+ if x != nil && x.Mimetype != nil {
+ return *x.Mimetype
+ }
+ return ""
+}
+
+func (x *PaymentBackground) GetPlaceholderArgb() uint32 {
+ if x != nil && x.PlaceholderArgb != nil {
+ return *x.PlaceholderArgb
+ }
+ return 0
+}
+
+func (x *PaymentBackground) GetTextArgb() uint32 {
+ if x != nil && x.TextArgb != nil {
+ return *x.TextArgb
+ }
+ return 0
+}
+
+func (x *PaymentBackground) GetSubtextArgb() uint32 {
+ if x != nil && x.SubtextArgb != nil {
+ return *x.SubtextArgb
+ }
+ return 0
+}
+
+func (x *PaymentBackground) GetMediaData() *PBMediaData {
+ if x != nil {
+ return x.MediaData
+ }
+ return nil
+}
+
+func (x *PaymentBackground) GetType() PaymentBackground_PaymentBackgroundType {
+ if x != nil && x.Type != nil {
+ return *x.Type
+ }
+ return PaymentBackground_UNKNOWN
+}
+
+type Money struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Value *int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
+ Offset *uint32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
+ CurrencyCode *string `protobuf:"bytes,3,opt,name=currencyCode" json:"currencyCode,omitempty"`
+}
+
+func (x *Money) Reset() {
+ *x = Money{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[152]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Money) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Money) ProtoMessage() {}
+
+func (x *Money) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[152]
+ 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 Money.ProtoReflect.Descriptor instead.
+func (*Money) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{152}
+}
+
+func (x *Money) GetValue() int64 {
+ if x != nil && x.Value != nil {
+ return *x.Value
+ }
+ return 0
+}
+
+func (x *Money) GetOffset() uint32 {
+ if x != nil && x.Offset != nil {
+ return *x.Offset
+ }
+ return 0
+}
+
+func (x *Money) GetCurrencyCode() string {
+ if x != nil && x.CurrencyCode != nil {
+ return *x.CurrencyCode
+ }
+ return ""
+}
+
+type HydratedQuickReplyButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *string `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+ Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
+}
+
+func (x *HydratedQuickReplyButton) Reset() {
+ *x = HydratedQuickReplyButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[153]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HydratedQuickReplyButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HydratedQuickReplyButton) ProtoMessage() {}
+
+func (x *HydratedQuickReplyButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[153]
+ 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 HydratedQuickReplyButton.ProtoReflect.Descriptor instead.
+func (*HydratedQuickReplyButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{153}
+}
+
+func (x *HydratedQuickReplyButton) GetDisplayText() string {
+ if x != nil && x.DisplayText != nil {
+ return *x.DisplayText
+ }
+ return ""
+}
+
+func (x *HydratedQuickReplyButton) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+type HydratedURLButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *string `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+ Url *string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
+}
+
+func (x *HydratedURLButton) Reset() {
+ *x = HydratedURLButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[154]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HydratedURLButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HydratedURLButton) ProtoMessage() {}
+
+func (x *HydratedURLButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[154]
+ 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 HydratedURLButton.ProtoReflect.Descriptor instead.
+func (*HydratedURLButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{154}
+}
+
+func (x *HydratedURLButton) GetDisplayText() string {
+ if x != nil && x.DisplayText != nil {
+ return *x.DisplayText
+ }
+ return ""
+}
+
+func (x *HydratedURLButton) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+type HydratedCallButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *string `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+ PhoneNumber *string `protobuf:"bytes,2,opt,name=phoneNumber" json:"phoneNumber,omitempty"`
+}
+
+func (x *HydratedCallButton) Reset() {
+ *x = HydratedCallButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[155]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HydratedCallButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HydratedCallButton) ProtoMessage() {}
+
+func (x *HydratedCallButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[155]
+ 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 HydratedCallButton.ProtoReflect.Descriptor instead.
+func (*HydratedCallButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{155}
+}
+
+func (x *HydratedCallButton) GetDisplayText() string {
+ if x != nil && x.DisplayText != nil {
+ return *x.DisplayText
+ }
+ return ""
+}
+
+func (x *HydratedCallButton) GetPhoneNumber() string {
+ if x != nil && x.PhoneNumber != nil {
+ return *x.PhoneNumber
+ }
+ return ""
+}
+
+type HydratedTemplateButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *uint32 `protobuf:"varint,4,opt,name=index" json:"index,omitempty"`
+ // Types that are assignable to HydratedButton:
+ // *HydratedTemplateButton_QuickReplyButton
+ // *HydratedTemplateButton_UrlButton
+ // *HydratedTemplateButton_CallButton
+ HydratedButton isHydratedTemplateButton_HydratedButton `protobuf_oneof:"hydratedButton"`
+}
+
+func (x *HydratedTemplateButton) Reset() {
+ *x = HydratedTemplateButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[156]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HydratedTemplateButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HydratedTemplateButton) ProtoMessage() {}
+
+func (x *HydratedTemplateButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[156]
+ 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 HydratedTemplateButton.ProtoReflect.Descriptor instead.
+func (*HydratedTemplateButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{156}
+}
+
+func (x *HydratedTemplateButton) GetIndex() uint32 {
+ if x != nil && x.Index != nil {
+ return *x.Index
+ }
+ return 0
+}
+
+func (m *HydratedTemplateButton) GetHydratedButton() isHydratedTemplateButton_HydratedButton {
+ if m != nil {
+ return m.HydratedButton
+ }
+ return nil
+}
+
+func (x *HydratedTemplateButton) GetQuickReplyButton() *HydratedQuickReplyButton {
+ if x, ok := x.GetHydratedButton().(*HydratedTemplateButton_QuickReplyButton); ok {
+ return x.QuickReplyButton
+ }
+ return nil
+}
+
+func (x *HydratedTemplateButton) GetUrlButton() *HydratedURLButton {
+ if x, ok := x.GetHydratedButton().(*HydratedTemplateButton_UrlButton); ok {
+ return x.UrlButton
+ }
+ return nil
+}
+
+func (x *HydratedTemplateButton) GetCallButton() *HydratedCallButton {
+ if x, ok := x.GetHydratedButton().(*HydratedTemplateButton_CallButton); ok {
+ return x.CallButton
+ }
+ return nil
+}
+
+type isHydratedTemplateButton_HydratedButton interface {
+ isHydratedTemplateButton_HydratedButton()
+}
+
+type HydratedTemplateButton_QuickReplyButton struct {
+ QuickReplyButton *HydratedQuickReplyButton `protobuf:"bytes,1,opt,name=quickReplyButton,oneof"`
+}
+
+type HydratedTemplateButton_UrlButton struct {
+ UrlButton *HydratedURLButton `protobuf:"bytes,2,opt,name=urlButton,oneof"`
+}
+
+type HydratedTemplateButton_CallButton struct {
+ CallButton *HydratedCallButton `protobuf:"bytes,3,opt,name=callButton,oneof"`
+}
+
+func (*HydratedTemplateButton_QuickReplyButton) isHydratedTemplateButton_HydratedButton() {}
+
+func (*HydratedTemplateButton_UrlButton) isHydratedTemplateButton_HydratedButton() {}
+
+func (*HydratedTemplateButton_CallButton) isHydratedTemplateButton_HydratedButton() {}
+
+type QuickReplyButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *HighlyStructuredMessage `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+ Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
+}
+
+func (x *QuickReplyButton) Reset() {
+ *x = QuickReplyButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[157]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *QuickReplyButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QuickReplyButton) ProtoMessage() {}
+
+func (x *QuickReplyButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[157]
+ 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 QuickReplyButton.ProtoReflect.Descriptor instead.
+func (*QuickReplyButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{157}
+}
+
+func (x *QuickReplyButton) GetDisplayText() *HighlyStructuredMessage {
+ if x != nil {
+ return x.DisplayText
+ }
+ return nil
+}
+
+func (x *QuickReplyButton) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+type URLButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *HighlyStructuredMessage `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+ Url *HighlyStructuredMessage `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
+}
+
+func (x *URLButton) Reset() {
+ *x = URLButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[158]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *URLButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*URLButton) ProtoMessage() {}
+
+func (x *URLButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[158]
+ 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 URLButton.ProtoReflect.Descriptor instead.
+func (*URLButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{158}
+}
+
+func (x *URLButton) GetDisplayText() *HighlyStructuredMessage {
+ if x != nil {
+ return x.DisplayText
+ }
+ return nil
+}
+
+func (x *URLButton) GetUrl() *HighlyStructuredMessage {
+ if x != nil {
+ return x.Url
+ }
+ return nil
+}
+
+type CallButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DisplayText *HighlyStructuredMessage `protobuf:"bytes,1,opt,name=displayText" json:"displayText,omitempty"`
+ PhoneNumber *HighlyStructuredMessage `protobuf:"bytes,2,opt,name=phoneNumber" json:"phoneNumber,omitempty"`
+}
+
+func (x *CallButton) Reset() {
+ *x = CallButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[159]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CallButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CallButton) ProtoMessage() {}
+
+func (x *CallButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[159]
+ 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 CallButton.ProtoReflect.Descriptor instead.
+func (*CallButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{159}
+}
+
+func (x *CallButton) GetDisplayText() *HighlyStructuredMessage {
+ if x != nil {
+ return x.DisplayText
+ }
+ return nil
+}
+
+func (x *CallButton) GetPhoneNumber() *HighlyStructuredMessage {
+ if x != nil {
+ return x.PhoneNumber
+ }
+ return nil
+}
+
+type TemplateButton struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Index *uint32 `protobuf:"varint,4,opt,name=index" json:"index,omitempty"`
+ // Types that are assignable to Button:
+ // *TemplateButton_QuickReplyButton
+ // *TemplateButton_UrlButton
+ // *TemplateButton_CallButton
+ Button isTemplateButton_Button `protobuf_oneof:"button"`
+}
+
+func (x *TemplateButton) Reset() {
+ *x = TemplateButton{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[160]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TemplateButton) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TemplateButton) ProtoMessage() {}
+
+func (x *TemplateButton) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[160]
+ 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 TemplateButton.ProtoReflect.Descriptor instead.
+func (*TemplateButton) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{160}
+}
+
+func (x *TemplateButton) GetIndex() uint32 {
+ if x != nil && x.Index != nil {
+ return *x.Index
+ }
+ return 0
+}
+
+func (m *TemplateButton) GetButton() isTemplateButton_Button {
+ if m != nil {
+ return m.Button
+ }
+ return nil
+}
+
+func (x *TemplateButton) GetQuickReplyButton() *QuickReplyButton {
+ if x, ok := x.GetButton().(*TemplateButton_QuickReplyButton); ok {
+ return x.QuickReplyButton
+ }
+ return nil
+}
+
+func (x *TemplateButton) GetUrlButton() *URLButton {
+ if x, ok := x.GetButton().(*TemplateButton_UrlButton); ok {
+ return x.UrlButton
+ }
+ return nil
+}
+
+func (x *TemplateButton) GetCallButton() *CallButton {
+ if x, ok := x.GetButton().(*TemplateButton_CallButton); ok {
+ return x.CallButton
+ }
+ return nil
+}
+
+type isTemplateButton_Button interface {
+ isTemplateButton_Button()
+}
+
+type TemplateButton_QuickReplyButton struct {
+ QuickReplyButton *QuickReplyButton `protobuf:"bytes,1,opt,name=quickReplyButton,oneof"`
+}
+
+type TemplateButton_UrlButton struct {
+ UrlButton *URLButton `protobuf:"bytes,2,opt,name=urlButton,oneof"`
+}
+
+type TemplateButton_CallButton struct {
+ CallButton *CallButton `protobuf:"bytes,3,opt,name=callButton,oneof"`
+}
+
+func (*TemplateButton_QuickReplyButton) isTemplateButton_Button() {}
+
+func (*TemplateButton_UrlButton) isTemplateButton_Button() {}
+
+func (*TemplateButton_CallButton) isTemplateButton_Button() {}
+
+type Location struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ 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 *Location) Reset() {
+ *x = Location{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[161]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Location) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Location) ProtoMessage() {}
+
+func (x *Location) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[161]
+ 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 Location.ProtoReflect.Descriptor instead.
+func (*Location) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{161}
+}
+
+func (x *Location) GetDegreesLatitude() float64 {
+ if x != nil && x.DegreesLatitude != nil {
+ return *x.DegreesLatitude
+ }
+ return 0
+}
+
+func (x *Location) GetDegreesLongitude() float64 {
+ if x != nil && x.DegreesLongitude != nil {
+ return *x.DegreesLongitude
+ }
+ return 0
+}
+
+func (x *Location) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+type Point struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ XDeprecated *int32 `protobuf:"varint,1,opt,name=xDeprecated" json:"xDeprecated,omitempty"`
+ YDeprecated *int32 `protobuf:"varint,2,opt,name=yDeprecated" json:"yDeprecated,omitempty"`
+ X *float64 `protobuf:"fixed64,3,opt,name=x" json:"x,omitempty"`
+ Y *float64 `protobuf:"fixed64,4,opt,name=y" json:"y,omitempty"`
+}
+
+func (x *Point) Reset() {
+ *x = Point{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[162]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Point) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Point) ProtoMessage() {}
+
+func (x *Point) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[162]
+ 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 Point.ProtoReflect.Descriptor instead.
+func (*Point) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{162}
+}
+
+func (x *Point) GetXDeprecated() int32 {
+ if x != nil && x.XDeprecated != nil {
+ return *x.XDeprecated
+ }
+ return 0
+}
+
+func (x *Point) GetYDeprecated() int32 {
+ if x != nil && x.YDeprecated != nil {
+ return *x.YDeprecated
+ }
+ return 0
+}
+
+func (x *Point) GetX() float64 {
+ if x != nil && x.X != nil {
+ return *x.X
+ }
+ return 0
+}
+
+func (x *Point) GetY() float64 {
+ if x != nil && x.Y != nil {
+ return *x.Y
+ }
+ return 0
+}
+
+type CompanionProps struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Os *string `protobuf:"bytes,1,opt,name=os" json:"os,omitempty"`
+ Version *AppVersion `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
+ PlatformType *CompanionProps_CompanionPropsPlatformType `protobuf:"varint,3,opt,name=platformType,enum=proto.CompanionProps_CompanionPropsPlatformType" json:"platformType,omitempty"`
+ RequireFullSync *bool `protobuf:"varint,4,opt,name=requireFullSync" json:"requireFullSync,omitempty"`
+}
+
+func (x *CompanionProps) Reset() {
+ *x = CompanionProps{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[163]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CompanionProps) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CompanionProps) ProtoMessage() {}
+
+func (x *CompanionProps) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[163]
+ 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 CompanionProps.ProtoReflect.Descriptor instead.
+func (*CompanionProps) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{163}
+}
+
+func (x *CompanionProps) GetOs() string {
+ if x != nil && x.Os != nil {
+ return *x.Os
+ }
+ return ""
+}
+
+func (x *CompanionProps) GetVersion() *AppVersion {
+ if x != nil {
+ return x.Version
+ }
+ return nil
+}
+
+func (x *CompanionProps) GetPlatformType() CompanionProps_CompanionPropsPlatformType {
+ if x != nil && x.PlatformType != nil {
+ return *x.PlatformType
+ }
+ return CompanionProps_UNKNOWN
+}
+
+func (x *CompanionProps) GetRequireFullSync() bool {
+ if x != nil && x.RequireFullSync != nil {
+ return *x.RequireFullSync
+ }
+ return false
+}
+
+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"`
+}
+
+func (x *ADVSignedDeviceIdentityHMAC) Reset() {
+ *x = ADVSignedDeviceIdentityHMAC{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[164]
+ 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_binary_proto_def_proto_msgTypes[164]
+ 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_binary_proto_def_proto_rawDescGZIP(), []int{164}
+}
+
+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
+}
+
+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_binary_proto_def_proto_msgTypes[165]
+ 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_binary_proto_def_proto_msgTypes[165]
+ 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_binary_proto_def_proto_rawDescGZIP(), []int{165}
+}
+
+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 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"`
+}
+
+func (x *ADVDeviceIdentity) Reset() {
+ *x = ADVDeviceIdentity{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[166]
+ 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_binary_proto_def_proto_msgTypes[166]
+ 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_binary_proto_def_proto_rawDescGZIP(), []int{166}
+}
+
+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
+}
+
+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"`
+}
+
+func (x *ADVSignedKeyIndexList) Reset() {
+ *x = ADVSignedKeyIndexList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[167]
+ 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_binary_proto_def_proto_msgTypes[167]
+ 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_binary_proto_def_proto_rawDescGZIP(), []int{167}
+}
+
+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
+}
+
+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"`
+}
+
+func (x *ADVKeyIndexList) Reset() {
+ *x = ADVKeyIndexList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[168]
+ 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_binary_proto_def_proto_msgTypes[168]
+ 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_binary_proto_def_proto_rawDescGZIP(), []int{168}
+}
+
+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
+}
+
+type MessageKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ 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() {
+ *x = MessageKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[169]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MessageKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageKey) ProtoMessage() {}
+
+func (x *MessageKey) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[169]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MessageKey.ProtoReflect.Descriptor instead.
+func (*MessageKey) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{169}
+}
+
+func (x *MessageKey) GetRemoteJid() string {
+ if x != nil && x.RemoteJid != nil {
+ return *x.RemoteJid
+ }
+ return ""
+}
+
+func (x *MessageKey) GetFromMe() bool {
+ if x != nil && x.FromMe != nil {
+ return *x.FromMe
+ }
+ return false
+}
+
+func (x *MessageKey) GetId() string {
+ if x != nil && x.Id != nil {
+ return *x.Id
+ }
+ return ""
+}
+
+func (x *MessageKey) GetParticipant() string {
+ if x != nil && x.Participant != nil {
+ return *x.Participant
+ }
+ return ""
+}
+
+type Reaction struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *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"`
+ Unread *bool `protobuf:"varint,5,opt,name=unread" json:"unread,omitempty"`
+}
+
+func (x *Reaction) Reset() {
+ *x = Reaction{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[170]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Reaction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Reaction) ProtoMessage() {}
+
+func (x *Reaction) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[170]
+ 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 Reaction.ProtoReflect.Descriptor instead.
+func (*Reaction) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{170}
+}
+
+func (x *Reaction) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+func (x *Reaction) GetText() string {
+ if x != nil && x.Text != nil {
+ return *x.Text
+ }
+ return ""
+}
+
+func (x *Reaction) GetGroupingKey() string {
+ if x != nil && x.GroupingKey != nil {
+ return *x.GroupingKey
+ }
+ return ""
+}
+
+func (x *Reaction) GetSenderTimestampMs() int64 {
+ if x != nil && x.SenderTimestampMs != nil {
+ return *x.SenderTimestampMs
+ }
+ return 0
+}
+
+func (x *Reaction) GetUnread() bool {
+ if x != nil && x.Unread != nil {
+ return *x.Unread
+ }
+ return false
+}
+
+type UserReceipt struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserJid *string `protobuf:"bytes,1,req,name=userJid" json:"userJid,omitempty"`
+ ReceiptTimestamp *int64 `protobuf:"varint,2,opt,name=receiptTimestamp" json:"receiptTimestamp,omitempty"`
+ ReadTimestamp *int64 `protobuf:"varint,3,opt,name=readTimestamp" json:"readTimestamp,omitempty"`
+ PlayedTimestamp *int64 `protobuf:"varint,4,opt,name=playedTimestamp" json:"playedTimestamp,omitempty"`
+ PendingDeviceJid []string `protobuf:"bytes,5,rep,name=pendingDeviceJid" json:"pendingDeviceJid,omitempty"`
+ DeliveredDeviceJid []string `protobuf:"bytes,6,rep,name=deliveredDeviceJid" json:"deliveredDeviceJid,omitempty"`
+}
+
+func (x *UserReceipt) Reset() {
+ *x = UserReceipt{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[171]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserReceipt) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserReceipt) ProtoMessage() {}
+
+func (x *UserReceipt) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[171]
+ 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 UserReceipt.ProtoReflect.Descriptor instead.
+func (*UserReceipt) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{171}
+}
+
+func (x *UserReceipt) GetUserJid() string {
+ if x != nil && x.UserJid != nil {
+ return *x.UserJid
+ }
+ return ""
+}
+
+func (x *UserReceipt) GetReceiptTimestamp() int64 {
+ if x != nil && x.ReceiptTimestamp != nil {
+ return *x.ReceiptTimestamp
+ }
+ return 0
+}
+
+func (x *UserReceipt) GetReadTimestamp() int64 {
+ if x != nil && x.ReadTimestamp != nil {
+ return *x.ReadTimestamp
+ }
+ return 0
+}
+
+func (x *UserReceipt) GetPlayedTimestamp() int64 {
+ if x != nil && x.PlayedTimestamp != nil {
+ return *x.PlayedTimestamp
+ }
+ return 0
+}
+
+func (x *UserReceipt) GetPendingDeviceJid() []string {
+ if x != nil {
+ return x.PendingDeviceJid
+ }
+ return nil
+}
+
+func (x *UserReceipt) GetDeliveredDeviceJid() []string {
+ if x != nil {
+ return x.DeliveredDeviceJid
+ }
+ return nil
+}
+
+type StatusPSA struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CampaignId *string `protobuf:"bytes,44,req,name=campaignId" json:"campaignId,omitempty"`
+ CampaignExpirationTimestamp *uint64 `protobuf:"varint,45,opt,name=campaignExpirationTimestamp" json:"campaignExpirationTimestamp,omitempty"`
+}
+
+func (x *StatusPSA) Reset() {
+ *x = StatusPSA{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[172]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StatusPSA) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StatusPSA) ProtoMessage() {}
+
+func (x *StatusPSA) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[172]
+ 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 StatusPSA.ProtoReflect.Descriptor instead.
+func (*StatusPSA) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{172}
+}
+
+func (x *StatusPSA) GetCampaignId() string {
+ if x != nil && x.CampaignId != nil {
+ return *x.CampaignId
+ }
+ return ""
+}
+
+func (x *StatusPSA) GetCampaignExpirationTimestamp() uint64 {
+ if x != nil && x.CampaignExpirationTimestamp != nil {
+ return *x.CampaignExpirationTimestamp
+ }
+ return 0
+}
+
+type PhotoChange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OldPhoto []byte `protobuf:"bytes,1,opt,name=oldPhoto" json:"oldPhoto,omitempty"`
+ NewPhoto []byte `protobuf:"bytes,2,opt,name=newPhoto" json:"newPhoto,omitempty"`
+ NewPhotoId *uint32 `protobuf:"varint,3,opt,name=newPhotoId" json:"newPhotoId,omitempty"`
+}
+
+func (x *PhotoChange) Reset() {
+ *x = PhotoChange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[173]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PhotoChange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PhotoChange) ProtoMessage() {}
+
+func (x *PhotoChange) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[173]
+ 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 PhotoChange.ProtoReflect.Descriptor instead.
+func (*PhotoChange) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{173}
+}
+
+func (x *PhotoChange) GetOldPhoto() []byte {
+ if x != nil {
+ return x.OldPhoto
+ }
+ return nil
+}
+
+func (x *PhotoChange) GetNewPhoto() []byte {
+ if x != nil {
+ return x.NewPhoto
+ }
+ return nil
+}
+
+func (x *PhotoChange) GetNewPhotoId() uint32 {
+ if x != nil && x.NewPhotoId != nil {
+ return *x.NewPhotoId
+ }
+ return 0
+}
+
+type MediaData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LocalPath *string `protobuf:"bytes,1,opt,name=localPath" json:"localPath,omitempty"`
+}
+
+func (x *MediaData) Reset() {
+ *x = MediaData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[174]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MediaData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MediaData) ProtoMessage() {}
+
+func (x *MediaData) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[174]
+ 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 MediaData.ProtoReflect.Descriptor instead.
+func (*MediaData) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{174}
+}
+
+func (x *MediaData) GetLocalPath() string {
+ if x != nil && x.LocalPath != nil {
+ return *x.LocalPath
+ }
+ return ""
+}
+
+type WebFeatures struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LabelsDisplay *WebFeatures_WebFeaturesFlag `protobuf:"varint,1,opt,name=labelsDisplay,enum=proto.WebFeatures_WebFeaturesFlag" json:"labelsDisplay,omitempty"`
+ VoipIndividualOutgoing *WebFeatures_WebFeaturesFlag `protobuf:"varint,2,opt,name=voipIndividualOutgoing,enum=proto.WebFeatures_WebFeaturesFlag" json:"voipIndividualOutgoing,omitempty"`
+ GroupsV3 *WebFeatures_WebFeaturesFlag `protobuf:"varint,3,opt,name=groupsV3,enum=proto.WebFeatures_WebFeaturesFlag" json:"groupsV3,omitempty"`
+ GroupsV3Create *WebFeatures_WebFeaturesFlag `protobuf:"varint,4,opt,name=groupsV3Create,enum=proto.WebFeatures_WebFeaturesFlag" json:"groupsV3Create,omitempty"`
+ ChangeNumberV2 *WebFeatures_WebFeaturesFlag `protobuf:"varint,5,opt,name=changeNumberV2,enum=proto.WebFeatures_WebFeaturesFlag" json:"changeNumberV2,omitempty"`
+ QueryStatusV3Thumbnail *WebFeatures_WebFeaturesFlag `protobuf:"varint,6,opt,name=queryStatusV3Thumbnail,enum=proto.WebFeatures_WebFeaturesFlag" json:"queryStatusV3Thumbnail,omitempty"`
+ LiveLocations *WebFeatures_WebFeaturesFlag `protobuf:"varint,7,opt,name=liveLocations,enum=proto.WebFeatures_WebFeaturesFlag" json:"liveLocations,omitempty"`
+ QueryVname *WebFeatures_WebFeaturesFlag `protobuf:"varint,8,opt,name=queryVname,enum=proto.WebFeatures_WebFeaturesFlag" json:"queryVname,omitempty"`
+ VoipIndividualIncoming *WebFeatures_WebFeaturesFlag `protobuf:"varint,9,opt,name=voipIndividualIncoming,enum=proto.WebFeatures_WebFeaturesFlag" json:"voipIndividualIncoming,omitempty"`
+ QuickRepliesQuery *WebFeatures_WebFeaturesFlag `protobuf:"varint,10,opt,name=quickRepliesQuery,enum=proto.WebFeatures_WebFeaturesFlag" json:"quickRepliesQuery,omitempty"`
+ Payments *WebFeatures_WebFeaturesFlag `protobuf:"varint,11,opt,name=payments,enum=proto.WebFeatures_WebFeaturesFlag" json:"payments,omitempty"`
+ StickerPackQuery *WebFeatures_WebFeaturesFlag `protobuf:"varint,12,opt,name=stickerPackQuery,enum=proto.WebFeatures_WebFeaturesFlag" json:"stickerPackQuery,omitempty"`
+ LiveLocationsFinal *WebFeatures_WebFeaturesFlag `protobuf:"varint,13,opt,name=liveLocationsFinal,enum=proto.WebFeatures_WebFeaturesFlag" json:"liveLocationsFinal,omitempty"`
+ LabelsEdit *WebFeatures_WebFeaturesFlag `protobuf:"varint,14,opt,name=labelsEdit,enum=proto.WebFeatures_WebFeaturesFlag" json:"labelsEdit,omitempty"`
+ MediaUpload *WebFeatures_WebFeaturesFlag `protobuf:"varint,15,opt,name=mediaUpload,enum=proto.WebFeatures_WebFeaturesFlag" json:"mediaUpload,omitempty"`
+ MediaUploadRichQuickReplies *WebFeatures_WebFeaturesFlag `protobuf:"varint,18,opt,name=mediaUploadRichQuickReplies,enum=proto.WebFeatures_WebFeaturesFlag" json:"mediaUploadRichQuickReplies,omitempty"`
+ VnameV2 *WebFeatures_WebFeaturesFlag `protobuf:"varint,19,opt,name=vnameV2,enum=proto.WebFeatures_WebFeaturesFlag" json:"vnameV2,omitempty"`
+ VideoPlaybackUrl *WebFeatures_WebFeaturesFlag `protobuf:"varint,20,opt,name=videoPlaybackUrl,enum=proto.WebFeatures_WebFeaturesFlag" json:"videoPlaybackUrl,omitempty"`
+ StatusRanking *WebFeatures_WebFeaturesFlag `protobuf:"varint,21,opt,name=statusRanking,enum=proto.WebFeatures_WebFeaturesFlag" json:"statusRanking,omitempty"`
+ VoipIndividualVideo *WebFeatures_WebFeaturesFlag `protobuf:"varint,22,opt,name=voipIndividualVideo,enum=proto.WebFeatures_WebFeaturesFlag" json:"voipIndividualVideo,omitempty"`
+ ThirdPartyStickers *WebFeatures_WebFeaturesFlag `protobuf:"varint,23,opt,name=thirdPartyStickers,enum=proto.WebFeatures_WebFeaturesFlag" json:"thirdPartyStickers,omitempty"`
+ FrequentlyForwardedSetting *WebFeatures_WebFeaturesFlag `protobuf:"varint,24,opt,name=frequentlyForwardedSetting,enum=proto.WebFeatures_WebFeaturesFlag" json:"frequentlyForwardedSetting,omitempty"`
+ GroupsV4JoinPermission *WebFeatures_WebFeaturesFlag `protobuf:"varint,25,opt,name=groupsV4JoinPermission,enum=proto.WebFeatures_WebFeaturesFlag" json:"groupsV4JoinPermission,omitempty"`
+ RecentStickers *WebFeatures_WebFeaturesFlag `protobuf:"varint,26,opt,name=recentStickers,enum=proto.WebFeatures_WebFeaturesFlag" json:"recentStickers,omitempty"`
+ Catalog *WebFeatures_WebFeaturesFlag `protobuf:"varint,27,opt,name=catalog,enum=proto.WebFeatures_WebFeaturesFlag" json:"catalog,omitempty"`
+ StarredStickers *WebFeatures_WebFeaturesFlag `protobuf:"varint,28,opt,name=starredStickers,enum=proto.WebFeatures_WebFeaturesFlag" json:"starredStickers,omitempty"`
+ VoipGroupCall *WebFeatures_WebFeaturesFlag `protobuf:"varint,29,opt,name=voipGroupCall,enum=proto.WebFeatures_WebFeaturesFlag" json:"voipGroupCall,omitempty"`
+ TemplateMessage *WebFeatures_WebFeaturesFlag `protobuf:"varint,30,opt,name=templateMessage,enum=proto.WebFeatures_WebFeaturesFlag" json:"templateMessage,omitempty"`
+ TemplateMessageInteractivity *WebFeatures_WebFeaturesFlag `protobuf:"varint,31,opt,name=templateMessageInteractivity,enum=proto.WebFeatures_WebFeaturesFlag" json:"templateMessageInteractivity,omitempty"`
+ EphemeralMessages *WebFeatures_WebFeaturesFlag `protobuf:"varint,32,opt,name=ephemeralMessages,enum=proto.WebFeatures_WebFeaturesFlag" json:"ephemeralMessages,omitempty"`
+ E2ENotificationSync *WebFeatures_WebFeaturesFlag `protobuf:"varint,33,opt,name=e2ENotificationSync,enum=proto.WebFeatures_WebFeaturesFlag" json:"e2ENotificationSync,omitempty"`
+ RecentStickersV2 *WebFeatures_WebFeaturesFlag `protobuf:"varint,34,opt,name=recentStickersV2,enum=proto.WebFeatures_WebFeaturesFlag" json:"recentStickersV2,omitempty"`
+ RecentStickersV3 *WebFeatures_WebFeaturesFlag `protobuf:"varint,36,opt,name=recentStickersV3,enum=proto.WebFeatures_WebFeaturesFlag" json:"recentStickersV3,omitempty"`
+ UserNotice *WebFeatures_WebFeaturesFlag `protobuf:"varint,37,opt,name=userNotice,enum=proto.WebFeatures_WebFeaturesFlag" json:"userNotice,omitempty"`
+ Support *WebFeatures_WebFeaturesFlag `protobuf:"varint,39,opt,name=support,enum=proto.WebFeatures_WebFeaturesFlag" json:"support,omitempty"`
+ GroupUiiCleanup *WebFeatures_WebFeaturesFlag `protobuf:"varint,40,opt,name=groupUiiCleanup,enum=proto.WebFeatures_WebFeaturesFlag" json:"groupUiiCleanup,omitempty"`
+ GroupDogfoodingInternalOnly *WebFeatures_WebFeaturesFlag `protobuf:"varint,41,opt,name=groupDogfoodingInternalOnly,enum=proto.WebFeatures_WebFeaturesFlag" json:"groupDogfoodingInternalOnly,omitempty"`
+ SettingsSync *WebFeatures_WebFeaturesFlag `protobuf:"varint,42,opt,name=settingsSync,enum=proto.WebFeatures_WebFeaturesFlag" json:"settingsSync,omitempty"`
+ ArchiveV2 *WebFeatures_WebFeaturesFlag `protobuf:"varint,43,opt,name=archiveV2,enum=proto.WebFeatures_WebFeaturesFlag" json:"archiveV2,omitempty"`
+ EphemeralAllowGroupMembers *WebFeatures_WebFeaturesFlag `protobuf:"varint,44,opt,name=ephemeralAllowGroupMembers,enum=proto.WebFeatures_WebFeaturesFlag" json:"ephemeralAllowGroupMembers,omitempty"`
+ Ephemeral24HDuration *WebFeatures_WebFeaturesFlag `protobuf:"varint,45,opt,name=ephemeral24HDuration,enum=proto.WebFeatures_WebFeaturesFlag" json:"ephemeral24HDuration,omitempty"`
+ MdForceUpgrade *WebFeatures_WebFeaturesFlag `protobuf:"varint,46,opt,name=mdForceUpgrade,enum=proto.WebFeatures_WebFeaturesFlag" json:"mdForceUpgrade,omitempty"`
+ DisappearingMode *WebFeatures_WebFeaturesFlag `protobuf:"varint,47,opt,name=disappearingMode,enum=proto.WebFeatures_WebFeaturesFlag" json:"disappearingMode,omitempty"`
+ ExternalMdOptInAvailable *WebFeatures_WebFeaturesFlag `protobuf:"varint,48,opt,name=externalMdOptInAvailable,enum=proto.WebFeatures_WebFeaturesFlag" json:"externalMdOptInAvailable,omitempty"`
+ NoDeleteMessageTimeLimit *WebFeatures_WebFeaturesFlag `protobuf:"varint,49,opt,name=noDeleteMessageTimeLimit,enum=proto.WebFeatures_WebFeaturesFlag" json:"noDeleteMessageTimeLimit,omitempty"`
+}
+
+func (x *WebFeatures) Reset() {
+ *x = WebFeatures{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[175]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WebFeatures) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WebFeatures) ProtoMessage() {}
+
+func (x *WebFeatures) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[175]
+ 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 WebFeatures.ProtoReflect.Descriptor instead.
+func (*WebFeatures) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{175}
+}
+
+func (x *WebFeatures) GetLabelsDisplay() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.LabelsDisplay != nil {
+ return *x.LabelsDisplay
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetVoipIndividualOutgoing() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.VoipIndividualOutgoing != nil {
+ return *x.VoipIndividualOutgoing
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetGroupsV3() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.GroupsV3 != nil {
+ return *x.GroupsV3
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetGroupsV3Create() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.GroupsV3Create != nil {
+ return *x.GroupsV3Create
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetChangeNumberV2() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.ChangeNumberV2 != nil {
+ return *x.ChangeNumberV2
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetQueryStatusV3Thumbnail() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.QueryStatusV3Thumbnail != nil {
+ return *x.QueryStatusV3Thumbnail
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetLiveLocations() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.LiveLocations != nil {
+ return *x.LiveLocations
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetQueryVname() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.QueryVname != nil {
+ return *x.QueryVname
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetVoipIndividualIncoming() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.VoipIndividualIncoming != nil {
+ return *x.VoipIndividualIncoming
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetQuickRepliesQuery() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.QuickRepliesQuery != nil {
+ return *x.QuickRepliesQuery
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetPayments() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.Payments != nil {
+ return *x.Payments
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetStickerPackQuery() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.StickerPackQuery != nil {
+ return *x.StickerPackQuery
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetLiveLocationsFinal() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.LiveLocationsFinal != nil {
+ return *x.LiveLocationsFinal
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetLabelsEdit() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.LabelsEdit != nil {
+ return *x.LabelsEdit
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetMediaUpload() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.MediaUpload != nil {
+ return *x.MediaUpload
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetMediaUploadRichQuickReplies() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.MediaUploadRichQuickReplies != nil {
+ return *x.MediaUploadRichQuickReplies
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetVnameV2() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.VnameV2 != nil {
+ return *x.VnameV2
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetVideoPlaybackUrl() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.VideoPlaybackUrl != nil {
+ return *x.VideoPlaybackUrl
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetStatusRanking() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.StatusRanking != nil {
+ return *x.StatusRanking
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetVoipIndividualVideo() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.VoipIndividualVideo != nil {
+ return *x.VoipIndividualVideo
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetThirdPartyStickers() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.ThirdPartyStickers != nil {
+ return *x.ThirdPartyStickers
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetFrequentlyForwardedSetting() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.FrequentlyForwardedSetting != nil {
+ return *x.FrequentlyForwardedSetting
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetGroupsV4JoinPermission() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.GroupsV4JoinPermission != nil {
+ return *x.GroupsV4JoinPermission
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetRecentStickers() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.RecentStickers != nil {
+ return *x.RecentStickers
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetCatalog() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.Catalog != nil {
+ return *x.Catalog
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetStarredStickers() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.StarredStickers != nil {
+ return *x.StarredStickers
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetVoipGroupCall() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.VoipGroupCall != nil {
+ return *x.VoipGroupCall
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetTemplateMessage() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.TemplateMessage != nil {
+ return *x.TemplateMessage
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetTemplateMessageInteractivity() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.TemplateMessageInteractivity != nil {
+ return *x.TemplateMessageInteractivity
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetEphemeralMessages() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.EphemeralMessages != nil {
+ return *x.EphemeralMessages
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetE2ENotificationSync() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.E2ENotificationSync != nil {
+ return *x.E2ENotificationSync
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetRecentStickersV2() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.RecentStickersV2 != nil {
+ return *x.RecentStickersV2
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetRecentStickersV3() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.RecentStickersV3 != nil {
+ return *x.RecentStickersV3
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetUserNotice() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.UserNotice != nil {
+ return *x.UserNotice
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetSupport() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.Support != nil {
+ return *x.Support
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetGroupUiiCleanup() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.GroupUiiCleanup != nil {
+ return *x.GroupUiiCleanup
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetGroupDogfoodingInternalOnly() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.GroupDogfoodingInternalOnly != nil {
+ return *x.GroupDogfoodingInternalOnly
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetSettingsSync() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.SettingsSync != nil {
+ return *x.SettingsSync
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetArchiveV2() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.ArchiveV2 != nil {
+ return *x.ArchiveV2
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetEphemeralAllowGroupMembers() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.EphemeralAllowGroupMembers != nil {
+ return *x.EphemeralAllowGroupMembers
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetEphemeral24HDuration() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.Ephemeral24HDuration != nil {
+ return *x.Ephemeral24HDuration
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetMdForceUpgrade() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.MdForceUpgrade != nil {
+ return *x.MdForceUpgrade
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetDisappearingMode() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.DisappearingMode != nil {
+ return *x.DisappearingMode
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetExternalMdOptInAvailable() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.ExternalMdOptInAvailable != nil {
+ return *x.ExternalMdOptInAvailable
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+func (x *WebFeatures) GetNoDeleteMessageTimeLimit() WebFeatures_WebFeaturesFlag {
+ if x != nil && x.NoDeleteMessageTimeLimit != nil {
+ return *x.NoDeleteMessageTimeLimit
+ }
+ return WebFeatures_NOT_STARTED
+}
+
+type NotificationMessageInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *MessageKey `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
+ Message *Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
+ MessageTimestamp *uint64 `protobuf:"varint,3,opt,name=messageTimestamp" json:"messageTimestamp,omitempty"`
+ Participant *string `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"`
+}
+
+func (x *NotificationMessageInfo) Reset() {
+ *x = NotificationMessageInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[176]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NotificationMessageInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NotificationMessageInfo) ProtoMessage() {}
+
+func (x *NotificationMessageInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[176]
+ 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 NotificationMessageInfo.ProtoReflect.Descriptor instead.
+func (*NotificationMessageInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{176}
+}
+
+func (x *NotificationMessageInfo) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+func (x *NotificationMessageInfo) GetMessage() *Message {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+func (x *NotificationMessageInfo) GetMessageTimestamp() uint64 {
+ if x != nil && x.MessageTimestamp != nil {
+ return *x.MessageTimestamp
+ }
+ return 0
+}
+
+func (x *NotificationMessageInfo) GetParticipant() string {
+ if x != nil && x.Participant != nil {
+ return *x.Participant
+ }
+ return ""
+}
+
+type WebNotificationsInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
+ UnreadChats *uint32 `protobuf:"varint,3,opt,name=unreadChats" json:"unreadChats,omitempty"`
+ NotifyMessageCount *uint32 `protobuf:"varint,4,opt,name=notifyMessageCount" json:"notifyMessageCount,omitempty"`
+ NotifyMessages []*WebMessageInfo `protobuf:"bytes,5,rep,name=notifyMessages" json:"notifyMessages,omitempty"`
+}
+
+func (x *WebNotificationsInfo) Reset() {
+ *x = WebNotificationsInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[177]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WebNotificationsInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WebNotificationsInfo) ProtoMessage() {}
+
+func (x *WebNotificationsInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[177]
+ 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 WebNotificationsInfo.ProtoReflect.Descriptor instead.
+func (*WebNotificationsInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{177}
+}
+
+func (x *WebNotificationsInfo) GetTimestamp() uint64 {
+ if x != nil && x.Timestamp != nil {
+ return *x.Timestamp
+ }
+ return 0
+}
+
+func (x *WebNotificationsInfo) GetUnreadChats() uint32 {
+ if x != nil && x.UnreadChats != nil {
+ return *x.UnreadChats
+ }
+ return 0
+}
+
+func (x *WebNotificationsInfo) GetNotifyMessageCount() uint32 {
+ if x != nil && x.NotifyMessageCount != nil {
+ return *x.NotifyMessageCount
+ }
+ return 0
+}
+
+func (x *WebNotificationsInfo) GetNotifyMessages() []*WebMessageInfo {
+ if x != nil {
+ return x.NotifyMessages
+ }
+ return nil
+}
+
+type PaymentInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CurrencyDeprecated *PaymentInfo_PaymentInfoCurrency `protobuf:"varint,1,opt,name=currencyDeprecated,enum=proto.PaymentInfo_PaymentInfoCurrency" json:"currencyDeprecated,omitempty"`
+ Amount1000 *uint64 `protobuf:"varint,2,opt,name=amount1000" json:"amount1000,omitempty"`
+ ReceiverJid *string `protobuf:"bytes,3,opt,name=receiverJid" json:"receiverJid,omitempty"`
+ Status *PaymentInfo_PaymentInfoStatus `protobuf:"varint,4,opt,name=status,enum=proto.PaymentInfo_PaymentInfoStatus" json:"status,omitempty"`
+ TransactionTimestamp *uint64 `protobuf:"varint,5,opt,name=transactionTimestamp" json:"transactionTimestamp,omitempty"`
+ RequestMessageKey *MessageKey `protobuf:"bytes,6,opt,name=requestMessageKey" json:"requestMessageKey,omitempty"`
+ ExpiryTimestamp *uint64 `protobuf:"varint,7,opt,name=expiryTimestamp" json:"expiryTimestamp,omitempty"`
+ Futureproofed *bool `protobuf:"varint,8,opt,name=futureproofed" json:"futureproofed,omitempty"`
+ Currency *string `protobuf:"bytes,9,opt,name=currency" json:"currency,omitempty"`
+ TxnStatus *PaymentInfo_PaymentInfoTxnStatus `protobuf:"varint,10,opt,name=txnStatus,enum=proto.PaymentInfo_PaymentInfoTxnStatus" json:"txnStatus,omitempty"`
+ UseNoviFiatFormat *bool `protobuf:"varint,11,opt,name=useNoviFiatFormat" json:"useNoviFiatFormat,omitempty"`
+ PrimaryAmount *Money `protobuf:"bytes,12,opt,name=primaryAmount" json:"primaryAmount,omitempty"`
+ ExchangeAmount *Money `protobuf:"bytes,13,opt,name=exchangeAmount" json:"exchangeAmount,omitempty"`
+}
+
+func (x *PaymentInfo) Reset() {
+ *x = PaymentInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[178]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PaymentInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaymentInfo) ProtoMessage() {}
+
+func (x *PaymentInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[178]
+ 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 PaymentInfo.ProtoReflect.Descriptor instead.
+func (*PaymentInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{178}
+}
+
+func (x *PaymentInfo) GetCurrencyDeprecated() PaymentInfo_PaymentInfoCurrency {
+ if x != nil && x.CurrencyDeprecated != nil {
+ return *x.CurrencyDeprecated
+ }
+ return PaymentInfo_UNKNOWN_CURRENCY
+}
+
+func (x *PaymentInfo) GetAmount1000() uint64 {
+ if x != nil && x.Amount1000 != nil {
+ return *x.Amount1000
+ }
+ return 0
+}
+
+func (x *PaymentInfo) GetReceiverJid() string {
+ if x != nil && x.ReceiverJid != nil {
+ return *x.ReceiverJid
+ }
+ return ""
+}
+
+func (x *PaymentInfo) GetStatus() PaymentInfo_PaymentInfoStatus {
+ if x != nil && x.Status != nil {
+ return *x.Status
+ }
+ return PaymentInfo_UNKNOWN_STATUS
+}
+
+func (x *PaymentInfo) GetTransactionTimestamp() uint64 {
+ if x != nil && x.TransactionTimestamp != nil {
+ return *x.TransactionTimestamp
+ }
+ return 0
+}
+
+func (x *PaymentInfo) GetRequestMessageKey() *MessageKey {
+ if x != nil {
+ return x.RequestMessageKey
+ }
+ return nil
+}
+
+func (x *PaymentInfo) GetExpiryTimestamp() uint64 {
+ if x != nil && x.ExpiryTimestamp != nil {
+ return *x.ExpiryTimestamp
+ }
+ return 0
+}
+
+func (x *PaymentInfo) GetFutureproofed() bool {
+ if x != nil && x.Futureproofed != nil {
+ return *x.Futureproofed
+ }
+ return false
+}
+
+func (x *PaymentInfo) GetCurrency() string {
+ if x != nil && x.Currency != nil {
+ return *x.Currency
+ }
+ return ""
+}
+
+func (x *PaymentInfo) GetTxnStatus() PaymentInfo_PaymentInfoTxnStatus {
+ if x != nil && x.TxnStatus != nil {
+ return *x.TxnStatus
+ }
+ return PaymentInfo_UNKNOWN
+}
+
+func (x *PaymentInfo) GetUseNoviFiatFormat() bool {
+ if x != nil && x.UseNoviFiatFormat != nil {
+ return *x.UseNoviFiatFormat
+ }
+ return false
+}
+
+func (x *PaymentInfo) GetPrimaryAmount() *Money {
+ if x != nil {
+ return x.PrimaryAmount
+ }
+ return nil
+}
+
+func (x *PaymentInfo) GetExchangeAmount() *Money {
+ if x != nil {
+ return x.ExchangeAmount
+ }
+ return nil
+}
+
+type WebMessageInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key *MessageKey `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
+ Message *Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
+ MessageTimestamp *uint64 `protobuf:"varint,3,opt,name=messageTimestamp" json:"messageTimestamp,omitempty"`
+ Status *WebMessageInfo_WebMessageInfoStatus `protobuf:"varint,4,opt,name=status,enum=proto.WebMessageInfo_WebMessageInfoStatus" json:"status,omitempty"`
+ Participant *string `protobuf:"bytes,5,opt,name=participant" json:"participant,omitempty"`
+ MessageC2STimestamp *uint64 `protobuf:"varint,6,opt,name=messageC2STimestamp" json:"messageC2STimestamp,omitempty"`
+ Ignore *bool `protobuf:"varint,16,opt,name=ignore" json:"ignore,omitempty"`
+ Starred *bool `protobuf:"varint,17,opt,name=starred" json:"starred,omitempty"`
+ Broadcast *bool `protobuf:"varint,18,opt,name=broadcast" json:"broadcast,omitempty"`
+ PushName *string `protobuf:"bytes,19,opt,name=pushName" json:"pushName,omitempty"`
+ MediaCiphertextSha256 []byte `protobuf:"bytes,20,opt,name=mediaCiphertextSha256" json:"mediaCiphertextSha256,omitempty"`
+ Multicast *bool `protobuf:"varint,21,opt,name=multicast" json:"multicast,omitempty"`
+ UrlText *bool `protobuf:"varint,22,opt,name=urlText" json:"urlText,omitempty"`
+ UrlNumber *bool `protobuf:"varint,23,opt,name=urlNumber" json:"urlNumber,omitempty"`
+ MessageStubType *WebMessageInfo_WebMessageInfoStubType `protobuf:"varint,24,opt,name=messageStubType,enum=proto.WebMessageInfo_WebMessageInfoStubType" json:"messageStubType,omitempty"`
+ ClearMedia *bool `protobuf:"varint,25,opt,name=clearMedia" json:"clearMedia,omitempty"`
+ MessageStubParameters []string `protobuf:"bytes,26,rep,name=messageStubParameters" json:"messageStubParameters,omitempty"`
+ Duration *uint32 `protobuf:"varint,27,opt,name=duration" json:"duration,omitempty"`
+ Labels []string `protobuf:"bytes,28,rep,name=labels" json:"labels,omitempty"`
+ PaymentInfo *PaymentInfo `protobuf:"bytes,29,opt,name=paymentInfo" json:"paymentInfo,omitempty"`
+ FinalLiveLocation *LiveLocationMessage `protobuf:"bytes,30,opt,name=finalLiveLocation" json:"finalLiveLocation,omitempty"`
+ QuotedPaymentInfo *PaymentInfo `protobuf:"bytes,31,opt,name=quotedPaymentInfo" json:"quotedPaymentInfo,omitempty"`
+ EphemeralStartTimestamp *uint64 `protobuf:"varint,32,opt,name=ephemeralStartTimestamp" json:"ephemeralStartTimestamp,omitempty"`
+ EphemeralDuration *uint32 `protobuf:"varint,33,opt,name=ephemeralDuration" json:"ephemeralDuration,omitempty"`
+ EphemeralOffToOn *bool `protobuf:"varint,34,opt,name=ephemeralOffToOn" json:"ephemeralOffToOn,omitempty"`
+ EphemeralOutOfSync *bool `protobuf:"varint,35,opt,name=ephemeralOutOfSync" json:"ephemeralOutOfSync,omitempty"`
+ BizPrivacyStatus *WebMessageInfo_WebMessageInfoBizPrivacyStatus `protobuf:"varint,36,opt,name=bizPrivacyStatus,enum=proto.WebMessageInfo_WebMessageInfoBizPrivacyStatus" json:"bizPrivacyStatus,omitempty"`
+ VerifiedBizName *string `protobuf:"bytes,37,opt,name=verifiedBizName" json:"verifiedBizName,omitempty"`
+ MediaData *MediaData `protobuf:"bytes,38,opt,name=mediaData" json:"mediaData,omitempty"`
+ PhotoChange *PhotoChange `protobuf:"bytes,39,opt,name=photoChange" json:"photoChange,omitempty"`
+ UserReceipt []*UserReceipt `protobuf:"bytes,40,rep,name=userReceipt" json:"userReceipt,omitempty"`
+ Reactions []*Reaction `protobuf:"bytes,41,rep,name=reactions" json:"reactions,omitempty"`
+ QuotedStickerData *MediaData `protobuf:"bytes,42,opt,name=quotedStickerData" json:"quotedStickerData,omitempty"`
+ FutureproofData []byte `protobuf:"bytes,43,opt,name=futureproofData" json:"futureproofData,omitempty"`
+ StatusPsa *StatusPSA `protobuf:"bytes,44,opt,name=statusPsa" json:"statusPsa,omitempty"`
+}
+
+func (x *WebMessageInfo) Reset() {
+ *x = WebMessageInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_binary_proto_def_proto_msgTypes[179]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WebMessageInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WebMessageInfo) ProtoMessage() {}
+
+func (x *WebMessageInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_binary_proto_def_proto_msgTypes[179]
+ 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 WebMessageInfo.ProtoReflect.Descriptor instead.
+func (*WebMessageInfo) Descriptor() ([]byte, []int) {
+ return file_binary_proto_def_proto_rawDescGZIP(), []int{179}
+}
+
+func (x *WebMessageInfo) GetKey() *MessageKey {
+ if x != nil {
+ return x.Key
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetMessage() *Message {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetMessageTimestamp() uint64 {
+ if x != nil && x.MessageTimestamp != nil {
+ return *x.MessageTimestamp
+ }
+ return 0
+}
+
+func (x *WebMessageInfo) GetStatus() WebMessageInfo_WebMessageInfoStatus {
+ if x != nil && x.Status != nil {
+ return *x.Status
+ }
+ return WebMessageInfo_ERROR
+}
+
+func (x *WebMessageInfo) GetParticipant() string {
+ if x != nil && x.Participant != nil {
+ return *x.Participant
+ }
+ return ""
+}
+
+func (x *WebMessageInfo) GetMessageC2STimestamp() uint64 {
+ if x != nil && x.MessageC2STimestamp != nil {
+ return *x.MessageC2STimestamp
+ }
+ return 0
+}
+
+func (x *WebMessageInfo) GetIgnore() bool {
+ if x != nil && x.Ignore != nil {
+ return *x.Ignore
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetStarred() bool {
+ if x != nil && x.Starred != nil {
+ return *x.Starred
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetBroadcast() bool {
+ if x != nil && x.Broadcast != nil {
+ return *x.Broadcast
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetPushName() string {
+ if x != nil && x.PushName != nil {
+ return *x.PushName
+ }
+ return ""
+}
+
+func (x *WebMessageInfo) GetMediaCiphertextSha256() []byte {
+ if x != nil {
+ return x.MediaCiphertextSha256
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetMulticast() bool {
+ if x != nil && x.Multicast != nil {
+ return *x.Multicast
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetUrlText() bool {
+ if x != nil && x.UrlText != nil {
+ return *x.UrlText
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetUrlNumber() bool {
+ if x != nil && x.UrlNumber != nil {
+ return *x.UrlNumber
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetMessageStubType() WebMessageInfo_WebMessageInfoStubType {
+ if x != nil && x.MessageStubType != nil {
+ return *x.MessageStubType
+ }
+ return WebMessageInfo_UNKNOWN
+}
+
+func (x *WebMessageInfo) GetClearMedia() bool {
+ if x != nil && x.ClearMedia != nil {
+ return *x.ClearMedia
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetMessageStubParameters() []string {
+ if x != nil {
+ return x.MessageStubParameters
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetDuration() uint32 {
+ if x != nil && x.Duration != nil {
+ return *x.Duration
+ }
+ return 0
+}
+
+func (x *WebMessageInfo) GetLabels() []string {
+ if x != nil {
+ return x.Labels
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetPaymentInfo() *PaymentInfo {
+ if x != nil {
+ return x.PaymentInfo
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetFinalLiveLocation() *LiveLocationMessage {
+ if x != nil {
+ return x.FinalLiveLocation
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetQuotedPaymentInfo() *PaymentInfo {
+ if x != nil {
+ return x.QuotedPaymentInfo
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetEphemeralStartTimestamp() uint64 {
+ if x != nil && x.EphemeralStartTimestamp != nil {
+ return *x.EphemeralStartTimestamp
+ }
+ return 0
+}
+
+func (x *WebMessageInfo) GetEphemeralDuration() uint32 {
+ if x != nil && x.EphemeralDuration != nil {
+ return *x.EphemeralDuration
+ }
+ return 0
+}
+
+func (x *WebMessageInfo) GetEphemeralOffToOn() bool {
+ if x != nil && x.EphemeralOffToOn != nil {
+ return *x.EphemeralOffToOn
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetEphemeralOutOfSync() bool {
+ if x != nil && x.EphemeralOutOfSync != nil {
+ return *x.EphemeralOutOfSync
+ }
+ return false
+}
+
+func (x *WebMessageInfo) GetBizPrivacyStatus() WebMessageInfo_WebMessageInfoBizPrivacyStatus {
+ if x != nil && x.BizPrivacyStatus != nil {
+ return *x.BizPrivacyStatus
+ }
+ return WebMessageInfo_E2EE
+}
+
+func (x *WebMessageInfo) GetVerifiedBizName() string {
+ if x != nil && x.VerifiedBizName != nil {
+ return *x.VerifiedBizName
+ }
+ return ""
+}
+
+func (x *WebMessageInfo) GetMediaData() *MediaData {
+ if x != nil {
+ return x.MediaData
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetPhotoChange() *PhotoChange {
+ if x != nil {
+ return x.PhotoChange
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetUserReceipt() []*UserReceipt {
+ if x != nil {
+ return x.UserReceipt
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetReactions() []*Reaction {
+ if x != nil {
+ return x.Reactions
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetQuotedStickerData() *MediaData {
+ if x != nil {
+ return x.QuotedStickerData
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetFutureproofData() []byte {
+ if x != nil {
+ return x.FutureproofData
+ }
+ return nil
+}
+
+func (x *WebMessageInfo) GetStatusPsa() *StatusPSA {
+ if x != nil {
+ return x.StatusPsa
+ }
+ return nil
+}
+
+var File_binary_proto_def_proto protoreflect.FileDescriptor
+
+//go:embed def.pb.raw
+var file_binary_proto_def_proto_rawDesc []byte
+
+var (
+ file_binary_proto_def_proto_rawDescOnce sync.Once
+ file_binary_proto_def_proto_rawDescData = file_binary_proto_def_proto_rawDesc
+)
+
+func file_binary_proto_def_proto_rawDescGZIP() []byte {
+ file_binary_proto_def_proto_rawDescOnce.Do(func() {
+ file_binary_proto_def_proto_rawDescData = protoimpl.X.CompressGZIP(file_binary_proto_def_proto_rawDescData)
+ })
+ return file_binary_proto_def_proto_rawDescData
+}
+
+var file_binary_proto_def_proto_enumTypes = make([]protoimpl.EnumInfo, 50)
+var file_binary_proto_def_proto_msgTypes = make([]protoimpl.MessageInfo, 180)
+var file_binary_proto_def_proto_goTypes = []interface{}{
+ (MediaVisibility)(0), // 0: proto.MediaVisibility
+ (UserAgent_UserAgentPlatform)(0), // 1: proto.UserAgent.UserAgentPlatform
+ (UserAgent_UserAgentReleaseChannel)(0), // 2: proto.UserAgent.UserAgentReleaseChannel
+ (WebInfo_WebInfoWebSubPlatform)(0), // 3: proto.WebInfo.WebInfoWebSubPlatform
+ (DNSSource_DNSSourceDNSResolutionMethod)(0), // 4: proto.DNSSource.DNSSourceDNSResolutionMethod
+ (ClientPayload_ClientPayloadConnectType)(0), // 5: proto.ClientPayload.ClientPayloadConnectType
+ (ClientPayload_ClientPayloadConnectReason)(0), // 6: proto.ClientPayload.ClientPayloadConnectReason
+ (ClientPayload_ClientPayloadProduct)(0), // 7: proto.ClientPayload.ClientPayloadProduct
+ (ClientPayload_ClientPayloadIOSAppExtension)(0), // 8: proto.ClientPayload.ClientPayloadIOSAppExtension
+ (BizIdentityInfo_BizIdentityInfoVerifiedLevelValue)(0), // 9: proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue
+ (BizIdentityInfo_BizIdentityInfoHostStorageType)(0), // 10: proto.BizIdentityInfo.BizIdentityInfoHostStorageType
+ (BizIdentityInfo_BizIdentityInfoActualActorsType)(0), // 11: proto.BizIdentityInfo.BizIdentityInfoActualActorsType
+ (BizAccountLinkInfo_BizAccountLinkInfoHostStorageType)(0), // 12: proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType
+ (BizAccountLinkInfo_BizAccountLinkInfoAccountType)(0), // 13: proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType
+ (SyncdMutation_SyncdMutationSyncdOperation)(0), // 14: proto.SyncdMutation.SyncdMutationSyncdOperation
+ (MediaRetryNotification_MediaRetryNotificationResultType)(0), // 15: proto.MediaRetryNotification.MediaRetryNotificationResultType
+ (GroupParticipant_GroupParticipantRank)(0), // 16: proto.GroupParticipant.GroupParticipantRank
+ (Conversation_ConversationEndOfHistoryTransferType)(0), // 17: proto.Conversation.ConversationEndOfHistoryTransferType
+ (HistorySync_HistorySyncHistorySyncType)(0), // 18: proto.HistorySync.HistorySyncHistorySyncType
+ (AdReplyInfo_AdReplyInfoMediaType)(0), // 19: proto.AdReplyInfo.AdReplyInfoMediaType
+ (ExternalAdReplyInfo_ExternalAdReplyInfoMediaType)(0), // 20: proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType
+ (InvoiceMessage_InvoiceMessageAttachmentType)(0), // 21: proto.InvoiceMessage.InvoiceMessageAttachmentType
+ (ExtendedTextMessage_ExtendedTextMessageFontType)(0), // 22: proto.ExtendedTextMessage.ExtendedTextMessageFontType
+ (ExtendedTextMessage_ExtendedTextMessagePreviewType)(0), // 23: proto.ExtendedTextMessage.ExtendedTextMessagePreviewType
+ (ExtendedTextMessage_ExtendedTextMessageInviteLinkGroupType)(0), // 24: proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType
+ (VideoMessage_VideoMessageAttribution)(0), // 25: proto.VideoMessage.VideoMessageAttribution
+ (ProtocolMessage_ProtocolMessageType)(0), // 26: proto.ProtocolMessage.ProtocolMessageType
+ (HistorySyncNotification_HistorySyncNotificationHistorySyncType)(0), // 27: proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType
+ (HSMDateTimeComponent_HSMDateTimeComponentDayOfWeekType)(0), // 28: proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType
+ (HSMDateTimeComponent_HSMDateTimeComponentCalendarType)(0), // 29: proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType
+ (PaymentInviteMessage_PaymentInviteMessageServiceType)(0), // 30: proto.PaymentInviteMessage.PaymentInviteMessageServiceType
+ (OrderMessage_OrderMessageOrderStatus)(0), // 31: proto.OrderMessage.OrderMessageOrderStatus
+ (OrderMessage_OrderMessageOrderSurface)(0), // 32: proto.OrderMessage.OrderMessageOrderSurface
+ (ListMessage_ListMessageListType)(0), // 33: proto.ListMessage.ListMessageListType
+ (ListResponseMessage_ListResponseMessageListType)(0), // 34: proto.ListResponseMessage.ListResponseMessageListType
+ (ShopMessage_ShopMessageSurface)(0), // 35: proto.ShopMessage.ShopMessageSurface
+ (GroupInviteMessage_GroupInviteMessageGroupType)(0), // 36: proto.GroupInviteMessage.GroupInviteMessageGroupType
+ (Button_ButtonType)(0), // 37: proto.Button.ButtonType
+ (ButtonsMessage_ButtonsMessageHeaderType)(0), // 38: proto.ButtonsMessage.ButtonsMessageHeaderType
+ (ButtonsResponseMessage_ButtonsResponseMessageType)(0), // 39: proto.ButtonsResponseMessage.ButtonsResponseMessageType
+ (DisappearingMode_DisappearingModeInitiator)(0), // 40: proto.DisappearingMode.DisappearingModeInitiator
+ (PaymentBackground_PaymentBackgroundType)(0), // 41: proto.PaymentBackground.PaymentBackgroundType
+ (CompanionProps_CompanionPropsPlatformType)(0), // 42: proto.CompanionProps.CompanionPropsPlatformType
+ (WebFeatures_WebFeaturesFlag)(0), // 43: proto.WebFeatures.WebFeaturesFlag
+ (PaymentInfo_PaymentInfoCurrency)(0), // 44: proto.PaymentInfo.PaymentInfoCurrency
+ (PaymentInfo_PaymentInfoStatus)(0), // 45: proto.PaymentInfo.PaymentInfoStatus
+ (PaymentInfo_PaymentInfoTxnStatus)(0), // 46: proto.PaymentInfo.PaymentInfoTxnStatus
+ (WebMessageInfo_WebMessageInfoStatus)(0), // 47: proto.WebMessageInfo.WebMessageInfoStatus
+ (WebMessageInfo_WebMessageInfoStubType)(0), // 48: proto.WebMessageInfo.WebMessageInfoStubType
+ (WebMessageInfo_WebMessageInfoBizPrivacyStatus)(0), // 49: proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus
+ (*AppVersion)(nil), // 50: proto.AppVersion
+ (*UserAgent)(nil), // 51: proto.UserAgent
+ (*WebdPayload)(nil), // 52: proto.WebdPayload
+ (*WebInfo)(nil), // 53: proto.WebInfo
+ (*DNSSource)(nil), // 54: proto.DNSSource
+ (*CompanionRegData)(nil), // 55: proto.CompanionRegData
+ (*ClientPayload)(nil), // 56: proto.ClientPayload
+ (*NoiseCertificateDetails)(nil), // 57: proto.NoiseCertificateDetails
+ (*NoiseCertificate)(nil), // 58: proto.NoiseCertificate
+ (*ClientHello)(nil), // 59: proto.ClientHello
+ (*ServerHello)(nil), // 60: proto.ServerHello
+ (*ClientFinish)(nil), // 61: proto.ClientFinish
+ (*HandshakeMessage)(nil), // 62: proto.HandshakeMessage
+ (*BizIdentityInfo)(nil), // 63: proto.BizIdentityInfo
+ (*BizAccountLinkInfo)(nil), // 64: proto.BizAccountLinkInfo
+ (*BizAccountPayload)(nil), // 65: proto.BizAccountPayload
+ (*VerifiedNameDetails)(nil), // 66: proto.VerifiedNameDetails
+ (*VerifiedNameCertificate)(nil), // 67: proto.VerifiedNameCertificate
+ (*LocalizedName)(nil), // 68: proto.LocalizedName
+ (*SyncActionData)(nil), // 69: proto.SyncActionData
+ (*StarAction)(nil), // 70: proto.StarAction
+ (*ContactAction)(nil), // 71: proto.ContactAction
+ (*MuteAction)(nil), // 72: proto.MuteAction
+ (*PinAction)(nil), // 73: proto.PinAction
+ (*SecurityNotificationSetting)(nil), // 74: proto.SecurityNotificationSetting
+ (*PushNameSetting)(nil), // 75: proto.PushNameSetting
+ (*LocaleSetting)(nil), // 76: proto.LocaleSetting
+ (*QuickReplyAction)(nil), // 77: proto.QuickReplyAction
+ (*LabelAssociationAction)(nil), // 78: proto.LabelAssociationAction
+ (*LabelEditAction)(nil), // 79: proto.LabelEditAction
+ (*RecentStickerWeightsAction)(nil), // 80: proto.RecentStickerWeightsAction
+ (*RecentStickerMetadata)(nil), // 81: proto.RecentStickerMetadata
+ (*RecentEmojiWeightsAction)(nil), // 82: proto.RecentEmojiWeightsAction
+ (*FavoriteStickerAction)(nil), // 83: proto.FavoriteStickerAction
+ (*ArchiveChatAction)(nil), // 84: proto.ArchiveChatAction
+ (*DeleteMessageForMeAction)(nil), // 85: proto.DeleteMessageForMeAction
+ (*MarkChatAsReadAction)(nil), // 86: proto.MarkChatAsReadAction
+ (*ClearChatAction)(nil), // 87: proto.ClearChatAction
+ (*DeleteChatAction)(nil), // 88: proto.DeleteChatAction
+ (*UnarchiveChatsSetting)(nil), // 89: proto.UnarchiveChatsSetting
+ (*SyncActionMessageRange)(nil), // 90: proto.SyncActionMessageRange
+ (*SyncActionMessage)(nil), // 91: proto.SyncActionMessage
+ (*KeyExpiration)(nil), // 92: proto.KeyExpiration
+ (*PrimaryFeature)(nil), // 93: proto.PrimaryFeature
+ (*AndroidUnsupportedActions)(nil), // 94: proto.AndroidUnsupportedActions
+ (*SyncActionValue)(nil), // 95: proto.SyncActionValue
+ (*RecentEmojiWeight)(nil), // 96: proto.RecentEmojiWeight
+ (*RecentStickerWeight)(nil), // 97: proto.RecentStickerWeight
+ (*SyncdPatch)(nil), // 98: proto.SyncdPatch
+ (*SyncdMutation)(nil), // 99: proto.SyncdMutation
+ (*SyncdMutations)(nil), // 100: proto.SyncdMutations
+ (*SyncdSnapshot)(nil), // 101: proto.SyncdSnapshot
+ (*ExternalBlobReference)(nil), // 102: proto.ExternalBlobReference
+ (*SyncdRecord)(nil), // 103: proto.SyncdRecord
+ (*KeyId)(nil), // 104: proto.KeyId
+ (*SyncdValue)(nil), // 105: proto.SyncdValue
+ (*SyncdIndex)(nil), // 106: proto.SyncdIndex
+ (*ExitCode)(nil), // 107: proto.ExitCode
+ (*SyncdVersion)(nil), // 108: proto.SyncdVersion
+ (*ServerErrorReceipt)(nil), // 109: proto.ServerErrorReceipt
+ (*MediaRetryNotification)(nil), // 110: proto.MediaRetryNotification
+ (*MsgOpaqueData)(nil), // 111: proto.MsgOpaqueData
+ (*MsgRowOpaqueData)(nil), // 112: proto.MsgRowOpaqueData
+ (*GlobalSettings)(nil), // 113: proto.GlobalSettings
+ (*WallpaperSettings)(nil), // 114: proto.WallpaperSettings
+ (*GroupParticipant)(nil), // 115: proto.GroupParticipant
+ (*Pushname)(nil), // 116: proto.Pushname
+ (*HistorySyncMsg)(nil), // 117: proto.HistorySyncMsg
+ (*Conversation)(nil), // 118: proto.Conversation
+ (*HistorySync)(nil), // 119: proto.HistorySync
+ (*EphemeralSetting)(nil), // 120: proto.EphemeralSetting
+ (*InteractiveAnnotation)(nil), // 121: proto.InteractiveAnnotation
+ (*DeviceListMetadata)(nil), // 122: proto.DeviceListMetadata
+ (*MessageContextInfo)(nil), // 123: proto.MessageContextInfo
+ (*AdReplyInfo)(nil), // 124: proto.AdReplyInfo
+ (*ExternalAdReplyInfo)(nil), // 125: proto.ExternalAdReplyInfo
+ (*ContextInfo)(nil), // 126: proto.ContextInfo
+ (*SenderKeyDistributionMessage)(nil), // 127: proto.SenderKeyDistributionMessage
+ (*ImageMessage)(nil), // 128: proto.ImageMessage
+ (*InvoiceMessage)(nil), // 129: proto.InvoiceMessage
+ (*ContactMessage)(nil), // 130: proto.ContactMessage
+ (*LocationMessage)(nil), // 131: proto.LocationMessage
+ (*ExtendedTextMessage)(nil), // 132: proto.ExtendedTextMessage
+ (*DocumentMessage)(nil), // 133: proto.DocumentMessage
+ (*AudioMessage)(nil), // 134: proto.AudioMessage
+ (*VideoMessage)(nil), // 135: proto.VideoMessage
+ (*Call)(nil), // 136: proto.Call
+ (*Chat)(nil), // 137: proto.Chat
+ (*ProtocolMessage)(nil), // 138: proto.ProtocolMessage
+ (*HistorySyncNotification)(nil), // 139: proto.HistorySyncNotification
+ (*AppStateSyncKey)(nil), // 140: proto.AppStateSyncKey
+ (*AppStateSyncKeyId)(nil), // 141: proto.AppStateSyncKeyId
+ (*AppStateSyncKeyFingerprint)(nil), // 142: proto.AppStateSyncKeyFingerprint
+ (*AppStateSyncKeyData)(nil), // 143: proto.AppStateSyncKeyData
+ (*AppStateSyncKeyShare)(nil), // 144: proto.AppStateSyncKeyShare
+ (*AppStateSyncKeyRequest)(nil), // 145: proto.AppStateSyncKeyRequest
+ (*AppStateFatalExceptionNotification)(nil), // 146: proto.AppStateFatalExceptionNotification
+ (*InitialSecurityNotificationSettingSync)(nil), // 147: proto.InitialSecurityNotificationSettingSync
+ (*ContactsArrayMessage)(nil), // 148: proto.ContactsArrayMessage
+ (*HSMCurrency)(nil), // 149: proto.HSMCurrency
+ (*HSMDateTimeComponent)(nil), // 150: proto.HSMDateTimeComponent
+ (*HSMDateTimeUnixEpoch)(nil), // 151: proto.HSMDateTimeUnixEpoch
+ (*HSMDateTime)(nil), // 152: proto.HSMDateTime
+ (*HSMLocalizableParameter)(nil), // 153: proto.HSMLocalizableParameter
+ (*HighlyStructuredMessage)(nil), // 154: proto.HighlyStructuredMessage
+ (*SendPaymentMessage)(nil), // 155: proto.SendPaymentMessage
+ (*RequestPaymentMessage)(nil), // 156: proto.RequestPaymentMessage
+ (*DeclinePaymentRequestMessage)(nil), // 157: proto.DeclinePaymentRequestMessage
+ (*CancelPaymentRequestMessage)(nil), // 158: proto.CancelPaymentRequestMessage
+ (*PaymentInviteMessage)(nil), // 159: proto.PaymentInviteMessage
+ (*LiveLocationMessage)(nil), // 160: proto.LiveLocationMessage
+ (*StickerMessage)(nil), // 161: proto.StickerMessage
+ (*FourRowTemplate)(nil), // 162: proto.FourRowTemplate
+ (*HydratedFourRowTemplate)(nil), // 163: proto.HydratedFourRowTemplate
+ (*TemplateMessage)(nil), // 164: proto.TemplateMessage
+ (*TemplateButtonReplyMessage)(nil), // 165: proto.TemplateButtonReplyMessage
+ (*CatalogSnapshot)(nil), // 166: proto.CatalogSnapshot
+ (*ProductSnapshot)(nil), // 167: proto.ProductSnapshot
+ (*ProductMessage)(nil), // 168: proto.ProductMessage
+ (*OrderMessage)(nil), // 169: proto.OrderMessage
+ (*Row)(nil), // 170: proto.Row
+ (*Section)(nil), // 171: proto.Section
+ (*Product)(nil), // 172: proto.Product
+ (*ProductSection)(nil), // 173: proto.ProductSection
+ (*ProductListHeaderImage)(nil), // 174: proto.ProductListHeaderImage
+ (*ProductListInfo)(nil), // 175: proto.ProductListInfo
+ (*ListMessage)(nil), // 176: proto.ListMessage
+ (*SingleSelectReply)(nil), // 177: proto.SingleSelectReply
+ (*ListResponseMessage)(nil), // 178: proto.ListResponseMessage
+ (*Header)(nil), // 179: proto.Header
+ (*Body)(nil), // 180: proto.Body
+ (*Footer)(nil), // 181: proto.Footer
+ (*ShopMessage)(nil), // 182: proto.ShopMessage
+ (*CollectionMessage)(nil), // 183: proto.CollectionMessage
+ (*NativeFlowButton)(nil), // 184: proto.NativeFlowButton
+ (*NativeFlowMessage)(nil), // 185: proto.NativeFlowMessage
+ (*InteractiveMessage)(nil), // 186: proto.InteractiveMessage
+ (*GroupInviteMessage)(nil), // 187: proto.GroupInviteMessage
+ (*DeviceSentMessage)(nil), // 188: proto.DeviceSentMessage
+ (*FutureProofMessage)(nil), // 189: proto.FutureProofMessage
+ (*ButtonText)(nil), // 190: proto.ButtonText
+ (*NativeFlowInfo)(nil), // 191: proto.NativeFlowInfo
+ (*Button)(nil), // 192: proto.Button
+ (*ButtonsMessage)(nil), // 193: proto.ButtonsMessage
+ (*ButtonsResponseMessage)(nil), // 194: proto.ButtonsResponseMessage
+ (*ReactionMessage)(nil), // 195: proto.ReactionMessage
+ (*StickerSyncRMRMessage)(nil), // 196: proto.StickerSyncRMRMessage
+ (*Message)(nil), // 197: proto.Message
+ (*ActionLink)(nil), // 198: proto.ActionLink
+ (*DisappearingMode)(nil), // 199: proto.DisappearingMode
+ (*PBMediaData)(nil), // 200: proto.PBMediaData
+ (*PaymentBackground)(nil), // 201: proto.PaymentBackground
+ (*Money)(nil), // 202: proto.Money
+ (*HydratedQuickReplyButton)(nil), // 203: proto.HydratedQuickReplyButton
+ (*HydratedURLButton)(nil), // 204: proto.HydratedURLButton
+ (*HydratedCallButton)(nil), // 205: proto.HydratedCallButton
+ (*HydratedTemplateButton)(nil), // 206: proto.HydratedTemplateButton
+ (*QuickReplyButton)(nil), // 207: proto.QuickReplyButton
+ (*URLButton)(nil), // 208: proto.URLButton
+ (*CallButton)(nil), // 209: proto.CallButton
+ (*TemplateButton)(nil), // 210: proto.TemplateButton
+ (*Location)(nil), // 211: proto.Location
+ (*Point)(nil), // 212: proto.Point
+ (*CompanionProps)(nil), // 213: proto.CompanionProps
+ (*ADVSignedDeviceIdentityHMAC)(nil), // 214: proto.ADVSignedDeviceIdentityHMAC
+ (*ADVSignedDeviceIdentity)(nil), // 215: proto.ADVSignedDeviceIdentity
+ (*ADVDeviceIdentity)(nil), // 216: proto.ADVDeviceIdentity
+ (*ADVSignedKeyIndexList)(nil), // 217: proto.ADVSignedKeyIndexList
+ (*ADVKeyIndexList)(nil), // 218: proto.ADVKeyIndexList
+ (*MessageKey)(nil), // 219: proto.MessageKey
+ (*Reaction)(nil), // 220: proto.Reaction
+ (*UserReceipt)(nil), // 221: proto.UserReceipt
+ (*StatusPSA)(nil), // 222: proto.StatusPSA
+ (*PhotoChange)(nil), // 223: proto.PhotoChange
+ (*MediaData)(nil), // 224: proto.MediaData
+ (*WebFeatures)(nil), // 225: proto.WebFeatures
+ (*NotificationMessageInfo)(nil), // 226: proto.NotificationMessageInfo
+ (*WebNotificationsInfo)(nil), // 227: proto.WebNotificationsInfo
+ (*PaymentInfo)(nil), // 228: proto.PaymentInfo
+ (*WebMessageInfo)(nil), // 229: proto.WebMessageInfo
+}
+var file_binary_proto_def_proto_depIdxs = []int32{
+ 1, // 0: proto.UserAgent.platform:type_name -> proto.UserAgent.UserAgentPlatform
+ 50, // 1: proto.UserAgent.appVersion:type_name -> proto.AppVersion
+ 2, // 2: proto.UserAgent.releaseChannel:type_name -> proto.UserAgent.UserAgentReleaseChannel
+ 52, // 3: proto.WebInfo.webdPayload:type_name -> proto.WebdPayload
+ 3, // 4: proto.WebInfo.webSubPlatform:type_name -> proto.WebInfo.WebInfoWebSubPlatform
+ 4, // 5: proto.DNSSource.dnsMethod:type_name -> proto.DNSSource.DNSSourceDNSResolutionMethod
+ 51, // 6: proto.ClientPayload.userAgent:type_name -> proto.UserAgent
+ 53, // 7: proto.ClientPayload.webInfo:type_name -> proto.WebInfo
+ 5, // 8: proto.ClientPayload.connectType:type_name -> proto.ClientPayload.ClientPayloadConnectType
+ 6, // 9: proto.ClientPayload.connectReason:type_name -> proto.ClientPayload.ClientPayloadConnectReason
+ 54, // 10: proto.ClientPayload.dnsSource:type_name -> proto.DNSSource
+ 55, // 11: proto.ClientPayload.regData:type_name -> proto.CompanionRegData
+ 7, // 12: proto.ClientPayload.product:type_name -> proto.ClientPayload.ClientPayloadProduct
+ 8, // 13: proto.ClientPayload.iosAppExtension:type_name -> proto.ClientPayload.ClientPayloadIOSAppExtension
+ 59, // 14: proto.HandshakeMessage.clientHello:type_name -> proto.ClientHello
+ 60, // 15: proto.HandshakeMessage.serverHello:type_name -> proto.ServerHello
+ 61, // 16: proto.HandshakeMessage.clientFinish:type_name -> proto.ClientFinish
+ 9, // 17: proto.BizIdentityInfo.vlevel:type_name -> proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue
+ 67, // 18: proto.BizIdentityInfo.vnameCert:type_name -> proto.VerifiedNameCertificate
+ 10, // 19: proto.BizIdentityInfo.hostStorage:type_name -> proto.BizIdentityInfo.BizIdentityInfoHostStorageType
+ 11, // 20: proto.BizIdentityInfo.actualActors:type_name -> proto.BizIdentityInfo.BizIdentityInfoActualActorsType
+ 12, // 21: proto.BizAccountLinkInfo.hostStorage:type_name -> proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType
+ 13, // 22: proto.BizAccountLinkInfo.accountType:type_name -> proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType
+ 67, // 23: proto.BizAccountPayload.vnameCert:type_name -> proto.VerifiedNameCertificate
+ 68, // 24: proto.VerifiedNameDetails.localizedNames:type_name -> proto.LocalizedName
+ 95, // 25: proto.SyncActionData.value:type_name -> proto.SyncActionValue
+ 97, // 26: proto.RecentStickerWeightsAction.weights:type_name -> proto.RecentStickerWeight
+ 96, // 27: proto.RecentEmojiWeightsAction.weights:type_name -> proto.RecentEmojiWeight
+ 90, // 28: proto.ArchiveChatAction.messageRange:type_name -> proto.SyncActionMessageRange
+ 90, // 29: proto.MarkChatAsReadAction.messageRange:type_name -> proto.SyncActionMessageRange
+ 90, // 30: proto.ClearChatAction.messageRange:type_name -> proto.SyncActionMessageRange
+ 90, // 31: proto.DeleteChatAction.messageRange:type_name -> proto.SyncActionMessageRange
+ 91, // 32: proto.SyncActionMessageRange.messages:type_name -> proto.SyncActionMessage
+ 219, // 33: proto.SyncActionMessage.key:type_name -> proto.MessageKey
+ 70, // 34: proto.SyncActionValue.starAction:type_name -> proto.StarAction
+ 71, // 35: proto.SyncActionValue.contactAction:type_name -> proto.ContactAction
+ 72, // 36: proto.SyncActionValue.muteAction:type_name -> proto.MuteAction
+ 73, // 37: proto.SyncActionValue.pinAction:type_name -> proto.PinAction
+ 74, // 38: proto.SyncActionValue.securityNotificationSetting:type_name -> proto.SecurityNotificationSetting
+ 75, // 39: proto.SyncActionValue.pushNameSetting:type_name -> proto.PushNameSetting
+ 77, // 40: proto.SyncActionValue.quickReplyAction:type_name -> proto.QuickReplyAction
+ 80, // 41: proto.SyncActionValue.recentStickerWeightsAction:type_name -> proto.RecentStickerWeightsAction
+ 81, // 42: proto.SyncActionValue.recentStickerMetadata:type_name -> proto.RecentStickerMetadata
+ 82, // 43: proto.SyncActionValue.recentEmojiWeightsAction:type_name -> proto.RecentEmojiWeightsAction
+ 79, // 44: proto.SyncActionValue.labelEditAction:type_name -> proto.LabelEditAction
+ 78, // 45: proto.SyncActionValue.labelAssociationAction:type_name -> proto.LabelAssociationAction
+ 76, // 46: proto.SyncActionValue.localeSetting:type_name -> proto.LocaleSetting
+ 84, // 47: proto.SyncActionValue.archiveChatAction:type_name -> proto.ArchiveChatAction
+ 85, // 48: proto.SyncActionValue.deleteMessageForMeAction:type_name -> proto.DeleteMessageForMeAction
+ 92, // 49: proto.SyncActionValue.keyExpiration:type_name -> proto.KeyExpiration
+ 86, // 50: proto.SyncActionValue.markChatAsReadAction:type_name -> proto.MarkChatAsReadAction
+ 87, // 51: proto.SyncActionValue.clearChatAction:type_name -> proto.ClearChatAction
+ 88, // 52: proto.SyncActionValue.deleteChatAction:type_name -> proto.DeleteChatAction
+ 89, // 53: proto.SyncActionValue.unarchiveChatsSetting:type_name -> proto.UnarchiveChatsSetting
+ 93, // 54: proto.SyncActionValue.primaryFeature:type_name -> proto.PrimaryFeature
+ 83, // 55: proto.SyncActionValue.favoriteStickerAction:type_name -> proto.FavoriteStickerAction
+ 94, // 56: proto.SyncActionValue.androidUnsupportedActions:type_name -> proto.AndroidUnsupportedActions
+ 108, // 57: proto.SyncdPatch.version:type_name -> proto.SyncdVersion
+ 99, // 58: proto.SyncdPatch.mutations:type_name -> proto.SyncdMutation
+ 102, // 59: proto.SyncdPatch.externalMutations:type_name -> proto.ExternalBlobReference
+ 104, // 60: proto.SyncdPatch.keyId:type_name -> proto.KeyId
+ 107, // 61: proto.SyncdPatch.exitCode:type_name -> proto.ExitCode
+ 14, // 62: proto.SyncdMutation.operation:type_name -> proto.SyncdMutation.SyncdMutationSyncdOperation
+ 103, // 63: proto.SyncdMutation.record:type_name -> proto.SyncdRecord
+ 99, // 64: proto.SyncdMutations.mutations:type_name -> proto.SyncdMutation
+ 108, // 65: proto.SyncdSnapshot.version:type_name -> proto.SyncdVersion
+ 103, // 66: proto.SyncdSnapshot.records:type_name -> proto.SyncdRecord
+ 104, // 67: proto.SyncdSnapshot.keyId:type_name -> proto.KeyId
+ 106, // 68: proto.SyncdRecord.index:type_name -> proto.SyncdIndex
+ 105, // 69: proto.SyncdRecord.value:type_name -> proto.SyncdValue
+ 104, // 70: proto.SyncdRecord.keyId:type_name -> proto.KeyId
+ 15, // 71: proto.MediaRetryNotification.result:type_name -> proto.MediaRetryNotification.MediaRetryNotificationResultType
+ 111, // 72: proto.MsgRowOpaqueData.currentMsg:type_name -> proto.MsgOpaqueData
+ 111, // 73: proto.MsgRowOpaqueData.quotedMsg:type_name -> proto.MsgOpaqueData
+ 114, // 74: proto.GlobalSettings.lightThemeWallpaper:type_name -> proto.WallpaperSettings
+ 0, // 75: proto.GlobalSettings.mediaVisibility:type_name -> proto.MediaVisibility
+ 114, // 76: proto.GlobalSettings.darkThemeWallpaper:type_name -> proto.WallpaperSettings
+ 16, // 77: proto.GroupParticipant.rank:type_name -> proto.GroupParticipant.GroupParticipantRank
+ 229, // 78: proto.HistorySyncMsg.message:type_name -> proto.WebMessageInfo
+ 117, // 79: proto.Conversation.messages:type_name -> proto.HistorySyncMsg
+ 17, // 80: proto.Conversation.endOfHistoryTransferType:type_name -> proto.Conversation.ConversationEndOfHistoryTransferType
+ 199, // 81: proto.Conversation.disappearingMode:type_name -> proto.DisappearingMode
+ 115, // 82: proto.Conversation.participant:type_name -> proto.GroupParticipant
+ 114, // 83: proto.Conversation.wallpaper:type_name -> proto.WallpaperSettings
+ 0, // 84: proto.Conversation.mediaVisibility:type_name -> proto.MediaVisibility
+ 18, // 85: proto.HistorySync.syncType:type_name -> proto.HistorySync.HistorySyncHistorySyncType
+ 118, // 86: proto.HistorySync.conversations:type_name -> proto.Conversation
+ 229, // 87: proto.HistorySync.statusV3Messages:type_name -> proto.WebMessageInfo
+ 116, // 88: proto.HistorySync.pushnames:type_name -> proto.Pushname
+ 113, // 89: proto.HistorySync.globalSettings:type_name -> proto.GlobalSettings
+ 212, // 90: proto.InteractiveAnnotation.polygonVertices:type_name -> proto.Point
+ 211, // 91: proto.InteractiveAnnotation.location:type_name -> proto.Location
+ 122, // 92: proto.MessageContextInfo.deviceListMetadata:type_name -> proto.DeviceListMetadata
+ 19, // 93: proto.AdReplyInfo.mediaType:type_name -> proto.AdReplyInfo.AdReplyInfoMediaType
+ 20, // 94: proto.ExternalAdReplyInfo.mediaType:type_name -> proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType
+ 197, // 95: proto.ContextInfo.quotedMessage:type_name -> proto.Message
+ 124, // 96: proto.ContextInfo.quotedAd:type_name -> proto.AdReplyInfo
+ 219, // 97: proto.ContextInfo.placeholderKey:type_name -> proto.MessageKey
+ 125, // 98: proto.ContextInfo.externalAdReply:type_name -> proto.ExternalAdReplyInfo
+ 199, // 99: proto.ContextInfo.disappearingMode:type_name -> proto.DisappearingMode
+ 198, // 100: proto.ContextInfo.actionLink:type_name -> proto.ActionLink
+ 121, // 101: proto.ImageMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation
+ 126, // 102: proto.ImageMessage.contextInfo:type_name -> proto.ContextInfo
+ 21, // 103: proto.InvoiceMessage.attachmentType:type_name -> proto.InvoiceMessage.InvoiceMessageAttachmentType
+ 126, // 104: proto.ContactMessage.contextInfo:type_name -> proto.ContextInfo
+ 126, // 105: proto.LocationMessage.contextInfo:type_name -> proto.ContextInfo
+ 22, // 106: proto.ExtendedTextMessage.font:type_name -> proto.ExtendedTextMessage.ExtendedTextMessageFontType
+ 23, // 107: proto.ExtendedTextMessage.previewType:type_name -> proto.ExtendedTextMessage.ExtendedTextMessagePreviewType
+ 126, // 108: proto.ExtendedTextMessage.contextInfo:type_name -> proto.ContextInfo
+ 24, // 109: proto.ExtendedTextMessage.inviteLinkGroupType:type_name -> proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType
+ 126, // 110: proto.DocumentMessage.contextInfo:type_name -> proto.ContextInfo
+ 126, // 111: proto.AudioMessage.contextInfo:type_name -> proto.ContextInfo
+ 121, // 112: proto.VideoMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation
+ 126, // 113: proto.VideoMessage.contextInfo:type_name -> proto.ContextInfo
+ 25, // 114: proto.VideoMessage.gifAttribution:type_name -> proto.VideoMessage.VideoMessageAttribution
+ 219, // 115: proto.ProtocolMessage.key:type_name -> proto.MessageKey
+ 26, // 116: proto.ProtocolMessage.type:type_name -> proto.ProtocolMessage.ProtocolMessageType
+ 139, // 117: proto.ProtocolMessage.historySyncNotification:type_name -> proto.HistorySyncNotification
+ 144, // 118: proto.ProtocolMessage.appStateSyncKeyShare:type_name -> proto.AppStateSyncKeyShare
+ 145, // 119: proto.ProtocolMessage.appStateSyncKeyRequest:type_name -> proto.AppStateSyncKeyRequest
+ 147, // 120: proto.ProtocolMessage.initialSecurityNotificationSettingSync:type_name -> proto.InitialSecurityNotificationSettingSync
+ 146, // 121: proto.ProtocolMessage.appStateFatalExceptionNotification:type_name -> proto.AppStateFatalExceptionNotification
+ 199, // 122: proto.ProtocolMessage.disappearingMode:type_name -> proto.DisappearingMode
+ 27, // 123: proto.HistorySyncNotification.syncType:type_name -> proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType
+ 141, // 124: proto.AppStateSyncKey.keyId:type_name -> proto.AppStateSyncKeyId
+ 143, // 125: proto.AppStateSyncKey.keyData:type_name -> proto.AppStateSyncKeyData
+ 142, // 126: proto.AppStateSyncKeyData.fingerprint:type_name -> proto.AppStateSyncKeyFingerprint
+ 140, // 127: proto.AppStateSyncKeyShare.keys:type_name -> proto.AppStateSyncKey
+ 141, // 128: proto.AppStateSyncKeyRequest.keyIds:type_name -> proto.AppStateSyncKeyId
+ 130, // 129: proto.ContactsArrayMessage.contacts:type_name -> proto.ContactMessage
+ 126, // 130: proto.ContactsArrayMessage.contextInfo:type_name -> proto.ContextInfo
+ 28, // 131: proto.HSMDateTimeComponent.dayOfWeek:type_name -> proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType
+ 29, // 132: proto.HSMDateTimeComponent.calendar:type_name -> proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType
+ 150, // 133: proto.HSMDateTime.component:type_name -> proto.HSMDateTimeComponent
+ 151, // 134: proto.HSMDateTime.unixEpoch:type_name -> proto.HSMDateTimeUnixEpoch
+ 149, // 135: proto.HSMLocalizableParameter.currency:type_name -> proto.HSMCurrency
+ 152, // 136: proto.HSMLocalizableParameter.dateTime:type_name -> proto.HSMDateTime
+ 153, // 137: proto.HighlyStructuredMessage.localizableParams:type_name -> proto.HSMLocalizableParameter
+ 164, // 138: proto.HighlyStructuredMessage.hydratedHsm:type_name -> proto.TemplateMessage
+ 197, // 139: proto.SendPaymentMessage.noteMessage:type_name -> proto.Message
+ 219, // 140: proto.SendPaymentMessage.requestMessageKey:type_name -> proto.MessageKey
+ 201, // 141: proto.SendPaymentMessage.background:type_name -> proto.PaymentBackground
+ 197, // 142: proto.RequestPaymentMessage.noteMessage:type_name -> proto.Message
+ 202, // 143: proto.RequestPaymentMessage.amount:type_name -> proto.Money
+ 201, // 144: proto.RequestPaymentMessage.background:type_name -> proto.PaymentBackground
+ 219, // 145: proto.DeclinePaymentRequestMessage.key:type_name -> proto.MessageKey
+ 219, // 146: proto.CancelPaymentRequestMessage.key:type_name -> proto.MessageKey
+ 30, // 147: proto.PaymentInviteMessage.serviceType:type_name -> proto.PaymentInviteMessage.PaymentInviteMessageServiceType
+ 126, // 148: proto.LiveLocationMessage.contextInfo:type_name -> proto.ContextInfo
+ 126, // 149: proto.StickerMessage.contextInfo:type_name -> proto.ContextInfo
+ 154, // 150: proto.FourRowTemplate.content:type_name -> proto.HighlyStructuredMessage
+ 154, // 151: proto.FourRowTemplate.footer:type_name -> proto.HighlyStructuredMessage
+ 210, // 152: proto.FourRowTemplate.buttons:type_name -> proto.TemplateButton
+ 133, // 153: proto.FourRowTemplate.documentMessage:type_name -> proto.DocumentMessage
+ 154, // 154: proto.FourRowTemplate.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage
+ 128, // 155: proto.FourRowTemplate.imageMessage:type_name -> proto.ImageMessage
+ 135, // 156: proto.FourRowTemplate.videoMessage:type_name -> proto.VideoMessage
+ 131, // 157: proto.FourRowTemplate.locationMessage:type_name -> proto.LocationMessage
+ 206, // 158: proto.HydratedFourRowTemplate.hydratedButtons:type_name -> proto.HydratedTemplateButton
+ 133, // 159: proto.HydratedFourRowTemplate.documentMessage:type_name -> proto.DocumentMessage
+ 128, // 160: proto.HydratedFourRowTemplate.imageMessage:type_name -> proto.ImageMessage
+ 135, // 161: proto.HydratedFourRowTemplate.videoMessage:type_name -> proto.VideoMessage
+ 131, // 162: proto.HydratedFourRowTemplate.locationMessage:type_name -> proto.LocationMessage
+ 126, // 163: proto.TemplateMessage.contextInfo:type_name -> proto.ContextInfo
+ 163, // 164: proto.TemplateMessage.hydratedTemplate:type_name -> proto.HydratedFourRowTemplate
+ 162, // 165: proto.TemplateMessage.fourRowTemplate:type_name -> proto.FourRowTemplate
+ 163, // 166: proto.TemplateMessage.hydratedFourRowTemplate:type_name -> proto.HydratedFourRowTemplate
+ 126, // 167: proto.TemplateButtonReplyMessage.contextInfo:type_name -> proto.ContextInfo
+ 128, // 168: proto.CatalogSnapshot.catalogImage:type_name -> proto.ImageMessage
+ 128, // 169: proto.ProductSnapshot.productImage:type_name -> proto.ImageMessage
+ 167, // 170: proto.ProductMessage.product:type_name -> proto.ProductSnapshot
+ 166, // 171: proto.ProductMessage.catalog:type_name -> proto.CatalogSnapshot
+ 126, // 172: proto.ProductMessage.contextInfo:type_name -> proto.ContextInfo
+ 31, // 173: proto.OrderMessage.status:type_name -> proto.OrderMessage.OrderMessageOrderStatus
+ 32, // 174: proto.OrderMessage.surface:type_name -> proto.OrderMessage.OrderMessageOrderSurface
+ 126, // 175: proto.OrderMessage.contextInfo:type_name -> proto.ContextInfo
+ 170, // 176: proto.Section.rows:type_name -> proto.Row
+ 172, // 177: proto.ProductSection.products:type_name -> proto.Product
+ 173, // 178: proto.ProductListInfo.productSections:type_name -> proto.ProductSection
+ 174, // 179: proto.ProductListInfo.headerImage:type_name -> proto.ProductListHeaderImage
+ 33, // 180: proto.ListMessage.listType:type_name -> proto.ListMessage.ListMessageListType
+ 171, // 181: proto.ListMessage.sections:type_name -> proto.Section
+ 175, // 182: proto.ListMessage.productListInfo:type_name -> proto.ProductListInfo
+ 126, // 183: proto.ListMessage.contextInfo:type_name -> proto.ContextInfo
+ 34, // 184: proto.ListResponseMessage.listType:type_name -> proto.ListResponseMessage.ListResponseMessageListType
+ 177, // 185: proto.ListResponseMessage.singleSelectReply:type_name -> proto.SingleSelectReply
+ 126, // 186: proto.ListResponseMessage.contextInfo:type_name -> proto.ContextInfo
+ 133, // 187: proto.Header.documentMessage:type_name -> proto.DocumentMessage
+ 128, // 188: proto.Header.imageMessage:type_name -> proto.ImageMessage
+ 135, // 189: proto.Header.videoMessage:type_name -> proto.VideoMessage
+ 35, // 190: proto.ShopMessage.surface:type_name -> proto.ShopMessage.ShopMessageSurface
+ 184, // 191: proto.NativeFlowMessage.buttons:type_name -> proto.NativeFlowButton
+ 179, // 192: proto.InteractiveMessage.header:type_name -> proto.Header
+ 180, // 193: proto.InteractiveMessage.body:type_name -> proto.Body
+ 181, // 194: proto.InteractiveMessage.footer:type_name -> proto.Footer
+ 126, // 195: proto.InteractiveMessage.contextInfo:type_name -> proto.ContextInfo
+ 182, // 196: proto.InteractiveMessage.shopStorefrontMessage:type_name -> proto.ShopMessage
+ 183, // 197: proto.InteractiveMessage.collectionMessage:type_name -> proto.CollectionMessage
+ 185, // 198: proto.InteractiveMessage.nativeFlowMessage:type_name -> proto.NativeFlowMessage
+ 126, // 199: proto.GroupInviteMessage.contextInfo:type_name -> proto.ContextInfo
+ 36, // 200: proto.GroupInviteMessage.groupType:type_name -> proto.GroupInviteMessage.GroupInviteMessageGroupType
+ 197, // 201: proto.DeviceSentMessage.message:type_name -> proto.Message
+ 197, // 202: proto.FutureProofMessage.message:type_name -> proto.Message
+ 190, // 203: proto.Button.buttonText:type_name -> proto.ButtonText
+ 37, // 204: proto.Button.type:type_name -> proto.Button.ButtonType
+ 191, // 205: proto.Button.nativeFlowInfo:type_name -> proto.NativeFlowInfo
+ 126, // 206: proto.ButtonsMessage.contextInfo:type_name -> proto.ContextInfo
+ 192, // 207: proto.ButtonsMessage.buttons:type_name -> proto.Button
+ 38, // 208: proto.ButtonsMessage.headerType:type_name -> proto.ButtonsMessage.ButtonsMessageHeaderType
+ 133, // 209: proto.ButtonsMessage.documentMessage:type_name -> proto.DocumentMessage
+ 128, // 210: proto.ButtonsMessage.imageMessage:type_name -> proto.ImageMessage
+ 135, // 211: proto.ButtonsMessage.videoMessage:type_name -> proto.VideoMessage
+ 131, // 212: proto.ButtonsMessage.locationMessage:type_name -> proto.LocationMessage
+ 126, // 213: proto.ButtonsResponseMessage.contextInfo:type_name -> proto.ContextInfo
+ 39, // 214: proto.ButtonsResponseMessage.type:type_name -> proto.ButtonsResponseMessage.ButtonsResponseMessageType
+ 219, // 215: proto.ReactionMessage.key:type_name -> proto.MessageKey
+ 127, // 216: proto.Message.senderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage
+ 128, // 217: proto.Message.imageMessage:type_name -> proto.ImageMessage
+ 130, // 218: proto.Message.contactMessage:type_name -> proto.ContactMessage
+ 131, // 219: proto.Message.locationMessage:type_name -> proto.LocationMessage
+ 132, // 220: proto.Message.extendedTextMessage:type_name -> proto.ExtendedTextMessage
+ 133, // 221: proto.Message.documentMessage:type_name -> proto.DocumentMessage
+ 134, // 222: proto.Message.audioMessage:type_name -> proto.AudioMessage
+ 135, // 223: proto.Message.videoMessage:type_name -> proto.VideoMessage
+ 136, // 224: proto.Message.call:type_name -> proto.Call
+ 137, // 225: proto.Message.chat:type_name -> proto.Chat
+ 138, // 226: proto.Message.protocolMessage:type_name -> proto.ProtocolMessage
+ 148, // 227: proto.Message.contactsArrayMessage:type_name -> proto.ContactsArrayMessage
+ 154, // 228: proto.Message.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage
+ 127, // 229: proto.Message.fastRatchetKeySenderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage
+ 155, // 230: proto.Message.sendPaymentMessage:type_name -> proto.SendPaymentMessage
+ 160, // 231: proto.Message.liveLocationMessage:type_name -> proto.LiveLocationMessage
+ 156, // 232: proto.Message.requestPaymentMessage:type_name -> proto.RequestPaymentMessage
+ 157, // 233: proto.Message.declinePaymentRequestMessage:type_name -> proto.DeclinePaymentRequestMessage
+ 158, // 234: proto.Message.cancelPaymentRequestMessage:type_name -> proto.CancelPaymentRequestMessage
+ 164, // 235: proto.Message.templateMessage:type_name -> proto.TemplateMessage
+ 161, // 236: proto.Message.stickerMessage:type_name -> proto.StickerMessage
+ 187, // 237: proto.Message.groupInviteMessage:type_name -> proto.GroupInviteMessage
+ 165, // 238: proto.Message.templateButtonReplyMessage:type_name -> proto.TemplateButtonReplyMessage
+ 168, // 239: proto.Message.productMessage:type_name -> proto.ProductMessage
+ 188, // 240: proto.Message.deviceSentMessage:type_name -> proto.DeviceSentMessage
+ 123, // 241: proto.Message.messageContextInfo:type_name -> proto.MessageContextInfo
+ 176, // 242: proto.Message.listMessage:type_name -> proto.ListMessage
+ 189, // 243: proto.Message.viewOnceMessage:type_name -> proto.FutureProofMessage
+ 169, // 244: proto.Message.orderMessage:type_name -> proto.OrderMessage
+ 178, // 245: proto.Message.listResponseMessage:type_name -> proto.ListResponseMessage
+ 189, // 246: proto.Message.ephemeralMessage:type_name -> proto.FutureProofMessage
+ 129, // 247: proto.Message.invoiceMessage:type_name -> proto.InvoiceMessage
+ 193, // 248: proto.Message.buttonsMessage:type_name -> proto.ButtonsMessage
+ 194, // 249: proto.Message.buttonsResponseMessage:type_name -> proto.ButtonsResponseMessage
+ 159, // 250: proto.Message.paymentInviteMessage:type_name -> proto.PaymentInviteMessage
+ 186, // 251: proto.Message.interactiveMessage:type_name -> proto.InteractiveMessage
+ 195, // 252: proto.Message.reactionMessage:type_name -> proto.ReactionMessage
+ 196, // 253: proto.Message.stickerSyncRmrMessage:type_name -> proto.StickerSyncRMRMessage
+ 40, // 254: proto.DisappearingMode.initiator:type_name -> proto.DisappearingMode.DisappearingModeInitiator
+ 200, // 255: proto.PaymentBackground.mediaData:type_name -> proto.PBMediaData
+ 41, // 256: proto.PaymentBackground.type:type_name -> proto.PaymentBackground.PaymentBackgroundType
+ 203, // 257: proto.HydratedTemplateButton.quickReplyButton:type_name -> proto.HydratedQuickReplyButton
+ 204, // 258: proto.HydratedTemplateButton.urlButton:type_name -> proto.HydratedURLButton
+ 205, // 259: proto.HydratedTemplateButton.callButton:type_name -> proto.HydratedCallButton
+ 154, // 260: proto.QuickReplyButton.displayText:type_name -> proto.HighlyStructuredMessage
+ 154, // 261: proto.URLButton.displayText:type_name -> proto.HighlyStructuredMessage
+ 154, // 262: proto.URLButton.url:type_name -> proto.HighlyStructuredMessage
+ 154, // 263: proto.CallButton.displayText:type_name -> proto.HighlyStructuredMessage
+ 154, // 264: proto.CallButton.phoneNumber:type_name -> proto.HighlyStructuredMessage
+ 207, // 265: proto.TemplateButton.quickReplyButton:type_name -> proto.QuickReplyButton
+ 208, // 266: proto.TemplateButton.urlButton:type_name -> proto.URLButton
+ 209, // 267: proto.TemplateButton.callButton:type_name -> proto.CallButton
+ 50, // 268: proto.CompanionProps.version:type_name -> proto.AppVersion
+ 42, // 269: proto.CompanionProps.platformType:type_name -> proto.CompanionProps.CompanionPropsPlatformType
+ 219, // 270: proto.Reaction.key:type_name -> proto.MessageKey
+ 43, // 271: proto.WebFeatures.labelsDisplay:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 272: proto.WebFeatures.voipIndividualOutgoing:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 273: proto.WebFeatures.groupsV3:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 274: proto.WebFeatures.groupsV3Create:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 275: proto.WebFeatures.changeNumberV2:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 276: proto.WebFeatures.queryStatusV3Thumbnail:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 277: proto.WebFeatures.liveLocations:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 278: proto.WebFeatures.queryVname:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 279: proto.WebFeatures.voipIndividualIncoming:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 280: proto.WebFeatures.quickRepliesQuery:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 281: proto.WebFeatures.payments:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 282: proto.WebFeatures.stickerPackQuery:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 283: proto.WebFeatures.liveLocationsFinal:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 284: proto.WebFeatures.labelsEdit:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 285: proto.WebFeatures.mediaUpload:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 286: proto.WebFeatures.mediaUploadRichQuickReplies:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 287: proto.WebFeatures.vnameV2:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 288: proto.WebFeatures.videoPlaybackUrl:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 289: proto.WebFeatures.statusRanking:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 290: proto.WebFeatures.voipIndividualVideo:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 291: proto.WebFeatures.thirdPartyStickers:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 292: proto.WebFeatures.frequentlyForwardedSetting:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 293: proto.WebFeatures.groupsV4JoinPermission:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 294: proto.WebFeatures.recentStickers:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 295: proto.WebFeatures.catalog:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 296: proto.WebFeatures.starredStickers:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 297: proto.WebFeatures.voipGroupCall:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 298: proto.WebFeatures.templateMessage:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 299: proto.WebFeatures.templateMessageInteractivity:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 300: proto.WebFeatures.ephemeralMessages:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 301: proto.WebFeatures.e2ENotificationSync:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 302: proto.WebFeatures.recentStickersV2:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 303: proto.WebFeatures.recentStickersV3:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 304: proto.WebFeatures.userNotice:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 305: proto.WebFeatures.support:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 306: proto.WebFeatures.groupUiiCleanup:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 307: proto.WebFeatures.groupDogfoodingInternalOnly:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 308: proto.WebFeatures.settingsSync:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 309: proto.WebFeatures.archiveV2:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 310: proto.WebFeatures.ephemeralAllowGroupMembers:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 311: proto.WebFeatures.ephemeral24HDuration:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 312: proto.WebFeatures.mdForceUpgrade:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 313: proto.WebFeatures.disappearingMode:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 314: proto.WebFeatures.externalMdOptInAvailable:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 43, // 315: proto.WebFeatures.noDeleteMessageTimeLimit:type_name -> proto.WebFeatures.WebFeaturesFlag
+ 219, // 316: proto.NotificationMessageInfo.key:type_name -> proto.MessageKey
+ 197, // 317: proto.NotificationMessageInfo.message:type_name -> proto.Message
+ 229, // 318: proto.WebNotificationsInfo.notifyMessages:type_name -> proto.WebMessageInfo
+ 44, // 319: proto.PaymentInfo.currencyDeprecated:type_name -> proto.PaymentInfo.PaymentInfoCurrency
+ 45, // 320: proto.PaymentInfo.status:type_name -> proto.PaymentInfo.PaymentInfoStatus
+ 219, // 321: proto.PaymentInfo.requestMessageKey:type_name -> proto.MessageKey
+ 46, // 322: proto.PaymentInfo.txnStatus:type_name -> proto.PaymentInfo.PaymentInfoTxnStatus
+ 202, // 323: proto.PaymentInfo.primaryAmount:type_name -> proto.Money
+ 202, // 324: proto.PaymentInfo.exchangeAmount:type_name -> proto.Money
+ 219, // 325: proto.WebMessageInfo.key:type_name -> proto.MessageKey
+ 197, // 326: proto.WebMessageInfo.message:type_name -> proto.Message
+ 47, // 327: proto.WebMessageInfo.status:type_name -> proto.WebMessageInfo.WebMessageInfoStatus
+ 48, // 328: proto.WebMessageInfo.messageStubType:type_name -> proto.WebMessageInfo.WebMessageInfoStubType
+ 228, // 329: proto.WebMessageInfo.paymentInfo:type_name -> proto.PaymentInfo
+ 160, // 330: proto.WebMessageInfo.finalLiveLocation:type_name -> proto.LiveLocationMessage
+ 228, // 331: proto.WebMessageInfo.quotedPaymentInfo:type_name -> proto.PaymentInfo
+ 49, // 332: proto.WebMessageInfo.bizPrivacyStatus:type_name -> proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus
+ 224, // 333: proto.WebMessageInfo.mediaData:type_name -> proto.MediaData
+ 223, // 334: proto.WebMessageInfo.photoChange:type_name -> proto.PhotoChange
+ 221, // 335: proto.WebMessageInfo.userReceipt:type_name -> proto.UserReceipt
+ 220, // 336: proto.WebMessageInfo.reactions:type_name -> proto.Reaction
+ 224, // 337: proto.WebMessageInfo.quotedStickerData:type_name -> proto.MediaData
+ 222, // 338: proto.WebMessageInfo.statusPsa:type_name -> proto.StatusPSA
+ 339, // [339:339] is the sub-list for method output_type
+ 339, // [339:339] is the sub-list for method input_type
+ 339, // [339:339] is the sub-list for extension type_name
+ 339, // [339:339] is the sub-list for extension extendee
+ 0, // [0:339] is the sub-list for field type_name
+}
+
+func init() { file_binary_proto_def_proto_init() }
+func file_binary_proto_def_proto_init() {
+ if File_binary_proto_def_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_binary_proto_def_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppVersion); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserAgent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WebdPayload); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WebInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DNSSource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CompanionRegData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientPayload); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NoiseCertificateDetails); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[8].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_binary_proto_def_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientHello); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ServerHello); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientFinish); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HandshakeMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BizIdentityInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BizAccountLinkInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BizAccountPayload); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VerifiedNameDetails); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VerifiedNameCertificate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalizedName); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncActionData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StarAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ContactAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MuteAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PinAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SecurityNotificationSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PushNameSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocaleSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*QuickReplyAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LabelAssociationAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LabelEditAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecentStickerWeightsAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecentStickerMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecentEmojiWeightsAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FavoriteStickerAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArchiveChatAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteMessageForMeAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MarkChatAsReadAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClearChatAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteChatAction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UnarchiveChatsSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncActionMessageRange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncActionMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*KeyExpiration); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PrimaryFeature); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AndroidUnsupportedActions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncActionValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecentEmojiWeight); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecentStickerWeight); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdPatch); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdMutation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdMutations); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdSnapshot); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExternalBlobReference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdRecord); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*KeyId); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdIndex); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExitCode); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SyncdVersion); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ServerErrorReceipt); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MediaRetryNotification); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MsgOpaqueData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MsgRowOpaqueData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GlobalSettings); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WallpaperSettings); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GroupParticipant); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Pushname); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HistorySyncMsg); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Conversation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HistorySync); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EphemeralSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InteractiveAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceListMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MessageContextInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AdReplyInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExternalAdReplyInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ContextInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SenderKeyDistributionMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ImageMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InvoiceMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ContactMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocationMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExtendedTextMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DocumentMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AudioMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VideoMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Call); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Chat); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HistorySyncNotification); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateSyncKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateSyncKeyId); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateSyncKeyFingerprint); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateSyncKeyData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateSyncKeyShare); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateSyncKeyRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppStateFatalExceptionNotification); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InitialSecurityNotificationSettingSync); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ContactsArrayMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HSMCurrency); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HSMDateTimeComponent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HSMDateTimeUnixEpoch); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HSMDateTime); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HSMLocalizableParameter); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HighlyStructuredMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SendPaymentMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RequestPaymentMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeclinePaymentRequestMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CancelPaymentRequestMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PaymentInviteMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LiveLocationMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StickerMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FourRowTemplate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HydratedFourRowTemplate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TemplateMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TemplateButtonReplyMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CatalogSnapshot); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProductSnapshot); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProductMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrderMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Row); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Section); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Product); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProductSection); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProductListHeaderImage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProductListInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SingleSelectReply); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListResponseMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Header); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Body); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Footer); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ShopMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CollectionMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NativeFlowButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NativeFlowMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InteractiveMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GroupInviteMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceSentMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FutureProofMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ButtonText); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NativeFlowInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Button); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ButtonsMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ButtonsResponseMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReactionMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StickerSyncRMRMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Message); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ActionLink); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisappearingMode); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PBMediaData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PaymentBackground); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Money); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HydratedQuickReplyButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HydratedURLButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HydratedCallButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HydratedTemplateButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*QuickReplyButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*URLButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CallButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TemplateButton); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Location); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Point); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CompanionProps); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[164].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
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[165].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_binary_proto_def_proto_msgTypes[166].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_binary_proto_def_proto_msgTypes[167].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_binary_proto_def_proto_msgTypes[168].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_binary_proto_def_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MessageKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Reaction); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserReceipt); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StatusPSA); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PhotoChange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MediaData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WebFeatures); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NotificationMessageInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WebNotificationsInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PaymentInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WebMessageInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_binary_proto_def_proto_msgTypes[71].OneofWrappers = []interface{}{
+ (*InteractiveAnnotation_Location)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[102].OneofWrappers = []interface{}{
+ (*HSMDateTime_Component)(nil),
+ (*HSMDateTime_UnixEpoch)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[103].OneofWrappers = []interface{}{
+ (*HSMLocalizableParameter_Currency)(nil),
+ (*HSMLocalizableParameter_DateTime)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[112].OneofWrappers = []interface{}{
+ (*FourRowTemplate_DocumentMessage)(nil),
+ (*FourRowTemplate_HighlyStructuredMessage)(nil),
+ (*FourRowTemplate_ImageMessage)(nil),
+ (*FourRowTemplate_VideoMessage)(nil),
+ (*FourRowTemplate_LocationMessage)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[113].OneofWrappers = []interface{}{
+ (*HydratedFourRowTemplate_DocumentMessage)(nil),
+ (*HydratedFourRowTemplate_HydratedTitleText)(nil),
+ (*HydratedFourRowTemplate_ImageMessage)(nil),
+ (*HydratedFourRowTemplate_VideoMessage)(nil),
+ (*HydratedFourRowTemplate_LocationMessage)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[114].OneofWrappers = []interface{}{
+ (*TemplateMessage_FourRowTemplate)(nil),
+ (*TemplateMessage_HydratedFourRowTemplate)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[129].OneofWrappers = []interface{}{
+ (*Header_DocumentMessage)(nil),
+ (*Header_ImageMessage)(nil),
+ (*Header_JpegThumbnail)(nil),
+ (*Header_VideoMessage)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[136].OneofWrappers = []interface{}{
+ (*InteractiveMessage_ShopStorefrontMessage)(nil),
+ (*InteractiveMessage_CollectionMessage)(nil),
+ (*InteractiveMessage_NativeFlowMessage)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[143].OneofWrappers = []interface{}{
+ (*ButtonsMessage_Text)(nil),
+ (*ButtonsMessage_DocumentMessage)(nil),
+ (*ButtonsMessage_ImageMessage)(nil),
+ (*ButtonsMessage_VideoMessage)(nil),
+ (*ButtonsMessage_LocationMessage)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[144].OneofWrappers = []interface{}{
+ (*ButtonsResponseMessage_SelectedDisplayText)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[156].OneofWrappers = []interface{}{
+ (*HydratedTemplateButton_QuickReplyButton)(nil),
+ (*HydratedTemplateButton_UrlButton)(nil),
+ (*HydratedTemplateButton_CallButton)(nil),
+ }
+ file_binary_proto_def_proto_msgTypes[160].OneofWrappers = []interface{}{
+ (*TemplateButton_QuickReplyButton)(nil),
+ (*TemplateButton_UrlButton)(nil),
+ (*TemplateButton_CallButton)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_binary_proto_def_proto_rawDesc,
+ NumEnums: 50,
+ NumMessages: 180,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_binary_proto_def_proto_goTypes,
+ DependencyIndexes: file_binary_proto_def_proto_depIdxs,
+ EnumInfos: file_binary_proto_def_proto_enumTypes,
+ MessageInfos: file_binary_proto_def_proto_msgTypes,
+ }.Build()
+ File_binary_proto_def_proto = out.File
+ file_binary_proto_def_proto_rawDesc = nil
+ file_binary_proto_def_proto_goTypes = nil
+ file_binary_proto_def_proto_depIdxs = nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw
new file mode 100644
index 00000000..e2c23d47
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw
Binary files differ
diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto b/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto
new file mode 100644
index 00000000..652d4a30
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto
@@ -0,0 +1,2011 @@
+syntax = "proto2";
+package proto;
+
+message AppVersion {
+ optional uint32 primary = 1;
+ optional uint32 secondary = 2;
+ optional uint32 tertiary = 3;
+ optional uint32 quaternary = 4;
+ optional uint32 quinary = 5;
+}
+
+message UserAgent {
+ enum UserAgentPlatform {
+ ANDROID = 0;
+ IOS = 1;
+ WINDOWS_PHONE = 2;
+ BLACKBERRY = 3;
+ BLACKBERRYX = 4;
+ S40 = 5;
+ S60 = 6;
+ PYTHON_CLIENT = 7;
+ TIZEN = 8;
+ ENTERPRISE = 9;
+ SMB_ANDROID = 10;
+ KAIOS = 11;
+ SMB_IOS = 12;
+ WINDOWS = 13;
+ WEB = 14;
+ PORTAL = 15;
+ GREEN_ANDROID = 16;
+ GREEN_IPHONE = 17;
+ BLUE_ANDROID = 18;
+ BLUE_IPHONE = 19;
+ FBLITE_ANDROID = 20;
+ MLITE_ANDROID = 21;
+ IGLITE_ANDROID = 22;
+ PAGE = 23;
+ MACOS = 24;
+ OCULUS_MSG = 25;
+ OCULUS_CALL = 26;
+ MILAN = 27;
+ CAPI = 28;
+ }
+ optional UserAgentPlatform platform = 1;
+ optional AppVersion appVersion = 2;
+ optional string mcc = 3;
+ optional string mnc = 4;
+ optional string osVersion = 5;
+ optional string manufacturer = 6;
+ optional string device = 7;
+ optional string osBuildNumber = 8;
+ optional string phoneId = 9;
+ enum UserAgentReleaseChannel {
+ RELEASE = 0;
+ BETA = 1;
+ ALPHA = 2;
+ DEBUG = 3;
+ }
+ optional UserAgentReleaseChannel releaseChannel = 10;
+ optional string localeLanguageIso6391 = 11;
+ optional string localeCountryIso31661Alpha2 = 12;
+ optional string deviceBoard = 13;
+}
+
+message WebdPayload {
+ optional bool usesParticipantInKey = 1;
+ optional bool supportsStarredMessages = 2;
+ optional bool supportsDocumentMessages = 3;
+ optional bool supportsUrlMessages = 4;
+ optional bool supportsMediaRetry = 5;
+ optional bool supportsE2EImage = 6;
+ optional bool supportsE2EVideo = 7;
+ optional bool supportsE2EAudio = 8;
+ optional bool supportsE2EDocument = 9;
+ optional string documentTypes = 10;
+ optional bytes features = 11;
+}
+
+message WebInfo {
+ optional string refToken = 1;
+ optional string version = 2;
+ optional WebdPayload webdPayload = 3;
+ enum WebInfoWebSubPlatform {
+ WEB_BROWSER = 0;
+ APP_STORE = 1;
+ WIN_STORE = 2;
+ DARWIN = 3;
+ WIN32 = 4;
+ }
+ optional WebInfoWebSubPlatform webSubPlatform = 4;
+}
+
+message DNSSource {
+ enum DNSSourceDNSResolutionMethod {
+ SYSTEM = 0;
+ GOOGLE = 1;
+ HARDCODED = 2;
+ OVERRIDE = 3;
+ FALLBACK = 4;
+ }
+ optional DNSSourceDNSResolutionMethod dnsMethod = 15;
+ optional bool appCached = 16;
+}
+
+message CompanionRegData {
+ optional bytes eRegid = 1;
+ optional bytes eKeytype = 2;
+ optional bytes eIdent = 3;
+ optional bytes eSkeyId = 4;
+ optional bytes eSkeyVal = 5;
+ optional bytes eSkeySig = 6;
+ optional bytes buildHash = 7;
+ optional bytes companionProps = 8;
+}
+
+message ClientPayload {
+ optional uint64 username = 1;
+ optional bool passive = 3;
+ optional UserAgent userAgent = 5;
+ optional WebInfo webInfo = 6;
+ optional string pushName = 7;
+ optional sfixed32 sessionId = 9;
+ optional bool shortConnect = 10;
+ enum ClientPayloadConnectType {
+ CELLULAR_UNKNOWN = 0;
+ WIFI_UNKNOWN = 1;
+ CELLULAR_EDGE = 100;
+ CELLULAR_IDEN = 101;
+ CELLULAR_UMTS = 102;
+ CELLULAR_EVDO = 103;
+ CELLULAR_GPRS = 104;
+ CELLULAR_HSDPA = 105;
+ CELLULAR_HSUPA = 106;
+ CELLULAR_HSPA = 107;
+ CELLULAR_CDMA = 108;
+ CELLULAR_1XRTT = 109;
+ CELLULAR_EHRPD = 110;
+ CELLULAR_LTE = 111;
+ CELLULAR_HSPAP = 112;
+ }
+ optional ClientPayloadConnectType connectType = 12;
+ enum ClientPayloadConnectReason {
+ PUSH = 0;
+ USER_ACTIVATED = 1;
+ SCHEDULED = 2;
+ ERROR_RECONNECT = 3;
+ NETWORK_SWITCH = 4;
+ PING_RECONNECT = 5;
+ }
+ optional ClientPayloadConnectReason connectReason = 13;
+ repeated int32 shards = 14;
+ optional DNSSource dnsSource = 15;
+ optional uint32 connectAttemptCount = 16;
+ optional uint32 device = 18;
+ optional CompanionRegData regData = 19;
+ enum ClientPayloadProduct {
+ WHATSAPP = 0;
+ MESSENGER = 1;
+ }
+ optional ClientPayloadProduct product = 20;
+ optional bytes fbCat = 21;
+ optional bytes fbUserAgent = 22;
+ optional bool oc = 23;
+ optional int32 lc = 24;
+ enum ClientPayloadIOSAppExtension {
+ SHARE_EXTENSION = 0;
+ SERVICE_EXTENSION = 1;
+ INTENTS_EXTENSION = 2;
+ }
+ optional ClientPayloadIOSAppExtension iosAppExtension = 30;
+ optional uint64 fbAppId = 31;
+ optional bytes fbDeviceId = 32;
+}
+
+// Renamed from Details
+message NoiseCertificateDetails {
+ optional uint32 serial = 1;
+ optional string issuer = 2;
+ optional uint64 expires = 3;
+ optional string subject = 4;
+ optional bytes key = 5;
+}
+
+message NoiseCertificate {
+ optional bytes details = 1;
+ optional bytes signature = 2;
+}
+
+message ClientHello {
+ optional bytes ephemeral = 1;
+ optional bytes static = 2;
+ optional bytes payload = 3;
+}
+
+message ServerHello {
+ optional bytes ephemeral = 1;
+ optional bytes static = 2;
+ optional bytes payload = 3;
+}
+
+message ClientFinish {
+ optional bytes static = 1;
+ optional bytes payload = 2;
+}
+
+message HandshakeMessage {
+ optional ClientHello clientHello = 2;
+ optional ServerHello serverHello = 3;
+ optional ClientFinish clientFinish = 4;
+}
+
+message BizIdentityInfo {
+ enum BizIdentityInfoVerifiedLevelValue {
+ UNKNOWN = 0;
+ LOW = 1;
+ HIGH = 2;
+ }
+ optional BizIdentityInfoVerifiedLevelValue vlevel = 1;
+ optional VerifiedNameCertificate vnameCert = 2;
+ optional bool signed = 3;
+ optional bool revoked = 4;
+ enum BizIdentityInfoHostStorageType {
+ ON_PREMISE = 0;
+ FACEBOOK = 1;
+ }
+ optional BizIdentityInfoHostStorageType hostStorage = 5;
+ enum BizIdentityInfoActualActorsType {
+ SELF = 0;
+ BSP = 1;
+ }
+ optional BizIdentityInfoActualActorsType actualActors = 6;
+ optional uint64 privacyModeTs = 7;
+ optional uint64 featureControls = 8;
+}
+
+message BizAccountLinkInfo {
+ optional uint64 whatsappBizAcctFbid = 1;
+ optional string whatsappAcctNumber = 2;
+ optional uint64 issueTime = 3;
+ enum BizAccountLinkInfoHostStorageType {
+ ON_PREMISE = 0;
+ FACEBOOK = 1;
+ }
+ optional BizAccountLinkInfoHostStorageType hostStorage = 4;
+ enum BizAccountLinkInfoAccountType {
+ ENTERPRISE = 0;
+ }
+ optional BizAccountLinkInfoAccountType accountType = 5;
+}
+
+message BizAccountPayload {
+ optional VerifiedNameCertificate vnameCert = 1;
+ optional bytes bizAcctLinkInfo = 2;
+}
+
+// Renamed from Details
+message VerifiedNameDetails {
+ optional uint64 serial = 1;
+ optional string issuer = 2;
+ optional string verifiedName = 4;
+ repeated LocalizedName localizedNames = 8;
+ optional uint64 issueTime = 10;
+}
+
+message VerifiedNameCertificate {
+ optional bytes details = 1;
+ optional bytes signature = 2;
+ optional bytes serverSignature = 3;
+}
+
+message LocalizedName {
+ optional string lg = 1;
+ optional string lc = 2;
+ optional string verifiedName = 3;
+}
+
+message SyncActionData {
+ optional bytes index = 1;
+ optional SyncActionValue value = 2;
+ optional bytes padding = 3;
+ optional int32 version = 4;
+}
+
+message StarAction {
+ optional bool starred = 1;
+}
+
+message ContactAction {
+ optional string fullName = 1;
+ optional string firstName = 2;
+}
+
+message MuteAction {
+ optional bool muted = 1;
+ optional int64 muteEndTimestamp = 2;
+}
+
+message PinAction {
+ optional bool pinned = 1;
+}
+
+message SecurityNotificationSetting {
+ optional bool showNotification = 1;
+}
+
+message PushNameSetting {
+ optional string name = 1;
+}
+
+message LocaleSetting {
+ optional string locale = 1;
+}
+
+message QuickReplyAction {
+ optional string shortcut = 1;
+ optional string message = 2;
+ repeated string keywords = 3;
+ optional int32 count = 4;
+ optional bool deleted = 5;
+}
+
+message LabelAssociationAction {
+ optional bool labeled = 1;
+}
+
+message LabelEditAction {
+ optional string name = 1;
+ optional int32 color = 2;
+ optional int32 predefinedId = 3;
+ optional bool deleted = 4;
+}
+
+message RecentStickerWeightsAction {
+ repeated RecentStickerWeight weights = 1;
+}
+
+message RecentStickerMetadata {
+ optional string directPath = 1;
+ optional string encFilehash = 2;
+ optional string mediaKey = 3;
+ optional string stanzaId = 4;
+ optional string chatJid = 5;
+ optional string participant = 6;
+ optional bool isSentByMe = 7;
+}
+
+message RecentEmojiWeightsAction {
+ repeated RecentEmojiWeight weights = 1;
+}
+
+message FavoriteStickerAction {
+ optional string directPath = 1;
+ optional string lastUploadTimestamp = 2;
+ optional string handle = 3;
+ optional string encFilehash = 4;
+ optional string stickerHashWithoutMeta = 5;
+ optional string mediaKey = 6;
+ optional int64 mediaKeyTimestamp = 7;
+ optional bool isFavorite = 8;
+}
+
+message ArchiveChatAction {
+ optional bool archived = 1;
+ optional SyncActionMessageRange messageRange = 2;
+}
+
+message DeleteMessageForMeAction {
+ optional bool deleteMedia = 1;
+ optional int64 messageTimestamp = 2;
+}
+
+message MarkChatAsReadAction {
+ optional bool read = 1;
+ optional SyncActionMessageRange messageRange = 2;
+}
+
+message ClearChatAction {
+ optional SyncActionMessageRange messageRange = 1;
+}
+
+message DeleteChatAction {
+ optional SyncActionMessageRange messageRange = 1;
+}
+
+message UnarchiveChatsSetting {
+ optional bool unarchiveChats = 1;
+}
+
+message SyncActionMessageRange {
+ optional int64 lastMessageTimestamp = 1;
+ optional int64 lastSystemMessageTimestamp = 2;
+ repeated SyncActionMessage messages = 3;
+}
+
+message SyncActionMessage {
+ optional MessageKey key = 1;
+ optional int64 timestamp = 2;
+}
+
+message KeyExpiration {
+ optional int32 expiredKeyEpoch = 1;
+}
+
+message PrimaryFeature {
+ repeated string flags = 1;
+}
+
+message AndroidUnsupportedActions {
+ optional bool allowed = 1;
+}
+
+message SyncActionValue {
+ optional int64 timestamp = 1;
+ optional StarAction starAction = 2;
+ optional ContactAction contactAction = 3;
+ optional MuteAction muteAction = 4;
+ optional PinAction pinAction = 5;
+ optional SecurityNotificationSetting securityNotificationSetting = 6;
+ optional PushNameSetting pushNameSetting = 7;
+ optional QuickReplyAction quickReplyAction = 8;
+ optional RecentStickerWeightsAction recentStickerWeightsAction = 9;
+ optional RecentStickerMetadata recentStickerMetadata = 10;
+ optional RecentEmojiWeightsAction recentEmojiWeightsAction = 11;
+ optional LabelEditAction labelEditAction = 14;
+ optional LabelAssociationAction labelAssociationAction = 15;
+ optional LocaleSetting localeSetting = 16;
+ optional ArchiveChatAction archiveChatAction = 17;
+ optional DeleteMessageForMeAction deleteMessageForMeAction = 18;
+ optional KeyExpiration keyExpiration = 19;
+ optional MarkChatAsReadAction markChatAsReadAction = 20;
+ optional ClearChatAction clearChatAction = 21;
+ optional DeleteChatAction deleteChatAction = 22;
+ optional UnarchiveChatsSetting unarchiveChatsSetting = 23;
+ optional PrimaryFeature primaryFeature = 24;
+ optional FavoriteStickerAction favoriteStickerAction = 25;
+ optional AndroidUnsupportedActions androidUnsupportedActions = 26;
+}
+
+message RecentEmojiWeight {
+ optional string emoji = 1;
+ optional float weight = 2;
+}
+
+message RecentStickerWeight {
+ optional string filehash = 1;
+ optional float weight = 2;
+}
+
+message SyncdPatch {
+ optional SyncdVersion version = 1;
+ repeated SyncdMutation mutations = 2;
+ optional ExternalBlobReference externalMutations = 3;
+ optional bytes snapshotMac = 4;
+ optional bytes patchMac = 5;
+ optional KeyId keyId = 6;
+ optional ExitCode exitCode = 7;
+ optional uint32 deviceIndex = 8;
+}
+
+message SyncdMutation {
+ enum SyncdMutationSyncdOperation {
+ SET = 0;
+ REMOVE = 1;
+ }
+ optional SyncdMutationSyncdOperation operation = 1;
+ optional SyncdRecord record = 2;
+}
+
+message SyncdMutations {
+ repeated SyncdMutation mutations = 1;
+}
+
+message SyncdSnapshot {
+ optional SyncdVersion version = 1;
+ repeated SyncdRecord records = 2;
+ optional bytes mac = 3;
+ optional KeyId keyId = 4;
+}
+
+message ExternalBlobReference {
+ optional bytes mediaKey = 1;
+ optional string directPath = 2;
+ optional string handle = 3;
+ optional uint64 fileSizeBytes = 4;
+ optional bytes fileSha256 = 5;
+ optional bytes fileEncSha256 = 6;
+}
+
+message SyncdRecord {
+ optional SyncdIndex index = 1;
+ optional SyncdValue value = 2;
+ optional KeyId keyId = 3;
+}
+
+message KeyId {
+ optional bytes id = 1;
+}
+
+message SyncdValue {
+ optional bytes blob = 1;
+}
+
+message SyncdIndex {
+ optional bytes blob = 1;
+}
+
+message ExitCode {
+ optional uint64 code = 1;
+ optional string text = 2;
+}
+
+message SyncdVersion {
+ optional uint64 version = 1;
+}
+
+message ServerErrorReceipt {
+ optional string stanzaId = 1;
+}
+
+message MediaRetryNotification {
+ optional string stanzaId = 1;
+ optional string directPath = 2;
+ enum MediaRetryNotificationResultType {
+ GENERAL_ERROR = 0;
+ SUCCESS = 1;
+ NOT_FOUND = 2;
+ DECRYPTION_ERROR = 3;
+ }
+ optional MediaRetryNotificationResultType result = 3;
+}
+
+message MsgOpaqueData {
+ optional string body = 1;
+ optional string caption = 3;
+ optional double lng = 5;
+ optional double lat = 7;
+ optional int32 paymentAmount1000 = 8;
+ optional string paymentNoteMsgBody = 9;
+ optional string canonicalUrl = 10;
+ optional string matchedText = 11;
+ optional string title = 12;
+ optional string description = 13;
+ optional bytes futureproofBuffer = 14;
+ optional string clientUrl = 15;
+ optional string loc = 16;
+}
+
+message MsgRowOpaqueData {
+ optional MsgOpaqueData currentMsg = 1;
+ optional MsgOpaqueData quotedMsg = 2;
+}
+
+message GlobalSettings {
+ optional WallpaperSettings lightThemeWallpaper = 1;
+ optional MediaVisibility mediaVisibility = 2;
+ optional WallpaperSettings darkThemeWallpaper = 3;
+}
+
+message WallpaperSettings {
+ optional string filename = 1;
+ optional uint32 opacity = 2;
+}
+
+message GroupParticipant {
+ required string userJid = 1;
+ enum GroupParticipantRank {
+ REGULAR = 0;
+ ADMIN = 1;
+ SUPERADMIN = 2;
+ }
+ optional GroupParticipantRank rank = 2;
+}
+
+message Pushname {
+ optional string id = 1;
+ optional string pushname = 2;
+}
+
+message HistorySyncMsg {
+ optional WebMessageInfo message = 1;
+ optional uint64 msgOrderId = 2;
+}
+
+message Conversation {
+ required string id = 1;
+ repeated HistorySyncMsg messages = 2;
+ optional string newJid = 3;
+ optional string oldJid = 4;
+ optional uint64 lastMsgTimestamp = 5;
+ optional uint32 unreadCount = 6;
+ optional bool readOnly = 7;
+ optional bool endOfHistoryTransfer = 8;
+ optional uint32 ephemeralExpiration = 9;
+ optional int64 ephemeralSettingTimestamp = 10;
+ enum ConversationEndOfHistoryTransferType {
+ COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0;
+ COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1;
+ }
+ optional ConversationEndOfHistoryTransferType endOfHistoryTransferType = 11;
+ optional uint64 conversationTimestamp = 12;
+ optional string name = 13;
+ optional string pHash = 14;
+ optional bool notSpam = 15;
+ optional bool archived = 16;
+ optional DisappearingMode disappearingMode = 17;
+ optional uint32 unreadMentionCount = 18;
+ optional bool markedAsUnread = 19;
+ repeated GroupParticipant participant = 20;
+ optional bytes tcToken = 21;
+ optional uint64 tcTokenTimestamp = 22;
+ optional bytes contactPrimaryIdentityKey = 23;
+ optional uint32 pinned = 24;
+ optional uint64 muteEndTime = 25;
+ optional WallpaperSettings wallpaper = 26;
+ optional MediaVisibility mediaVisibility = 27;
+ optional uint64 tcTokenSenderTimestamp = 28;
+ optional bool suspended = 29;
+}
+
+message HistorySync {
+ enum HistorySyncHistorySyncType {
+ INITIAL_BOOTSTRAP = 0;
+ INITIAL_STATUS_V3 = 1;
+ FULL = 2;
+ RECENT = 3;
+ PUSH_NAME = 4;
+ }
+ required HistorySyncHistorySyncType syncType = 1;
+ repeated Conversation conversations = 2;
+ repeated WebMessageInfo statusV3Messages = 3;
+ optional uint32 chunkOrder = 5;
+ optional uint32 progress = 6;
+ repeated Pushname pushnames = 7;
+ optional GlobalSettings globalSettings = 8;
+ optional bytes threadIdUserSecret = 9;
+ optional uint32 threadDsTimeframeOffset = 10;
+}
+
+enum MediaVisibility {
+ DEFAULT = 0;
+ OFF = 1;
+ ON = 2;
+}
+message EphemeralSetting {
+ optional sfixed32 duration = 1;
+ optional sfixed64 timestamp = 2;
+}
+
+message InteractiveAnnotation {
+ repeated Point polygonVertices = 1;
+ oneof action {
+ Location location = 2;
+ }
+}
+
+message DeviceListMetadata {
+ optional bytes senderKeyHash = 1;
+ optional uint64 senderTimestamp = 2;
+ repeated uint32 senderKeyIndexes = 3 [packed=true];
+ optional bytes recipientKeyHash = 8;
+ optional uint64 recipientTimestamp = 9;
+ repeated uint32 recipientKeyIndexes = 10 [packed=true];
+}
+
+message MessageContextInfo {
+ optional DeviceListMetadata deviceListMetadata = 1;
+ optional int32 deviceListMetadataVersion = 2;
+}
+
+message AdReplyInfo {
+ optional string advertiserName = 1;
+ enum AdReplyInfoMediaType {
+ NONE = 0;
+ IMAGE = 1;
+ VIDEO = 2;
+ }
+ optional AdReplyInfoMediaType mediaType = 2;
+ optional bytes jpegThumbnail = 16;
+ optional string caption = 17;
+}
+
+message ExternalAdReplyInfo {
+ optional string title = 1;
+ optional string body = 2;
+ enum ExternalAdReplyInfoMediaType {
+ NONE = 0;
+ IMAGE = 1;
+ VIDEO = 2;
+ }
+ optional ExternalAdReplyInfoMediaType mediaType = 3;
+ optional string thumbnailUrl = 4;
+ optional string mediaUrl = 5;
+ optional bytes thumbnail = 6;
+ optional string sourceType = 7;
+ optional string sourceId = 8;
+ optional string sourceUrl = 9;
+ optional bool containsAutoReply = 10;
+}
+
+message ContextInfo {
+ optional string stanzaId = 1;
+ optional string participant = 2;
+ optional Message quotedMessage = 3;
+ optional string remoteJid = 4;
+ repeated string mentionedJid = 15;
+ optional string conversionSource = 18;
+ optional bytes conversionData = 19;
+ optional uint32 conversionDelaySeconds = 20;
+ optional uint32 forwardingScore = 21;
+ optional bool isForwarded = 22;
+ optional AdReplyInfo quotedAd = 23;
+ optional MessageKey placeholderKey = 24;
+ optional uint32 expiration = 25;
+ optional int64 ephemeralSettingTimestamp = 26;
+ optional bytes ephemeralSharedSecret = 27;
+ optional ExternalAdReplyInfo externalAdReply = 28;
+ optional string entryPointConversionSource = 29;
+ optional string entryPointConversionApp = 30;
+ optional uint32 entryPointConversionDelaySeconds = 31;
+ optional DisappearingMode disappearingMode = 32;
+ optional ActionLink actionLink = 33;
+ optional string groupSubject = 34;
+ optional string parentGroupJid = 35;
+}
+
+message SenderKeyDistributionMessage {
+ optional string groupId = 1;
+ optional bytes axolotlSenderKeyDistributionMessage = 2;
+}
+
+message ImageMessage {
+ optional string url = 1;
+ optional string mimetype = 2;
+ optional string caption = 3;
+ optional bytes fileSha256 = 4;
+ optional uint64 fileLength = 5;
+ optional uint32 height = 6;
+ optional uint32 width = 7;
+ optional bytes mediaKey = 8;
+ optional bytes fileEncSha256 = 9;
+ repeated InteractiveAnnotation interactiveAnnotations = 10;
+ optional string directPath = 11;
+ optional int64 mediaKeyTimestamp = 12;
+ optional bytes jpegThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+ optional bytes firstScanSidecar = 18;
+ optional uint32 firstScanLength = 19;
+ optional uint32 experimentGroupId = 20;
+ optional bytes scansSidecar = 21;
+ repeated uint32 scanLengths = 22;
+ optional bytes midQualityFileSha256 = 23;
+ optional bytes midQualityFileEncSha256 = 24;
+ optional bool viewOnce = 25;
+ optional string thumbnailDirectPath = 26;
+ optional bytes thumbnailSha256 = 27;
+ optional bytes thumbnailEncSha256 = 28;
+ optional string staticUrl = 29;
+}
+
+message InvoiceMessage {
+ optional string note = 1;
+ optional string token = 2;
+ enum InvoiceMessageAttachmentType {
+ IMAGE = 0;
+ PDF = 1;
+ }
+ optional InvoiceMessageAttachmentType attachmentType = 3;
+ optional string attachmentMimetype = 4;
+ optional bytes attachmentMediaKey = 5;
+ optional int64 attachmentMediaKeyTimestamp = 6;
+ optional bytes attachmentFileSha256 = 7;
+ optional bytes attachmentFileEncSha256 = 8;
+ optional string attachmentDirectPath = 9;
+ optional bytes attachmentJpegThumbnail = 10;
+}
+
+message ContactMessage {
+ optional string displayName = 1;
+ optional string vcard = 16;
+ optional ContextInfo contextInfo = 17;
+}
+
+message LocationMessage {
+ optional double degreesLatitude = 1;
+ optional double degreesLongitude = 2;
+ optional string name = 3;
+ optional string address = 4;
+ optional string url = 5;
+ optional bool isLive = 6;
+ optional uint32 accuracyInMeters = 7;
+ optional float speedInMps = 8;
+ optional uint32 degreesClockwiseFromMagneticNorth = 9;
+ optional string comment = 11;
+ optional bytes jpegThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+}
+
+message ExtendedTextMessage {
+ optional string text = 1;
+ optional string matchedText = 2;
+ optional string canonicalUrl = 4;
+ optional string description = 5;
+ optional string title = 6;
+ optional fixed32 textArgb = 7;
+ optional fixed32 backgroundArgb = 8;
+ enum ExtendedTextMessageFontType {
+ SANS_SERIF = 0;
+ SERIF = 1;
+ NORICAN_REGULAR = 2;
+ BRYNDAN_WRITE = 3;
+ BEBASNEUE_REGULAR = 4;
+ OSWALD_HEAVY = 5;
+ }
+ optional ExtendedTextMessageFontType font = 9;
+ enum ExtendedTextMessagePreviewType {
+ NONE = 0;
+ VIDEO = 1;
+ }
+ optional ExtendedTextMessagePreviewType previewType = 10;
+ optional bytes jpegThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+ optional bool doNotPlayInline = 18;
+ optional string thumbnailDirectPath = 19;
+ optional bytes thumbnailSha256 = 20;
+ optional bytes thumbnailEncSha256 = 21;
+ optional bytes mediaKey = 22;
+ optional int64 mediaKeyTimestamp = 23;
+ optional uint32 thumbnailHeight = 24;
+ optional uint32 thumbnailWidth = 25;
+ enum ExtendedTextMessageInviteLinkGroupType {
+ DEFAULT = 0;
+ PARENT = 1;
+ }
+ optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupType = 26;
+}
+
+message DocumentMessage {
+ optional string url = 1;
+ optional string mimetype = 2;
+ optional string title = 3;
+ optional bytes fileSha256 = 4;
+ optional uint64 fileLength = 5;
+ optional uint32 pageCount = 6;
+ optional bytes mediaKey = 7;
+ optional string fileName = 8;
+ optional bytes fileEncSha256 = 9;
+ optional string directPath = 10;
+ optional int64 mediaKeyTimestamp = 11;
+ optional bool contactVcard = 12;
+ optional string thumbnailDirectPath = 13;
+ optional bytes thumbnailSha256 = 14;
+ optional bytes thumbnailEncSha256 = 15;
+ optional bytes jpegThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+ optional uint32 thumbnailHeight = 18;
+ optional uint32 thumbnailWidth = 19;
+}
+
+message AudioMessage {
+ optional string url = 1;
+ optional string mimetype = 2;
+ optional bytes fileSha256 = 3;
+ optional uint64 fileLength = 4;
+ optional uint32 seconds = 5;
+ optional bool ptt = 6;
+ optional bytes mediaKey = 7;
+ optional bytes fileEncSha256 = 8;
+ optional string directPath = 9;
+ optional int64 mediaKeyTimestamp = 10;
+ optional ContextInfo contextInfo = 17;
+ optional bytes streamingSidecar = 18;
+ optional bytes waveform = 19;
+}
+
+message VideoMessage {
+ optional string url = 1;
+ optional string mimetype = 2;
+ optional bytes fileSha256 = 3;
+ optional uint64 fileLength = 4;
+ optional uint32 seconds = 5;
+ optional bytes mediaKey = 6;
+ optional string caption = 7;
+ optional bool gifPlayback = 8;
+ optional uint32 height = 9;
+ optional uint32 width = 10;
+ optional bytes fileEncSha256 = 11;
+ repeated InteractiveAnnotation interactiveAnnotations = 12;
+ optional string directPath = 13;
+ optional int64 mediaKeyTimestamp = 14;
+ optional bytes jpegThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+ optional bytes streamingSidecar = 18;
+ enum VideoMessageAttribution {
+ NONE = 0;
+ GIPHY = 1;
+ TENOR = 2;
+ }
+ optional VideoMessageAttribution gifAttribution = 19;
+ optional bool viewOnce = 20;
+ optional string thumbnailDirectPath = 21;
+ optional bytes thumbnailSha256 = 22;
+ optional bytes thumbnailEncSha256 = 23;
+ optional string staticUrl = 24;
+}
+
+message Call {
+ optional bytes callKey = 1;
+ optional string conversionSource = 2;
+ optional bytes conversionData = 3;
+ optional uint32 conversionDelaySeconds = 4;
+}
+
+message Chat {
+ optional string displayName = 1;
+ optional string id = 2;
+}
+
+message ProtocolMessage {
+ optional MessageKey key = 1;
+ enum ProtocolMessageType {
+ REVOKE = 0;
+ EPHEMERAL_SETTING = 3;
+ EPHEMERAL_SYNC_RESPONSE = 4;
+ HISTORY_SYNC_NOTIFICATION = 5;
+ APP_STATE_SYNC_KEY_SHARE = 6;
+ APP_STATE_SYNC_KEY_REQUEST = 7;
+ MSG_FANOUT_BACKFILL_REQUEST = 8;
+ INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9;
+ APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10;
+ }
+ optional ProtocolMessageType type = 2;
+ optional uint32 ephemeralExpiration = 4;
+ optional int64 ephemeralSettingTimestamp = 5;
+ optional HistorySyncNotification historySyncNotification = 6;
+ optional AppStateSyncKeyShare appStateSyncKeyShare = 7;
+ optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8;
+ optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9;
+ optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10;
+ optional DisappearingMode disappearingMode = 11;
+}
+
+message HistorySyncNotification {
+ optional bytes fileSha256 = 1;
+ optional uint64 fileLength = 2;
+ optional bytes mediaKey = 3;
+ optional bytes fileEncSha256 = 4;
+ optional string directPath = 5;
+ enum HistorySyncNotificationHistorySyncType {
+ INITIAL_BOOTSTRAP = 0;
+ INITIAL_STATUS_V3 = 1;
+ FULL = 2;
+ RECENT = 3;
+ PUSH_NAME = 4;
+ }
+ optional HistorySyncNotificationHistorySyncType syncType = 6;
+ optional uint32 chunkOrder = 7;
+ optional string originalMessageId = 8;
+}
+
+message AppStateSyncKey {
+ optional AppStateSyncKeyId keyId = 1;
+ optional AppStateSyncKeyData keyData = 2;
+}
+
+message AppStateSyncKeyId {
+ optional bytes keyId = 1;
+}
+
+message AppStateSyncKeyFingerprint {
+ optional uint32 rawId = 1;
+ optional uint32 currentIndex = 2;
+ repeated uint32 deviceIndexes = 3 [packed=true];
+}
+
+message AppStateSyncKeyData {
+ optional bytes keyData = 1;
+ optional AppStateSyncKeyFingerprint fingerprint = 2;
+ optional int64 timestamp = 3;
+}
+
+message AppStateSyncKeyShare {
+ repeated AppStateSyncKey keys = 1;
+}
+
+message AppStateSyncKeyRequest {
+ repeated AppStateSyncKeyId keyIds = 1;
+}
+
+message AppStateFatalExceptionNotification {
+ repeated string collectionNames = 1;
+ optional int64 timestamp = 2;
+}
+
+message InitialSecurityNotificationSettingSync {
+ optional bool securityNotificationEnabled = 1;
+}
+
+message ContactsArrayMessage {
+ optional string displayName = 1;
+ repeated ContactMessage contacts = 2;
+ optional ContextInfo contextInfo = 17;
+}
+
+message HSMCurrency {
+ optional string currencyCode = 1;
+ optional int64 amount1000 = 2;
+}
+
+message HSMDateTimeComponent {
+ enum HSMDateTimeComponentDayOfWeekType {
+ MONDAY = 1;
+ TUESDAY = 2;
+ WEDNESDAY = 3;
+ THURSDAY = 4;
+ FRIDAY = 5;
+ SATURDAY = 6;
+ SUNDAY = 7;
+ }
+ optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1;
+ optional uint32 year = 2;
+ optional uint32 month = 3;
+ optional uint32 dayOfMonth = 4;
+ optional uint32 hour = 5;
+ optional uint32 minute = 6;
+ enum HSMDateTimeComponentCalendarType {
+ GREGORIAN = 1;
+ SOLAR_HIJRI = 2;
+ }
+ optional HSMDateTimeComponentCalendarType calendar = 7;
+}
+
+message HSMDateTimeUnixEpoch {
+ optional int64 timestamp = 1;
+}
+
+message HSMDateTime {
+ oneof datetimeOneof {
+ HSMDateTimeComponent component = 1;
+ HSMDateTimeUnixEpoch unixEpoch = 2;
+ }
+}
+
+message HSMLocalizableParameter {
+ optional string default = 1;
+ oneof paramOneof {
+ HSMCurrency currency = 2;
+ HSMDateTime dateTime = 3;
+ }
+}
+
+message HighlyStructuredMessage {
+ optional string namespace = 1;
+ optional string elementName = 2;
+ repeated string params = 3;
+ optional string fallbackLg = 4;
+ optional string fallbackLc = 5;
+ repeated HSMLocalizableParameter localizableParams = 6;
+ optional string deterministicLg = 7;
+ optional string deterministicLc = 8;
+ optional TemplateMessage hydratedHsm = 9;
+}
+
+message SendPaymentMessage {
+ optional Message noteMessage = 2;
+ optional MessageKey requestMessageKey = 3;
+ optional PaymentBackground background = 4;
+}
+
+message RequestPaymentMessage {
+ optional Message noteMessage = 4;
+ optional string currencyCodeIso4217 = 1;
+ optional uint64 amount1000 = 2;
+ optional string requestFrom = 3;
+ optional int64 expiryTimestamp = 5;
+ optional Money amount = 6;
+ optional PaymentBackground background = 7;
+}
+
+message DeclinePaymentRequestMessage {
+ optional MessageKey key = 1;
+}
+
+message CancelPaymentRequestMessage {
+ optional MessageKey key = 1;
+}
+
+message PaymentInviteMessage {
+ enum PaymentInviteMessageServiceType {
+ UNKNOWN = 0;
+ FBPAY = 1;
+ NOVI = 2;
+ UPI = 3;
+ }
+ optional PaymentInviteMessageServiceType serviceType = 1;
+ optional int64 expiryTimestamp = 2;
+}
+
+message LiveLocationMessage {
+ optional double degreesLatitude = 1;
+ optional double degreesLongitude = 2;
+ optional uint32 accuracyInMeters = 3;
+ optional float speedInMps = 4;
+ optional uint32 degreesClockwiseFromMagneticNorth = 5;
+ optional string caption = 6;
+ optional int64 sequenceNumber = 7;
+ optional uint32 timeOffset = 8;
+ optional bytes jpegThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+}
+
+message StickerMessage {
+ optional string url = 1;
+ optional bytes fileSha256 = 2;
+ optional bytes fileEncSha256 = 3;
+ optional bytes mediaKey = 4;
+ optional string mimetype = 5;
+ optional uint32 height = 6;
+ optional uint32 width = 7;
+ optional string directPath = 8;
+ optional uint64 fileLength = 9;
+ optional int64 mediaKeyTimestamp = 10;
+ optional uint32 firstFrameLength = 11;
+ optional bytes firstFrameSidecar = 12;
+ optional bool isAnimated = 13;
+ optional bytes pngThumbnail = 16;
+ optional ContextInfo contextInfo = 17;
+}
+
+message FourRowTemplate {
+ optional HighlyStructuredMessage content = 6;
+ optional HighlyStructuredMessage footer = 7;
+ repeated TemplateButton buttons = 8;
+ oneof title {
+ DocumentMessage documentMessage = 1;
+ HighlyStructuredMessage highlyStructuredMessage = 2;
+ ImageMessage imageMessage = 3;
+ VideoMessage videoMessage = 4;
+ LocationMessage locationMessage = 5;
+ }
+}
+
+message HydratedFourRowTemplate {
+ optional string hydratedContentText = 6;
+ optional string hydratedFooterText = 7;
+ repeated HydratedTemplateButton hydratedButtons = 8;
+ optional string templateId = 9;
+ oneof title {
+ DocumentMessage documentMessage = 1;
+ string hydratedTitleText = 2;
+ ImageMessage imageMessage = 3;
+ VideoMessage videoMessage = 4;
+ LocationMessage locationMessage = 5;
+ }
+}
+
+message TemplateMessage {
+ optional ContextInfo contextInfo = 3;
+ optional HydratedFourRowTemplate hydratedTemplate = 4;
+ oneof format {
+ FourRowTemplate fourRowTemplate = 1;
+ HydratedFourRowTemplate hydratedFourRowTemplate = 2;
+ }
+}
+
+message TemplateButtonReplyMessage {
+ optional string selectedId = 1;
+ optional string selectedDisplayText = 2;
+ optional ContextInfo contextInfo = 3;
+ optional uint32 selectedIndex = 4;
+}
+
+message CatalogSnapshot {
+ optional ImageMessage catalogImage = 1;
+ optional string title = 2;
+ optional string description = 3;
+}
+
+message ProductSnapshot {
+ optional ImageMessage productImage = 1;
+ optional string productId = 2;
+ optional string title = 3;
+ optional string description = 4;
+ optional string currencyCode = 5;
+ optional int64 priceAmount1000 = 6;
+ optional string retailerId = 7;
+ optional string url = 8;
+ optional uint32 productImageCount = 9;
+ optional string firstImageId = 11;
+ optional int64 salePriceAmount1000 = 12;
+}
+
+message ProductMessage {
+ optional ProductSnapshot product = 1;
+ optional string businessOwnerJid = 2;
+ optional CatalogSnapshot catalog = 4;
+ optional string body = 5;
+ optional string footer = 6;
+ optional ContextInfo contextInfo = 17;
+}
+
+message OrderMessage {
+ optional string orderId = 1;
+ optional bytes thumbnail = 2;
+ optional int32 itemCount = 3;
+ enum OrderMessageOrderStatus {
+ INQUIRY = 1;
+ }
+ optional OrderMessageOrderStatus status = 4;
+ enum OrderMessageOrderSurface {
+ CATALOG = 1;
+ }
+ optional OrderMessageOrderSurface surface = 5;
+ optional string message = 6;
+ optional string orderTitle = 7;
+ optional string sellerJid = 8;
+ optional string token = 9;
+ optional int64 totalAmount1000 = 10;
+ optional string totalCurrencyCode = 11;
+ optional ContextInfo contextInfo = 17;
+}
+
+message Row {
+ optional string title = 1;
+ optional string description = 2;
+ optional string rowId = 3;
+}
+
+message Section {
+ optional string title = 1;
+ repeated Row rows = 2;
+}
+
+message Product {
+ optional string productId = 1;
+}
+
+message ProductSection {
+ optional string title = 1;
+ repeated Product products = 2;
+}
+
+message ProductListHeaderImage {
+ optional string productId = 1;
+ optional bytes jpegThumbnail = 2;
+}
+
+message ProductListInfo {
+ repeated ProductSection productSections = 1;
+ optional ProductListHeaderImage headerImage = 2;
+ optional string businessOwnerJid = 3;
+}
+
+message ListMessage {
+ optional string title = 1;
+ optional string description = 2;
+ optional string buttonText = 3;
+ enum ListMessageListType {
+ UNKNOWN = 0;
+ SINGLE_SELECT = 1;
+ PRODUCT_LIST = 2;
+ }
+ optional ListMessageListType listType = 4;
+ repeated Section sections = 5;
+ optional ProductListInfo productListInfo = 6;
+ optional string footerText = 7;
+ optional ContextInfo contextInfo = 8;
+}
+
+message SingleSelectReply {
+ optional string selectedRowId = 1;
+}
+
+message ListResponseMessage {
+ optional string title = 1;
+ enum ListResponseMessageListType {
+ UNKNOWN = 0;
+ SINGLE_SELECT = 1;
+ }
+ optional ListResponseMessageListType listType = 2;
+ optional SingleSelectReply singleSelectReply = 3;
+ optional ContextInfo contextInfo = 4;
+ optional string description = 5;
+}
+
+message Header {
+ optional string title = 1;
+ optional string subtitle = 2;
+ optional bool hasMediaAttachment = 5;
+ oneof media {
+ DocumentMessage documentMessage = 3;
+ ImageMessage imageMessage = 4;
+ bytes jpegThumbnail = 6;
+ VideoMessage videoMessage = 7;
+ }
+}
+
+message Body {
+ optional string text = 1;
+}
+
+message Footer {
+ optional string text = 1;
+}
+
+message ShopMessage {
+ optional string id = 1;
+ enum ShopMessageSurface {
+ UNKNOWN_SURFACE = 0;
+ FB = 1;
+ IG = 2;
+ WA = 3;
+ }
+ optional ShopMessageSurface surface = 2;
+ optional int32 messageVersion = 3;
+}
+
+message CollectionMessage {
+ optional string bizJid = 1;
+ optional string id = 2;
+ optional int32 messageVersion = 3;
+}
+
+message NativeFlowButton {
+ optional string name = 1;
+ optional string buttonParamsJson = 2;
+}
+
+message NativeFlowMessage {
+ repeated NativeFlowButton buttons = 1;
+ optional string messageParamsJson = 2;
+ optional int32 messageVersion = 3;
+}
+
+message InteractiveMessage {
+ optional Header header = 1;
+ optional Body body = 2;
+ optional Footer footer = 3;
+ optional ContextInfo contextInfo = 15;
+ oneof interactiveMessage {
+ ShopMessage shopStorefrontMessage = 4;
+ CollectionMessage collectionMessage = 5;
+ NativeFlowMessage nativeFlowMessage = 6;
+ }
+}
+
+message GroupInviteMessage {
+ optional string groupJid = 1;
+ optional string inviteCode = 2;
+ optional int64 inviteExpiration = 3;
+ optional string groupName = 4;
+ optional bytes jpegThumbnail = 5;
+ optional string caption = 6;
+ optional ContextInfo contextInfo = 7;
+ enum GroupInviteMessageGroupType {
+ DEFAULT = 0;
+ PARENT = 1;
+ }
+ optional GroupInviteMessageGroupType groupType = 8;
+}
+
+message DeviceSentMessage {
+ optional string destinationJid = 1;
+ optional Message message = 2;
+ optional string phash = 3;
+}
+
+message FutureProofMessage {
+ optional Message message = 1;
+}
+
+message ButtonText {
+ optional string displayText = 1;
+}
+
+message NativeFlowInfo {
+ optional string name = 1;
+ optional string paramsJson = 2;
+}
+
+message Button {
+ optional string buttonId = 1;
+ optional ButtonText buttonText = 2;
+ enum ButtonType {
+ UNKNOWN = 0;
+ RESPONSE = 1;
+ NATIVE_FLOW = 2;
+ }
+ optional ButtonType type = 3;
+ optional NativeFlowInfo nativeFlowInfo = 4;
+}
+
+message ButtonsMessage {
+ optional string contentText = 6;
+ optional string footerText = 7;
+ optional ContextInfo contextInfo = 8;
+ repeated Button buttons = 9;
+ enum ButtonsMessageHeaderType {
+ UNKNOWN = 0;
+ EMPTY = 1;
+ TEXT = 2;
+ DOCUMENT = 3;
+ IMAGE = 4;
+ VIDEO = 5;
+ LOCATION = 6;
+ }
+ optional ButtonsMessageHeaderType headerType = 10;
+ oneof header {
+ string text = 1;
+ DocumentMessage documentMessage = 2;
+ ImageMessage imageMessage = 3;
+ VideoMessage videoMessage = 4;
+ LocationMessage locationMessage = 5;
+ }
+}
+
+message ButtonsResponseMessage {
+ optional string selectedButtonId = 1;
+ optional ContextInfo contextInfo = 3;
+ enum ButtonsResponseMessageType {
+ UNKNOWN = 0;
+ DISPLAY_TEXT = 1;
+ }
+ optional ButtonsResponseMessageType type = 4;
+ oneof response {
+ string selectedDisplayText = 2;
+ }
+}
+
+message ReactionMessage {
+ optional MessageKey key = 1;
+ optional string text = 2;
+ optional string groupingKey = 3;
+ optional int64 senderTimestampMs = 4;
+}
+
+message StickerSyncRMRMessage {
+ repeated string filehash = 1;
+ optional string rmrSource = 2;
+ optional int64 requestTimestamp = 3;
+}
+
+message Message {
+ optional string conversation = 1;
+ optional SenderKeyDistributionMessage senderKeyDistributionMessage = 2;
+ optional ImageMessage imageMessage = 3;
+ optional ContactMessage contactMessage = 4;
+ optional LocationMessage locationMessage = 5;
+ optional ExtendedTextMessage extendedTextMessage = 6;
+ optional DocumentMessage documentMessage = 7;
+ optional AudioMessage audioMessage = 8;
+ optional VideoMessage videoMessage = 9;
+ optional Call call = 10;
+ optional Chat chat = 11;
+ optional ProtocolMessage protocolMessage = 12;
+ optional ContactsArrayMessage contactsArrayMessage = 13;
+ optional HighlyStructuredMessage highlyStructuredMessage = 14;
+ optional SenderKeyDistributionMessage fastRatchetKeySenderKeyDistributionMessage = 15;
+ optional SendPaymentMessage sendPaymentMessage = 16;
+ optional LiveLocationMessage liveLocationMessage = 18;
+ optional RequestPaymentMessage requestPaymentMessage = 22;
+ optional DeclinePaymentRequestMessage declinePaymentRequestMessage = 23;
+ optional CancelPaymentRequestMessage cancelPaymentRequestMessage = 24;
+ optional TemplateMessage templateMessage = 25;
+ optional StickerMessage stickerMessage = 26;
+ optional GroupInviteMessage groupInviteMessage = 28;
+ optional TemplateButtonReplyMessage templateButtonReplyMessage = 29;
+ optional ProductMessage productMessage = 30;
+ optional DeviceSentMessage deviceSentMessage = 31;
+ optional MessageContextInfo messageContextInfo = 35;
+ optional ListMessage listMessage = 36;
+ optional FutureProofMessage viewOnceMessage = 37;
+ optional OrderMessage orderMessage = 38;
+ optional ListResponseMessage listResponseMessage = 39;
+ optional FutureProofMessage ephemeralMessage = 40;
+ optional InvoiceMessage invoiceMessage = 41;
+ optional ButtonsMessage buttonsMessage = 42;
+ optional ButtonsResponseMessage buttonsResponseMessage = 43;
+ optional PaymentInviteMessage paymentInviteMessage = 44;
+ optional InteractiveMessage interactiveMessage = 45;
+ optional ReactionMessage reactionMessage = 46;
+ optional StickerSyncRMRMessage stickerSyncRmrMessage = 47;
+}
+
+message ActionLink {
+ optional string url = 1;
+ optional string buttonTitle = 2;
+}
+
+message DisappearingMode {
+ enum DisappearingModeInitiator {
+ CHANGED_IN_CHAT = 0;
+ INITIATED_BY_ME = 1;
+ INITIATED_BY_OTHER = 2;
+ }
+ optional DisappearingModeInitiator initiator = 1;
+}
+
+// Renamed from MediaData
+message PBMediaData {
+ optional bytes mediaKey = 1;
+ optional int64 mediaKeyTimestamp = 2;
+ optional bytes fileSha256 = 3;
+ optional bytes fileEncSha256 = 4;
+ optional string directPath = 5;
+}
+
+message PaymentBackground {
+ optional string id = 1;
+ optional uint64 fileLength = 2;
+ optional uint32 width = 3;
+ optional uint32 height = 4;
+ optional string mimetype = 5;
+ optional fixed32 placeholderArgb = 6;
+ optional fixed32 textArgb = 7;
+ optional fixed32 subtextArgb = 8;
+ optional PBMediaData mediaData = 9;
+ enum PaymentBackgroundType {
+ UNKNOWN = 0;
+ DEFAULT = 1;
+ }
+ optional PaymentBackgroundType type = 10;
+}
+
+message Money {
+ optional int64 value = 1;
+ optional uint32 offset = 2;
+ optional string currencyCode = 3;
+}
+
+message HydratedQuickReplyButton {
+ optional string displayText = 1;
+ optional string id = 2;
+}
+
+message HydratedURLButton {
+ optional string displayText = 1;
+ optional string url = 2;
+}
+
+message HydratedCallButton {
+ optional string displayText = 1;
+ optional string phoneNumber = 2;
+}
+
+message HydratedTemplateButton {
+ optional uint32 index = 4;
+ oneof hydratedButton {
+ HydratedQuickReplyButton quickReplyButton = 1;
+ HydratedURLButton urlButton = 2;
+ HydratedCallButton callButton = 3;
+ }
+}
+
+message QuickReplyButton {
+ optional HighlyStructuredMessage displayText = 1;
+ optional string id = 2;
+}
+
+message URLButton {
+ optional HighlyStructuredMessage displayText = 1;
+ optional HighlyStructuredMessage url = 2;
+}
+
+message CallButton {
+ optional HighlyStructuredMessage displayText = 1;
+ optional HighlyStructuredMessage phoneNumber = 2;
+}
+
+message TemplateButton {
+ optional uint32 index = 4;
+ oneof button {
+ QuickReplyButton quickReplyButton = 1;
+ URLButton urlButton = 2;
+ CallButton callButton = 3;
+ }
+}
+
+message Location {
+ optional double degreesLatitude = 1;
+ optional double degreesLongitude = 2;
+ optional string name = 3;
+}
+
+message Point {
+ optional int32 xDeprecated = 1;
+ optional int32 yDeprecated = 2;
+ optional double x = 3;
+ optional double y = 4;
+}
+
+// Duplicate type omitted
+//message AppVersion {
+// optional uint32 primary = 1;
+// optional uint32 secondary = 2;
+// optional uint32 tertiary = 3;
+// optional uint32 quaternary = 4;
+// optional uint32 quinary = 5;
+//}
+
+message CompanionProps {
+ optional string os = 1;
+ optional AppVersion version = 2;
+ enum CompanionPropsPlatformType {
+ 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;
+ }
+ optional CompanionPropsPlatformType platformType = 3;
+ optional bool requireFullSync = 4;
+}
+
+message ADVSignedDeviceIdentityHMAC {
+ optional bytes details = 1;
+ optional bytes hmac = 2;
+}
+
+message ADVSignedDeviceIdentity {
+ optional bytes details = 1;
+ optional bytes accountSignatureKey = 2;
+ optional bytes accountSignature = 3;
+ optional bytes deviceSignature = 4;
+}
+
+message ADVDeviceIdentity {
+ optional uint32 rawId = 1;
+ optional uint64 timestamp = 2;
+ optional uint32 keyIndex = 3;
+}
+
+message ADVSignedKeyIndexList {
+ optional bytes details = 1;
+ optional bytes accountSignature = 2;
+}
+
+message ADVKeyIndexList {
+ optional uint32 rawId = 1;
+ optional uint64 timestamp = 2;
+ optional uint32 currentIndex = 3;
+ repeated uint32 validIndexes = 4 [packed=true];
+}
+
+message MessageKey {
+ optional string remoteJid = 1;
+ optional bool fromMe = 2;
+ optional string id = 3;
+ optional string participant = 4;
+}
+
+message Reaction {
+ optional MessageKey key = 1;
+ optional string text = 2;
+ optional string groupingKey = 3;
+ optional int64 senderTimestampMs = 4;
+ optional bool unread = 5;
+}
+
+message UserReceipt {
+ required string userJid = 1;
+ optional int64 receiptTimestamp = 2;
+ optional int64 readTimestamp = 3;
+ optional int64 playedTimestamp = 4;
+ repeated string pendingDeviceJid = 5;
+ repeated string deliveredDeviceJid = 6;
+}
+
+message StatusPSA {
+ required string campaignId = 44;
+ optional uint64 campaignExpirationTimestamp = 45;
+}
+
+message PhotoChange {
+ optional bytes oldPhoto = 1;
+ optional bytes newPhoto = 2;
+ optional uint32 newPhotoId = 3;
+}
+
+message MediaData {
+ optional string localPath = 1;
+}
+
+message WebFeatures {
+ enum WebFeaturesFlag {
+ NOT_STARTED = 0;
+ FORCE_UPGRADE = 1;
+ DEVELOPMENT = 2;
+ PRODUCTION = 3;
+ }
+ optional WebFeaturesFlag labelsDisplay = 1;
+ optional WebFeaturesFlag voipIndividualOutgoing = 2;
+ optional WebFeaturesFlag groupsV3 = 3;
+ optional WebFeaturesFlag groupsV3Create = 4;
+ optional WebFeaturesFlag changeNumberV2 = 5;
+ optional WebFeaturesFlag queryStatusV3Thumbnail = 6;
+ optional WebFeaturesFlag liveLocations = 7;
+ optional WebFeaturesFlag queryVname = 8;
+ optional WebFeaturesFlag voipIndividualIncoming = 9;
+ optional WebFeaturesFlag quickRepliesQuery = 10;
+ optional WebFeaturesFlag payments = 11;
+ optional WebFeaturesFlag stickerPackQuery = 12;
+ optional WebFeaturesFlag liveLocationsFinal = 13;
+ optional WebFeaturesFlag labelsEdit = 14;
+ optional WebFeaturesFlag mediaUpload = 15;
+ optional WebFeaturesFlag mediaUploadRichQuickReplies = 18;
+ optional WebFeaturesFlag vnameV2 = 19;
+ optional WebFeaturesFlag videoPlaybackUrl = 20;
+ optional WebFeaturesFlag statusRanking = 21;
+ optional WebFeaturesFlag voipIndividualVideo = 22;
+ optional WebFeaturesFlag thirdPartyStickers = 23;
+ optional WebFeaturesFlag frequentlyForwardedSetting = 24;
+ optional WebFeaturesFlag groupsV4JoinPermission = 25;
+ optional WebFeaturesFlag recentStickers = 26;
+ optional WebFeaturesFlag catalog = 27;
+ optional WebFeaturesFlag starredStickers = 28;
+ optional WebFeaturesFlag voipGroupCall = 29;
+ optional WebFeaturesFlag templateMessage = 30;
+ optional WebFeaturesFlag templateMessageInteractivity = 31;
+ optional WebFeaturesFlag ephemeralMessages = 32;
+ optional WebFeaturesFlag e2ENotificationSync = 33;
+ optional WebFeaturesFlag recentStickersV2 = 34;
+ optional WebFeaturesFlag recentStickersV3 = 36;
+ optional WebFeaturesFlag userNotice = 37;
+ optional WebFeaturesFlag support = 39;
+ optional WebFeaturesFlag groupUiiCleanup = 40;
+ optional WebFeaturesFlag groupDogfoodingInternalOnly = 41;
+ optional WebFeaturesFlag settingsSync = 42;
+ optional WebFeaturesFlag archiveV2 = 43;
+ optional WebFeaturesFlag ephemeralAllowGroupMembers = 44;
+ optional WebFeaturesFlag ephemeral24HDuration = 45;
+ optional WebFeaturesFlag mdForceUpgrade = 46;
+ optional WebFeaturesFlag disappearingMode = 47;
+ optional WebFeaturesFlag externalMdOptInAvailable = 48;
+ optional WebFeaturesFlag noDeleteMessageTimeLimit = 49;
+}
+
+message NotificationMessageInfo {
+ optional MessageKey key = 1;
+ optional Message message = 2;
+ optional uint64 messageTimestamp = 3;
+ optional string participant = 4;
+}
+
+message WebNotificationsInfo {
+ optional uint64 timestamp = 2;
+ optional uint32 unreadChats = 3;
+ optional uint32 notifyMessageCount = 4;
+ repeated WebMessageInfo notifyMessages = 5;
+}
+
+message PaymentInfo {
+ enum PaymentInfoCurrency {
+ UNKNOWN_CURRENCY = 0;
+ INR = 1;
+ }
+ optional PaymentInfoCurrency currencyDeprecated = 1;
+ optional uint64 amount1000 = 2;
+ optional string receiverJid = 3;
+ enum PaymentInfoStatus {
+ UNKNOWN_STATUS = 0;
+ PROCESSING = 1;
+ SENT = 2;
+ NEED_TO_ACCEPT = 3;
+ COMPLETE = 4;
+ COULD_NOT_COMPLETE = 5;
+ REFUNDED = 6;
+ EXPIRED = 7;
+ REJECTED = 8;
+ CANCELLED = 9;
+ WAITING_FOR_PAYER = 10;
+ WAITING = 11;
+ }
+ optional PaymentInfoStatus status = 4;
+ optional uint64 transactionTimestamp = 5;
+ optional MessageKey requestMessageKey = 6;
+ optional uint64 expiryTimestamp = 7;
+ optional bool futureproofed = 8;
+ optional string currency = 9;
+ enum PaymentInfoTxnStatus {
+ UNKNOWN = 0;
+ PENDING_SETUP = 1;
+ PENDING_RECEIVER_SETUP = 2;
+ INIT = 3;
+ SUCCESS = 4;
+ COMPLETED = 5;
+ FAILED = 6;
+ FAILED_RISK = 7;
+ FAILED_PROCESSING = 8;
+ FAILED_RECEIVER_PROCESSING = 9;
+ FAILED_DA = 10;
+ FAILED_DA_FINAL = 11;
+ REFUNDED_TXN = 12;
+ REFUND_FAILED = 13;
+ REFUND_FAILED_PROCESSING = 14;
+ REFUND_FAILED_DA = 15;
+ EXPIRED_TXN = 16;
+ AUTH_CANCELED = 17;
+ AUTH_CANCEL_FAILED_PROCESSING = 18;
+ AUTH_CANCEL_FAILED = 19;
+ COLLECT_INIT = 20;
+ COLLECT_SUCCESS = 21;
+ COLLECT_FAILED = 22;
+ COLLECT_FAILED_RISK = 23;
+ COLLECT_REJECTED = 24;
+ COLLECT_EXPIRED = 25;
+ COLLECT_CANCELED = 26;
+ COLLECT_CANCELLING = 27;
+ IN_REVIEW = 28;
+ }
+ optional PaymentInfoTxnStatus txnStatus = 10;
+ optional bool useNoviFiatFormat = 11;
+ optional Money primaryAmount = 12;
+ optional Money exchangeAmount = 13;
+}
+
+message WebMessageInfo {
+ required MessageKey key = 1;
+ optional Message message = 2;
+ optional uint64 messageTimestamp = 3;
+ enum WebMessageInfoStatus {
+ ERROR = 0;
+ PENDING = 1;
+ SERVER_ACK = 2;
+ DELIVERY_ACK = 3;
+ READ = 4;
+ PLAYED = 5;
+ }
+ optional WebMessageInfoStatus status = 4;
+ optional string participant = 5;
+ optional uint64 messageC2STimestamp = 6;
+ optional bool ignore = 16;
+ optional bool starred = 17;
+ optional bool broadcast = 18;
+ optional string pushName = 19;
+ optional bytes mediaCiphertextSha256 = 20;
+ optional bool multicast = 21;
+ optional bool urlText = 22;
+ optional bool urlNumber = 23;
+ enum WebMessageInfoStubType {
+ UNKNOWN = 0;
+ REVOKE = 1;
+ CIPHERTEXT = 2;
+ FUTUREPROOF = 3;
+ NON_VERIFIED_TRANSITION = 4;
+ UNVERIFIED_TRANSITION = 5;
+ VERIFIED_TRANSITION = 6;
+ VERIFIED_LOW_UNKNOWN = 7;
+ VERIFIED_HIGH = 8;
+ VERIFIED_INITIAL_UNKNOWN = 9;
+ VERIFIED_INITIAL_LOW = 10;
+ VERIFIED_INITIAL_HIGH = 11;
+ VERIFIED_TRANSITION_ANY_TO_NONE = 12;
+ VERIFIED_TRANSITION_ANY_TO_HIGH = 13;
+ VERIFIED_TRANSITION_HIGH_TO_LOW = 14;
+ VERIFIED_TRANSITION_HIGH_TO_UNKNOWN = 15;
+ VERIFIED_TRANSITION_UNKNOWN_TO_LOW = 16;
+ VERIFIED_TRANSITION_LOW_TO_UNKNOWN = 17;
+ VERIFIED_TRANSITION_NONE_TO_LOW = 18;
+ VERIFIED_TRANSITION_NONE_TO_UNKNOWN = 19;
+ GROUP_CREATE = 20;
+ GROUP_CHANGE_SUBJECT = 21;
+ GROUP_CHANGE_ICON = 22;
+ GROUP_CHANGE_INVITE_LINK = 23;
+ GROUP_CHANGE_DESCRIPTION = 24;
+ GROUP_CHANGE_RESTRICT = 25;
+ GROUP_CHANGE_ANNOUNCE = 26;
+ GROUP_PARTICIPANT_ADD = 27;
+ GROUP_PARTICIPANT_REMOVE = 28;
+ GROUP_PARTICIPANT_PROMOTE = 29;
+ GROUP_PARTICIPANT_DEMOTE = 30;
+ GROUP_PARTICIPANT_INVITE = 31;
+ GROUP_PARTICIPANT_LEAVE = 32;
+ GROUP_PARTICIPANT_CHANGE_NUMBER = 33;
+ BROADCAST_CREATE = 34;
+ BROADCAST_ADD = 35;
+ BROADCAST_REMOVE = 36;
+ GENERIC_NOTIFICATION = 37;
+ E2E_IDENTITY_CHANGED = 38;
+ E2E_ENCRYPTED = 39;
+ CALL_MISSED_VOICE = 40;
+ CALL_MISSED_VIDEO = 41;
+ INDIVIDUAL_CHANGE_NUMBER = 42;
+ GROUP_DELETE = 43;
+ GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE = 44;
+ CALL_MISSED_GROUP_VOICE = 45;
+ CALL_MISSED_GROUP_VIDEO = 46;
+ PAYMENT_CIPHERTEXT = 47;
+ PAYMENT_FUTUREPROOF = 48;
+ PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED = 49;
+ PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED = 50;
+ PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED = 51;
+ PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP = 52;
+ PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP = 53;
+ PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER = 54;
+ PAYMENT_ACTION_SEND_PAYMENT_REMINDER = 55;
+ PAYMENT_ACTION_SEND_PAYMENT_INVITATION = 56;
+ PAYMENT_ACTION_REQUEST_DECLINED = 57;
+ PAYMENT_ACTION_REQUEST_EXPIRED = 58;
+ PAYMENT_ACTION_REQUEST_CANCELLED = 59;
+ BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM = 60;
+ BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP = 61;
+ BIZ_INTRO_TOP = 62;
+ BIZ_INTRO_BOTTOM = 63;
+ BIZ_NAME_CHANGE = 64;
+ BIZ_MOVE_TO_CONSUMER_APP = 65;
+ BIZ_TWO_TIER_MIGRATION_TOP = 66;
+ BIZ_TWO_TIER_MIGRATION_BOTTOM = 67;
+ OVERSIZED = 68;
+ GROUP_CHANGE_NO_FREQUENTLY_FORWARDED = 69;
+ GROUP_V4_ADD_INVITE_SENT = 70;
+ GROUP_PARTICIPANT_ADD_REQUEST_JOIN = 71;
+ CHANGE_EPHEMERAL_SETTING = 72;
+ E2E_DEVICE_CHANGED = 73;
+ VIEWED_ONCE = 74;
+ E2E_ENCRYPTED_NOW = 75;
+ BLUE_MSG_BSP_FB_TO_BSP_PREMISE = 76;
+ BLUE_MSG_BSP_FB_TO_SELF_FB = 77;
+ BLUE_MSG_BSP_FB_TO_SELF_PREMISE = 78;
+ BLUE_MSG_BSP_FB_UNVERIFIED = 79;
+ BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 80;
+ BLUE_MSG_BSP_FB_VERIFIED = 81;
+ BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 82;
+ BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE = 83;
+ BLUE_MSG_BSP_PREMISE_UNVERIFIED = 84;
+ BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 85;
+ BLUE_MSG_BSP_PREMISE_VERIFIED = 86;
+ BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 87;
+ BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED = 88;
+ BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED = 89;
+ BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED = 90;
+ BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED = 91;
+ BLUE_MSG_SELF_FB_TO_BSP_PREMISE = 92;
+ BLUE_MSG_SELF_FB_TO_SELF_PREMISE = 93;
+ BLUE_MSG_SELF_FB_UNVERIFIED = 94;
+ BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 95;
+ BLUE_MSG_SELF_FB_VERIFIED = 96;
+ BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 97;
+ BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE = 98;
+ BLUE_MSG_SELF_PREMISE_UNVERIFIED = 99;
+ BLUE_MSG_SELF_PREMISE_VERIFIED = 100;
+ BLUE_MSG_TO_BSP_FB = 101;
+ BLUE_MSG_TO_CONSUMER = 102;
+ BLUE_MSG_TO_SELF_FB = 103;
+ BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED = 104;
+ BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 105;
+ BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED = 106;
+ BLUE_MSG_UNVERIFIED_TO_VERIFIED = 107;
+ BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED = 108;
+ BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 109;
+ BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED = 110;
+ BLUE_MSG_VERIFIED_TO_UNVERIFIED = 111;
+ BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 112;
+ BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED = 113;
+ BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 114;
+ BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED = 115;
+ BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116;
+ BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117;
+ E2E_IDENTITY_UNAVAILABLE = 118;
+ GROUP_CREATING = 119;
+ GROUP_CREATE_FAILED = 120;
+ GROUP_BOUNCED = 121;
+ BLOCK_CONTACT = 122;
+ EPHEMERAL_SETTING_NOT_APPLIED = 123;
+ SYNC_FAILED = 124;
+ SYNCING = 125;
+ BIZ_PRIVACY_MODE_INIT_FB = 126;
+ BIZ_PRIVACY_MODE_INIT_BSP = 127;
+ BIZ_PRIVACY_MODE_TO_FB = 128;
+ BIZ_PRIVACY_MODE_TO_BSP = 129;
+ DISAPPEARING_MODE = 130;
+ E2E_DEVICE_FETCH_FAILED = 131;
+ ADMIN_REVOKE = 132;
+ GROUP_INVITE_LINK_GROWTH_LOCKED = 133;
+ }
+ optional WebMessageInfoStubType messageStubType = 24;
+ optional bool clearMedia = 25;
+ repeated string messageStubParameters = 26;
+ optional uint32 duration = 27;
+ repeated string labels = 28;
+ optional PaymentInfo paymentInfo = 29;
+ optional LiveLocationMessage finalLiveLocation = 30;
+ optional PaymentInfo quotedPaymentInfo = 31;
+ optional uint64 ephemeralStartTimestamp = 32;
+ optional uint32 ephemeralDuration = 33;
+ optional bool ephemeralOffToOn = 34;
+ optional bool ephemeralOutOfSync = 35;
+ enum WebMessageInfoBizPrivacyStatus {
+ E2EE = 0;
+ FB = 2;
+ BSP = 1;
+ BSP_AND_FB = 3;
+ }
+ optional WebMessageInfoBizPrivacyStatus bizPrivacyStatus = 36;
+ optional string verifiedBizName = 37;
+ optional MediaData mediaData = 38;
+ optional PhotoChange photoChange = 39;
+ repeated UserReceipt userReceipt = 40;
+ repeated Reaction reactions = 41;
+ optional MediaData quotedStickerData = 42;
+ optional bytes futureproofData = 43;
+ optional StatusPSA statusPsa = 44;
+}
+
diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/doc.go b/vendor/go.mau.fi/whatsmeow/binary/proto/doc.go
new file mode 100644
index 00000000..819b1317
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/proto/doc.go
@@ -0,0 +1,2 @@
+// Package proto contains the compiled protobuf structs from WhatsApp's protobuf schema.
+package proto
diff --git a/vendor/go.mau.fi/whatsmeow/binary/token/token.go b/vendor/go.mau.fi/whatsmeow/binary/token/token.go
new file mode 100644
index 00000000..bea1d8d4
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/token/token.go
@@ -0,0 +1,88 @@
+// Package token contains maps of predefined tokens that WhatsApp's binary XML
+// encoding uses to save bytes when sending commonly used strings.
+package token
+
+import "fmt"
+
+// All the currently known string tokens.
+var (
+ SingleByteTokens = [...]string{"", "xmlstreamstart", "xmlstreamend", "s.whatsapp.net", "type", "participant", "from", "receipt", "id", "broadcast", "status", "message", "notification", "notify", "to", "jid", "user", "class", "offline", "g.us", "result", "mediatype", "enc", "skmsg", "off_cnt", "xmlns", "presence", "participants", "ack", "t", "iq", "device_hash", "read", "value", "media", "picture", "chatstate", "unavailable", "text", "urn:xmpp:whatsapp:push", "devices", "verified_name", "contact", "composing", "edge_routing", "routing_info", "item", "image", "verified_level", "get", "fallback_hostname", "2", "media_conn", "1", "v", "handshake", "fallback_class", "count", "config", "offline_preview", "download_buckets", "w:profile:picture", "set", "creation", "location", "fallback_ip4", "msg", "urn:xmpp:ping", "fallback_ip6", "call-creator", "relaylatency", "success", "subscribe", "video", "business_hours_config", "platform", "hostname", "version", "unknown", "0", "ping", "hash", "edit", "subject", "max_buckets", "download", "delivery", "props", "sticker", "name", "last", "contacts", "business", "primary", "preview", "w:p", "pkmsg", "call-id", "retry", "prop", "call", "auth_ttl", "available", "relay_id", "last_id", "day_of_week", "w", "host", "seen", "bits", "list", "atn", "upload", "is_new", "w:stats", "key", "paused", "specific_hours", "multicast", "stream:error", "mmg.whatsapp.net", "code", "deny", "played", "profile", "fna", "device-list", "close_time", "latency", "gcm", "pop", "audio", "26", "w:web", "open_time", "error", "auth", "ip4", "update", "profile_options", "config_value", "category", "catalog_not_created", "00", "config_code", "mode", "catalog_status", "ip6", "blocklist", "registration", "7", "web", "fail", "w:m", "cart_enabled", "ttl", "gif", "300", "device_orientation", "identity", "query", "401", "media-gig2-1.cdn.whatsapp.net", "in", "3", "te2", "add", "fallback", "categories", "ptt", "encrypt", "notice", "thumbnail-document", "item-not-found", "12", "thumbnail-image", "stage", "thumbnail-link", "usync", "out", "thumbnail-video", "8", "01", "context", "sidelist", "thumbnail-gif", "terminate", "not-authorized", "orientation", "dhash", "capability", "side_list", "md-app-state", "description", "serial", "readreceipts", "te", "business_hours", "md-msg-hist", "tag", "attribute_padding", "document", "open_24h", "delete", "expiration", "active", "prev_v_id", "true", "passive", "index", "4", "conflict", "remove", "w:gp2", "config_expo_key", "screen_height", "replaced", "02", "screen_width", "uploadfieldstat", "2:47DEQpj8", "media-bog1-1.cdn.whatsapp.net", "encopt", "url", "catalog_exists", "keygen", "rate", "offer", "opus", "media-mia3-1.cdn.whatsapp.net", "privacy", "media-mia3-2.cdn.whatsapp.net", "signature", "preaccept", "token_id", "media-eze1-1.cdn.whatsapp.net"}
+ DoubleByteTokens = [...][]string{
+ {"media-for1-1.cdn.whatsapp.net", "relay", "media-gru2-2.cdn.whatsapp.net", "uncompressed", "medium", "voip_settings", "device", "reason", "media-lim1-1.cdn.whatsapp.net", "media-qro1-2.cdn.whatsapp.net", "media-gru1-2.cdn.whatsapp.net", "action", "features", "media-gru2-1.cdn.whatsapp.net", "media-gru1-1.cdn.whatsapp.net", "media-otp1-1.cdn.whatsapp.net", "kyc-id", "priority", "phash", "mute", "token", "100", "media-qro1-1.cdn.whatsapp.net", "none", "media-mrs2-2.cdn.whatsapp.net", "sign_credential", "03", "media-mrs2-1.cdn.whatsapp.net", "protocol", "timezone", "transport", "eph_setting", "1080", "original_dimensions", "media-frx5-1.cdn.whatsapp.net", "background", "disable", "original_image_url", "5", "transaction-id", "direct_path", "103", "appointment_only", "request_image_url", "peer_pid", "address", "105", "104", "102", "media-cdt1-1.cdn.whatsapp.net", "101", "109", "110", "106", "background_location", "v_id", "sync", "status-old", "111", "107", "ppic", "media-scl2-1.cdn.whatsapp.net", "business_profile", "108", "invite", "04", "audio_duration", "media-mct1-1.cdn.whatsapp.net", "media-cdg2-1.cdn.whatsapp.net", "media-los2-1.cdn.whatsapp.net", "invis", "net", "voip_payload_type", "status-revoke-delay", "404", "state", "use_correct_order_for_hmac_sha1", "ver", "media-mad1-1.cdn.whatsapp.net", "order", "540", "skey", "blinded_credential", "android", "contact_remove", "enable_downlink_relay_latency_only", "duration", "enable_vid_one_way_codec_nego", "6", "media-sof1-1.cdn.whatsapp.net", "accept", "all", "signed_credential", "media-atl3-1.cdn.whatsapp.net", "media-lhr8-1.cdn.whatsapp.net", "website", "05", "latitude", "media-dfw5-1.cdn.whatsapp.net", "forbidden", "enable_audio_piggyback_network_mtu_fix", "media-dfw5-2.cdn.whatsapp.net", "note.m4r", "media-atl3-2.cdn.whatsapp.net", "jb_nack_discard_count_fix", "longitude", "Opening.m4r", "media-arn2-1.cdn.whatsapp.net", "email", "timestamp", "admin", "media-pmo1-1.cdn.whatsapp.net", "America/Sao_Paulo", "contact_add", "media-sin6-1.cdn.whatsapp.net", "interactive", "8000", "acs_public_key", "sigquit_anr_detector_release_rollover_percent", "media.fmed1-2.fna.whatsapp.net", "groupadd", "enabled_for_video_upgrade", "latency_update_threshold", "media-frt3-2.cdn.whatsapp.net", "calls_row_constraint_layout", "media.fgbb2-1.fna.whatsapp.net", "mms4_media_retry_notification_encryption_enabled", "timeout", "media-sin6-3.cdn.whatsapp.net", "audio_nack_jitter_multiplier", "jb_discard_count_adjust_pct_rc", "audio_reserve_bps", "delta", "account_sync", "default", "media.fjed4-6.fna.whatsapp.net", "06", "lock_video_orientation", "media-frt3-1.cdn.whatsapp.net", "w:g2", "media-sin6-2.cdn.whatsapp.net", "audio_nack_algo_mask", "media.fgbb2-2.fna.whatsapp.net", "media.fmed1-1.fna.whatsapp.net", "cond_range_target_bitrate", "mms4_server_error_receipt_encryption_enabled", "vid_rc_dyn", "fri", "cart_v1_1_order_message_changes_enabled", "reg_push", "jb_hist_deposit_value", "privatestats", "media.fist7-2.fna.whatsapp.net", "thu", "jb_discard_count_adjust_pct", "mon", "group_call_video_maximization_enabled", "mms_cat_v1_forward_hot_override_enabled", "audio_nack_new_rtt", "media.fsub2-3.fna.whatsapp.net", "media_upload_aggressive_retry_exponential_backoff_enabled", "tue", "wed", "media.fruh4-2.fna.whatsapp.net", "audio_nack_max_seq_req", "max_rtp_audio_packet_resends", "jb_hist_max_cdf_value", "07", "audio_nack_max_jb_delay", "mms_forward_partially_downloaded_video", "media-lcy1-1.cdn.whatsapp.net", "resume", "jb_inband_fec_aware", "new_commerce_entry_point_enabled", "480", "payments_upi_generate_qr_amount_limit", "sigquit_anr_detector_rollover_percent", "media.fsdu2-1.fna.whatsapp.net", "fbns", "aud_pkt_reorder_pct", "dec", "stop_probing_before_accept_send", "media_upload_max_aggressive_retries", "edit_business_profile_new_mode_enabled", "media.fhex4-1.fna.whatsapp.net", "media.fjed4-3.fna.whatsapp.net", "sigquit_anr_detector_64bit_rollover_percent", "cond_range_ema_jb_last_delay", "watls_enable_early_data_http_get", "media.fsdu2-2.fna.whatsapp.net", "message_qr_disambiguation_enabled", "media-mxp1-1.cdn.whatsapp.net", "sat", "vertical", "media.fruh4-5.fna.whatsapp.net", "200", "media-sof1-2.cdn.whatsapp.net", "-1", "height", "product_catalog_hide_show_items_enabled", "deep_copy_frm_last", "tsoffline", "vp8/h.264", "media.fgye5-3.fna.whatsapp.net", "media.ftuc1-2.fna.whatsapp.net", "smb_upsell_chat_banner_enabled", "canonical", "08", "9", ".", "media.fgyd4-4.fna.whatsapp.net", "media.fsti4-1.fna.whatsapp.net", "mms_vcache_aggregation_enabled", "mms_hot_content_timespan_in_seconds", "nse_ver", "rte", "third_party_sticker_web_sync", "cond_range_target_total_bitrate", "media_upload_aggressive_retry_enabled", "instrument_spam_report_enabled", "disable_reconnect_tone", "move_media_folder_from_sister_app", "one_tap_calling_in_group_chat_size", "10", "storage_mgmt_banner_threshold_mb", "enable_backup_passive_mode", "sharechat_inline_player_enabled", "media.fcnq2-1.fna.whatsapp.net", "media.fhex4-2.fna.whatsapp.net", "media.fist6-3.fna.whatsapp.net", "ephemeral_drop_column_stage", "reconnecting_after_network_change_threshold_ms", "media-lhr8-2.cdn.whatsapp.net", "cond_jb_last_delay_ema_alpha", "entry_point_block_logging_enabled", "critical_event_upload_log_config", "respect_initial_bitrate_estimate", "smaller_image_thumbs_status_enabled", "media.fbtz1-4.fna.whatsapp.net", "media.fjed4-1.fna.whatsapp.net", "width", "720", "enable_frame_dropper", "enable_one_side_mode", "urn:xmpp:whatsapp:dirty", "new_sticker_animation_behavior_v2", "media.flim3-2.fna.whatsapp.net", "media.fuio6-2.fna.whatsapp.net", "skip_forced_signaling", "dleq_proof", "status_video_max_bitrate", "lazy_send_probing_req", "enhanced_storage_management", "android_privatestats_endpoint_dit_enabled", "media.fscl13-2.fna.whatsapp.net", "video_duration"},
+ {"group_call_discoverability_enabled", "media.faep9-2.fna.whatsapp.net", "msgr", "bloks_loggedin_access_app_id", "db_status_migration_step", "watls_prefer_ip6", "jabber:iq:privacy", "68", "media.fsaw1-11.fna.whatsapp.net", "mms4_media_conn_persist_enabled", "animated_stickers_thread_clean_up", "media.fcgk3-2.fna.whatsapp.net", "media.fcgk4-6.fna.whatsapp.net", "media.fgye5-2.fna.whatsapp.net", "media.flpb1-1.fna.whatsapp.net", "media.fsub2-1.fna.whatsapp.net", "media.fuio6-3.fna.whatsapp.net", "not-allowed", "partial_pjpeg_bw_threshold", "cap_estimated_bitrate", "mms_chatd_resume_check_over_thrift", "smb_upsell_business_profile_enabled", "product_catalog_webclient", "groups", "sigquit_anr_detector_release_updated_rollout", "syncd_key_rotation_enabled", "media.fdmm2-1.fna.whatsapp.net", "media-hou1-1.cdn.whatsapp.net", "remove_old_chat_notifications", "smb_biztools_deeplink_enabled", "use_downloadable_filters_int", "group_qr_codes_enabled", "max_receipt_processing_time", "optimistic_image_processing_enabled", "smaller_video_thumbs_status_enabled", "watls_early_data", "reconnecting_before_relay_failover_threshold_ms", "cond_range_packet_loss_pct", "groups_privacy_blacklist", "status-revoke-drop", "stickers_animated_thumbnail_download", "dedupe_transcode_shared_images", "dedupe_transcode_shared_videos", "media.fcnq2-2.fna.whatsapp.net", "media.fgyd4-1.fna.whatsapp.net", "media.fist7-1.fna.whatsapp.net", "media.flim3-3.fna.whatsapp.net", "add_contact_by_qr_enabled", "https://faq.whatsapp.com/payments", "multicast_limit_global", "sticker_notification_preview", "smb_better_catalog_list_adapters_enabled", "bloks_use_minscript_android", "pen_smoothing_enabled", "media.fcgk4-5.fna.whatsapp.net", "media.fevn1-3.fna.whatsapp.net", "media.fpoj7-1.fna.whatsapp.net", "media-arn2-2.cdn.whatsapp.net", "reconnecting_before_network_change_threshold_ms", "android_media_use_fresco_for_gifs", "cond_in_congestion", "status_image_max_edge", "sticker_search_enabled", "starred_stickers_web_sync", "db_blank_me_jid_migration_step", "media.fist6-2.fna.whatsapp.net", "media.ftuc1-1.fna.whatsapp.net", "09", "anr_fast_logs_upload_rollout", "camera_core_integration_enabled", "11", "third_party_sticker_caching", "thread_dump_contact_support", "wam_privatestats_enabled", "vcard_as_document_size_kb", "maxfpp", "fbip", "ephemeral_allow_group_members", "media-bom1-2.cdn.whatsapp.net", "media-xsp1-1.cdn.whatsapp.net", "disable_prewarm", "frequently_forwarded_max", "media.fbtz1-5.fna.whatsapp.net", "media.fevn7-1.fna.whatsapp.net", "media.fgyd4-2.fna.whatsapp.net", "sticker_tray_animation_fully_visible_items", "green_alert_banner_duration", "reconnecting_after_p2p_failover_threshold_ms", "connected", "share_biz_vcard_enabled", "stickers_animation", "0a", "1200", "WhatsApp", "group_description_length", "p_v_id", "payments_upi_intent_transaction_limit", "frequently_forwarded_messages", "media-xsp1-2.cdn.whatsapp.net", "media.faep8-1.fna.whatsapp.net", "media.faep8-2.fna.whatsapp.net", "media.faep9-1.fna.whatsapp.net", "media.fdmm2-2.fna.whatsapp.net", "media.fgzt3-1.fna.whatsapp.net", "media.flim4-2.fna.whatsapp.net", "media.frao1-1.fna.whatsapp.net", "media.fscl9-2.fna.whatsapp.net", "media.fsub2-2.fna.whatsapp.net", "superadmin", "media.fbog10-1.fna.whatsapp.net", "media.fcgh28-1.fna.whatsapp.net", "media.fjdo10-1.fna.whatsapp.net", "third_party_animated_sticker_import", "delay_fec", "attachment_picker_refresh", "android_linked_devices_re_auth_enabled", "rc_dyn", "green_alert_block_jitter", "add_contact_logging_enabled", "biz_message_logging_enabled", "conversation_media_preview_v2", "media-jnb1-1.cdn.whatsapp.net", "ab_key", "media.fcgk4-2.fna.whatsapp.net", "media.fevn1-1.fna.whatsapp.net", "media.fist6-1.fna.whatsapp.net", "media.fruh4-4.fna.whatsapp.net", "media.fsti4-2.fna.whatsapp.net", "mms_vcard_autodownload_size_kb", "watls_enabled", "notif_ch_override_off", "media.fsaw1-14.fna.whatsapp.net", "media.fscl13-1.fna.whatsapp.net", "db_group_participant_migration_step", "1020", "cond_range_sterm_rtt", "invites_logging_enabled", "triggered_block_enabled", "group_call_max_participants", "media-iad3-1.cdn.whatsapp.net", "product_catalog_open_deeplink", "shops_required_tos_version", "image_max_kbytes", "cond_low_quality_vid_mode", "db_receipt_migration_step", "jb_early_prob_hist_shrink", "media.fdmm2-3.fna.whatsapp.net", "media.fdmm2-4.fna.whatsapp.net", "media.fruh4-1.fna.whatsapp.net", "media.fsaw2-2.fna.whatsapp.net", "remove_geolocation_videos", "new_animation_behavior", "fieldstats_beacon_chance", "403", "authkey_reset_on_ban", "continuous_ptt_playback", "reconnecting_after_relay_failover_threshold_ms", "false", "group", "sun", "conversation_swipe_to_reply", "ephemeral_messages_setting", "smaller_video_thumbs_enabled", "md_device_sync_enabled", "bloks_shops_pdp_url_regex", "lasso_integration_enabled", "media-bom1-1.cdn.whatsapp.net", "new_backup_format_enabled", "256", "media.faep6-1.fna.whatsapp.net", "media.fasr1-1.fna.whatsapp.net", "media.fbtz1-7.fna.whatsapp.net", "media.fesb4-1.fna.whatsapp.net", "media.fjdo1-2.fna.whatsapp.net", "media.frba2-1.fna.whatsapp.net", "watls_no_dns", "600", "db_broadcast_me_jid_migration_step", "new_wam_runtime_enabled", "group_update", "enhanced_block_enabled", "sync_wifi_threshold_kb", "mms_download_nc_cat", "bloks_minification_enabled", "ephemeral_messages_enabled", "reject", "voip_outgoing_xml_signaling", "creator", "dl_bw", "payments_request_messages", "target_bitrate", "bloks_rendercore_enabled", "media-hbe1-1.cdn.whatsapp.net", "media-hel3-1.cdn.whatsapp.net", "media-kut2-2.cdn.whatsapp.net", "media-lax3-1.cdn.whatsapp.net", "media-lax3-2.cdn.whatsapp.net", "sticker_pack_deeplink_enabled", "hq_image_bw_threshold", "status_info", "voip", "dedupe_transcode_videos", "grp_uii_cleanup", "linked_device_max_count", "media.flim1-1.fna.whatsapp.net", "media.fsaw2-1.fna.whatsapp.net", "reconnecting_after_call_active_threshold_ms", "1140", "catalog_pdp_new_design", "media.fbtz1-10.fna.whatsapp.net", "media.fsaw1-15.fna.whatsapp.net", "0b", "consumer_rc_provider", "mms_async_fast_forward_ttl", "jb_eff_size_fix", "voip_incoming_xml_signaling", "media_provider_share_by_uuid", "suspicious_links", "dedupe_transcode_images", "green_alert_modal_start", "media-cgk1-1.cdn.whatsapp.net", "media-lga3-1.cdn.whatsapp.net", "template_doc_mime_types", "important_messages", "user_add", "vcard_max_size_kb", "media.fada2-1.fna.whatsapp.net", "media.fbog2-5.fna.whatsapp.net", "media.fbtz1-3.fna.whatsapp.net", "media.fcgk3-1.fna.whatsapp.net", "media.fcgk7-1.fna.whatsapp.net", "media.flim1-3.fna.whatsapp.net", "media.fscl9-1.fna.whatsapp.net", "ctwa_context_enterprise_enabled", "media.fsaw1-13.fna.whatsapp.net", "media.fuio11-2.fna.whatsapp.net", "status_collapse_muted", "db_migration_level_force", "recent_stickers_web_sync", "bloks_session_state", "bloks_shops_enabled", "green_alert_setting_deep_links_enabled", "restrict_groups", "battery", "green_alert_block_start", "refresh", "ctwa_context_enabled", "md_messaging_enabled", "status_image_quality", "md_blocklist_v2_server", "media-del1-1.cdn.whatsapp.net", "13", "userrate", "a_v_id", "cond_rtt_ema_alpha", "invalid"},
+ {"media.fada1-1.fna.whatsapp.net", "media.fadb3-2.fna.whatsapp.net", "media.fbhz2-1.fna.whatsapp.net", "media.fcor2-1.fna.whatsapp.net", "media.fjed4-2.fna.whatsapp.net", "media.flhe4-1.fna.whatsapp.net", "media.frak1-2.fna.whatsapp.net", "media.fsub6-3.fna.whatsapp.net", "media.fsub6-7.fna.whatsapp.net", "media.fvvi1-1.fna.whatsapp.net", "search_v5_eligible", "wam_real_time_enabled", "report_disk_event", "max_tx_rott_based_bitrate", "product", "media.fjdo10-2.fna.whatsapp.net", "video_frame_crc_sample_interval", "media_max_autodownload", "15", "h.264", "wam_privatestats_buffer_count", "md_phash_v2_enabled", "account_transfer_enabled", "business_product_catalog", "enable_non_dyn_codec_param_fix", "is_user_under_epd_jurisdiction", "media.fbog2-4.fna.whatsapp.net", "media.fbtz1-2.fna.whatsapp.net", "media.fcfc1-1.fna.whatsapp.net", "media.fjed4-5.fna.whatsapp.net", "media.flhe4-2.fna.whatsapp.net", "media.flim1-2.fna.whatsapp.net", "media.flos5-1.fna.whatsapp.net", "android_key_store_auth_ver", "010", "anr_process_monitor", "delete_old_auth_key", "media.fcor10-3.fna.whatsapp.net", "storage_usage_enabled", "android_camera2_support_level", "dirty", "consumer_content_provider", "status_video_max_duration", "0c", "bloks_cache_enabled", "media.fadb2-2.fna.whatsapp.net", "media.fbko1-1.fna.whatsapp.net", "media.fbtz1-9.fna.whatsapp.net", "media.fcgk4-4.fna.whatsapp.net", "media.fesb4-2.fna.whatsapp.net", "media.fevn1-2.fna.whatsapp.net", "media.fist2-4.fna.whatsapp.net", "media.fjdo1-1.fna.whatsapp.net", "media.fruh4-6.fna.whatsapp.net", "media.fsrg5-1.fna.whatsapp.net", "media.fsub6-6.fna.whatsapp.net", "minfpp", "5000", "locales", "video_max_bitrate", "use_new_auth_key", "bloks_http_enabled", "heartbeat_interval", "media.fbog11-1.fna.whatsapp.net", "ephemeral_group_query_ts", "fec_nack", "search_in_storage_usage", "c", "media-amt2-1.cdn.whatsapp.net", "linked_devices_ui_enabled", "14", "async_data_load_on_startup", "voip_incoming_xml_ack", "16", "db_migration_step", "init_bwe", "max_participants", "wam_buffer_count", "media.fada2-2.fna.whatsapp.net", "media.fadb3-1.fna.whatsapp.net", "media.fcor2-2.fna.whatsapp.net", "media.fdiy1-2.fna.whatsapp.net", "media.frba3-2.fna.whatsapp.net", "media.fsaw2-3.fna.whatsapp.net", "1280", "status_grid_enabled", "w:biz", "product_catalog_deeplink", "media.fgye10-2.fna.whatsapp.net", "media.fuio11-1.fna.whatsapp.net", "optimistic_upload", "work_manager_init", "lc", "catalog_message", "cond_net_medium", "enable_periodical_aud_rr_processing", "cond_range_ema_rtt", "media-tir2-1.cdn.whatsapp.net", "frame_ms", "group_invite_sending", "payments_web_enabled", "wallpapers_v2", "0d", "browser", "hq_image_max_edge", "image_edit_zoom", "linked_devices_re_auth_enabled", "media.faly3-2.fna.whatsapp.net", "media.fdoh5-3.fna.whatsapp.net", "media.fesb3-1.fna.whatsapp.net", "media.fknu1-1.fna.whatsapp.net", "media.fmex3-1.fna.whatsapp.net", "media.fruh4-3.fna.whatsapp.net", "255", "web_upgrade_to_md_modal", "audio_piggyback_timeout_msec", "enable_audio_oob_fec_feature", "from_ip", "image_max_edge", "message_qr_enabled", "powersave", "receipt_pre_acking", "video_max_edge", "full", "011", "012", "enable_audio_oob_fec_for_sender", "md_voip_enabled", "enable_privatestats", "max_fec_ratio", "payments_cs_faq_url", "media-xsp1-3.cdn.whatsapp.net", "hq_image_quality", "media.fasr1-2.fna.whatsapp.net", "media.fbog3-1.fna.whatsapp.net", "media.ffjr1-6.fna.whatsapp.net", "media.fist2-3.fna.whatsapp.net", "media.flim4-3.fna.whatsapp.net", "media.fpbc2-4.fna.whatsapp.net", "media.fpku1-1.fna.whatsapp.net", "media.frba1-1.fna.whatsapp.net", "media.fudi1-1.fna.whatsapp.net", "media.fvvi1-2.fna.whatsapp.net", "gcm_fg_service", "enable_dec_ltr_size_check", "clear", "lg", "media.fgru11-1.fna.whatsapp.net", "18", "media-lga3-2.cdn.whatsapp.net", "pkey", "0e", "max_subject", "cond_range_lterm_rtt", "announcement_groups", "biz_profile_options", "s_t", "media.fabv2-1.fna.whatsapp.net", "media.fcai3-1.fna.whatsapp.net", "media.fcgh1-1.fna.whatsapp.net", "media.fctg1-4.fna.whatsapp.net", "media.fdiy1-1.fna.whatsapp.net", "media.fisb4-1.fna.whatsapp.net", "media.fpku1-2.fna.whatsapp.net", "media.fros9-1.fna.whatsapp.net", "status_v3_text", "usync_sidelist", "17", "announcement", "...", "md_group_notification", "0f", "animated_pack_in_store", "013", "America/Mexico_City", "1260", "media-ams4-1.cdn.whatsapp.net", "media-cgk1-2.cdn.whatsapp.net", "media-cpt1-1.cdn.whatsapp.net", "media-maa2-1.cdn.whatsapp.net", "media.fgye10-1.fna.whatsapp.net", "e", "catalog_cart", "hfm_string_changes", "init_bitrate", "packless_hsm", "group_info", "America/Belem", "50", "960", "cond_range_bwe", "decode", "encode", "media.fada1-8.fna.whatsapp.net", "media.fadb1-2.fna.whatsapp.net", "media.fasu6-1.fna.whatsapp.net", "media.fbog4-1.fna.whatsapp.net", "media.fcgk9-2.fna.whatsapp.net", "media.fdoh5-2.fna.whatsapp.net", "media.ffjr1-2.fna.whatsapp.net", "media.fgua1-1.fna.whatsapp.net", "media.fgye1-1.fna.whatsapp.net", "media.fist1-4.fna.whatsapp.net", "media.fpbc2-2.fna.whatsapp.net", "media.fres2-1.fna.whatsapp.net", "media.fsdq1-2.fna.whatsapp.net", "media.fsub6-5.fna.whatsapp.net", "profilo_enabled", "template_hsm", "use_disorder_prefetching_timer", "video_codec_priority", "vpx_max_qp", "ptt_reduce_recording_delay", "25", "iphone", "Windows", "s_o", "Africa/Lagos", "abt", "media-kut2-1.cdn.whatsapp.net", "media-mba1-1.cdn.whatsapp.net", "media-mxp1-2.cdn.whatsapp.net", "md_blocklist_v2", "url_text", "enable_short_offset", "group_join_permissions", "enable_audio_piggyback_feature", "image_quality", "media.fcgk7-2.fna.whatsapp.net", "media.fcgk8-2.fna.whatsapp.net", "media.fclo7-1.fna.whatsapp.net", "media.fcmn1-1.fna.whatsapp.net", "media.feoh1-1.fna.whatsapp.net", "media.fgyd4-3.fna.whatsapp.net", "media.fjed4-4.fna.whatsapp.net", "media.flim1-4.fna.whatsapp.net", "media.flim2-4.fna.whatsapp.net", "media.fplu6-1.fna.whatsapp.net", "media.frak1-1.fna.whatsapp.net", "media.fsdq1-1.fna.whatsapp.net", "to_ip", "015", "vp8", "19", "21", "1320", "auth_key_ver", "message_processing_dedup", "server-error", "wap4_enabled", "420", "014", "cond_range_rtt", "ptt_fast_lock_enabled", "media-ort2-1.cdn.whatsapp.net", "fwd_ui_start_ts"},
+ {"contact_blacklist", "Asia/Jakarta", "media.fepa10-1.fna.whatsapp.net", "media.fmex10-3.fna.whatsapp.net", "disorder_prefetching_start_when_empty", "America/Bogota", "use_local_probing_rx_bitrate", "America/Argentina/Buenos_Aires", "cross_post", "media.fabb1-1.fna.whatsapp.net", "media.fbog4-2.fna.whatsapp.net", "media.fcgk9-1.fna.whatsapp.net", "media.fcmn2-1.fna.whatsapp.net", "media.fdel3-1.fna.whatsapp.net", "media.ffjr1-1.fna.whatsapp.net", "media.fgdl5-1.fna.whatsapp.net", "media.flpb1-2.fna.whatsapp.net", "media.fmex2-1.fna.whatsapp.net", "media.frba2-2.fna.whatsapp.net", "media.fros2-2.fna.whatsapp.net", "media.fruh2-1.fna.whatsapp.net", "media.fybz2-2.fna.whatsapp.net", "options", "20", "a", "017", "018", "mute_always", "user_notice", "Asia/Kolkata", "gif_provider", "locked", "media-gua1-1.cdn.whatsapp.net", "piggyback_exclude_force_flush", "24", "media.frec39-1.fna.whatsapp.net", "user_remove", "file_max_size", "cond_packet_loss_pct_ema_alpha", "media.facc1-1.fna.whatsapp.net", "media.fadb2-1.fna.whatsapp.net", "media.faly3-1.fna.whatsapp.net", "media.fbdo6-2.fna.whatsapp.net", "media.fcmn2-2.fna.whatsapp.net", "media.fctg1-3.fna.whatsapp.net", "media.ffez1-2.fna.whatsapp.net", "media.fist1-3.fna.whatsapp.net", "media.fist2-2.fna.whatsapp.net", "media.flim2-2.fna.whatsapp.net", "media.fmct2-3.fna.whatsapp.net", "media.fpei3-1.fna.whatsapp.net", "media.frba3-1.fna.whatsapp.net", "media.fsdu8-2.fna.whatsapp.net", "media.fstu2-1.fna.whatsapp.net", "media_type", "receipt_agg", "016", "enable_pli_for_crc_mismatch", "live", "enc_rekey", "frskmsg", "d", "media.fdel11-2.fna.whatsapp.net", "proto", "2250", "audio_piggyback_enable_cache", "skip_nack_if_ltrp_sent", "mark_dtx_jb_frames", "web_service_delay", "7282", "catalog_send_all", "outgoing", "360", "30", "LIMITED", "019", "audio_picker", "bpv2_phase", "media.fada1-7.fna.whatsapp.net", "media.faep7-1.fna.whatsapp.net", "media.fbko1-2.fna.whatsapp.net", "media.fbni1-2.fna.whatsapp.net", "media.fbtz1-1.fna.whatsapp.net", "media.fbtz1-8.fna.whatsapp.net", "media.fcjs3-1.fna.whatsapp.net", "media.fesb3-2.fna.whatsapp.net", "media.fgdl5-4.fna.whatsapp.net", "media.fist2-1.fna.whatsapp.net", "media.flhe2-2.fna.whatsapp.net", "media.flim2-1.fna.whatsapp.net", "media.fmex1-1.fna.whatsapp.net", "media.fpat3-2.fna.whatsapp.net", "media.fpat3-3.fna.whatsapp.net", "media.fros2-1.fna.whatsapp.net", "media.fsdu8-1.fna.whatsapp.net", "media.fsub3-2.fna.whatsapp.net", "payments_chat_plugin", "cond_congestion_no_rtcp_thr", "green_alert", "not-a-biz", "..", "shops_pdp_urls_config", "source", "media-dus1-1.cdn.whatsapp.net", "mute_video", "01b", "currency", "max_keys", "resume_check", "contact_array", "qr_scanning", "23", "b", "media.fbfh15-1.fna.whatsapp.net", "media.flim22-1.fna.whatsapp.net", "media.fsdu11-1.fna.whatsapp.net", "media.fsdu15-1.fna.whatsapp.net", "Chrome", "fts_version", "60", "media.fada1-6.fna.whatsapp.net", "media.faep4-2.fna.whatsapp.net", "media.fbaq5-1.fna.whatsapp.net", "media.fbni1-1.fna.whatsapp.net", "media.fcai3-2.fna.whatsapp.net", "media.fdel3-2.fna.whatsapp.net", "media.fdmm3-2.fna.whatsapp.net", "media.fhex3-1.fna.whatsapp.net", "media.fisb4-2.fna.whatsapp.net", "media.fkhi5-2.fna.whatsapp.net", "media.flos2-1.fna.whatsapp.net", "media.fmct2-1.fna.whatsapp.net", "media.fntr7-1.fna.whatsapp.net", "media.frak3-1.fna.whatsapp.net", "media.fruh5-2.fna.whatsapp.net", "media.fsub6-1.fna.whatsapp.net", "media.fuab1-2.fna.whatsapp.net", "media.fuio1-1.fna.whatsapp.net", "media.fver1-1.fna.whatsapp.net", "media.fymy1-1.fna.whatsapp.net", "product_catalog", "1380", "audio_oob_fec_max_pkts", "22", "254", "media-ort2-2.cdn.whatsapp.net", "media-sjc3-1.cdn.whatsapp.net", "1600", "01a", "01c", "405", "key_frame_interval", "body", "media.fcgh20-1.fna.whatsapp.net", "media.fesb10-2.fna.whatsapp.net", "125", "2000", "media.fbsb1-1.fna.whatsapp.net", "media.fcmn3-2.fna.whatsapp.net", "media.fcpq1-1.fna.whatsapp.net", "media.fdel1-2.fna.whatsapp.net", "media.ffor2-1.fna.whatsapp.net", "media.fgdl1-4.fna.whatsapp.net", "media.fhex2-1.fna.whatsapp.net", "media.fist1-2.fna.whatsapp.net", "media.fjed5-2.fna.whatsapp.net", "media.flim6-4.fna.whatsapp.net", "media.flos2-2.fna.whatsapp.net", "media.fntr6-2.fna.whatsapp.net", "media.fpku3-2.fna.whatsapp.net", "media.fros8-1.fna.whatsapp.net", "media.fymy1-2.fna.whatsapp.net", "ul_bw", "ltrp_qp_offset", "request", "nack", "dtx_delay_state_reset", "timeoffline", "28", "01f", "32", "enable_ltr_pool", "wa_msys_crypto", "01d", "58", "dtx_freeze_hg_update", "nack_if_rpsi_throttled", "253", "840", "media.famd15-1.fna.whatsapp.net", "media.fbog17-2.fna.whatsapp.net", "media.fcai19-2.fna.whatsapp.net", "media.fcai21-4.fna.whatsapp.net", "media.fesb10-4.fna.whatsapp.net", "media.fesb10-5.fna.whatsapp.net", "media.fmaa12-1.fna.whatsapp.net", "media.fmex11-3.fna.whatsapp.net", "media.fpoa33-1.fna.whatsapp.net", "1050", "021", "clean", "cond_range_ema_packet_loss_pct", "media.fadb6-5.fna.whatsapp.net", "media.faqp4-1.fna.whatsapp.net", "media.fbaq3-1.fna.whatsapp.net", "media.fbel2-1.fna.whatsapp.net", "media.fblr4-2.fna.whatsapp.net", "media.fclo8-1.fna.whatsapp.net", "media.fcoo1-2.fna.whatsapp.net", "media.ffjr1-4.fna.whatsapp.net", "media.ffor9-1.fna.whatsapp.net", "media.fisb3-1.fna.whatsapp.net", "media.fkhi2-2.fna.whatsapp.net", "media.fkhi4-1.fna.whatsapp.net", "media.fpbc1-2.fna.whatsapp.net", "media.fruh2-2.fna.whatsapp.net", "media.fruh5-1.fna.whatsapp.net", "media.fsub3-1.fna.whatsapp.net", "payments_transaction_limit", "252", "27", "29", "tintagel", "01e", "237", "780", "callee_updated_payload", "020", "257", "price", "025", "239", "payments_cs_phone_number", "mediaretry", "w:auth:backup:token", "Glass.caf", "max_bitrate", "240", "251", "660", "media.fbog16-1.fna.whatsapp.net", "media.fcgh21-1.fna.whatsapp.net", "media.fkul19-2.fna.whatsapp.net", "media.flim21-2.fna.whatsapp.net", "media.fmex10-4.fna.whatsapp.net", "64", "33", "34", "35", "interruption", "media.fabv3-1.fna.whatsapp.net", "media.fadb6-1.fna.whatsapp.net", "media.fagr1-1.fna.whatsapp.net", "media.famd1-1.fna.whatsapp.net", "media.famm6-1.fna.whatsapp.net", "media.faqp2-3.fna.whatsapp.net"},
+ }
+)
+
+type doubleByteTokenIndex struct {
+ dictionary byte
+ index byte
+}
+
+var mdSingleByteTokenIndex map[string]byte
+var mdDoubleByteTokenIndex map[string]doubleByteTokenIndex
+
+func init() {
+ mdSingleByteTokenIndex = make(map[string]byte, len(SingleByteTokens))
+ mdDoubleByteTokenIndex = make(map[string]doubleByteTokenIndex, 256*4)
+ for index, token := range SingleByteTokens {
+ if token != "" {
+ mdSingleByteTokenIndex[token] = byte(index)
+ }
+ }
+ for dictIndex, tokens := range DoubleByteTokens {
+ for index, token := range tokens {
+ mdDoubleByteTokenIndex[token] = doubleByteTokenIndex{byte(dictIndex), byte(index)}
+ }
+ }
+}
+
+// GetDoubleToken gets the string value of the double-byte token at the given index.
+func GetDoubleToken(index1, index2 int) (string, error) {
+ if index1 < 0 || index1 >= len(DoubleByteTokens) {
+ return "", fmt.Errorf("index out of double byte token bounds %d-%d", index1, index2)
+ } else if index2 < 0 || index2 >= len(DoubleByteTokens[index1]) {
+ return "", fmt.Errorf("index out of double byte token index %d bounds %d", index1, index2)
+ }
+
+ return DoubleByteTokens[index1][index2], nil
+}
+
+// IndexOfSingleToken gets the index of the single-byte token with the given string value.
+// If there's no token with the given value, the second return value will be false.
+func IndexOfSingleToken(token string) (val byte, ok bool) {
+ val, ok = mdSingleByteTokenIndex[token]
+ return
+}
+
+// IndexOfDoubleByteToken gets the index of the double-byte token with the given string value.
+// If there's no token with the given value, the third return value will be false.
+func IndexOfDoubleByteToken(token string) (byte, byte, bool) {
+ val, ok := mdDoubleByteTokenIndex[token]
+ return val.dictionary, val.index, ok
+}
+
+// Type tokens used in the binary XML representation.
+const (
+ ListEmpty = 0
+ Dictionary0 = 236
+ Dictionary1 = 237
+ Dictionary2 = 238
+ Dictionary3 = 239
+ ADJID = 247
+ List8 = 248
+ List16 = 249
+ JIDPair = 250
+ Hex8 = 251
+ Binary8 = 252
+ Binary20 = 253
+ Binary32 = 254
+ Nibble8 = 255
+)
+
+// Other constants
+const (
+ PackedMax = 127
+ SingleByteMax = 256
+)
diff --git a/vendor/go.mau.fi/whatsmeow/binary/unpack.go b/vendor/go.mau.fi/whatsmeow/binary/unpack.go
new file mode 100644
index 00000000..a4557c57
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/unpack.go
@@ -0,0 +1,31 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package binary
+
+import (
+ "bytes"
+ "compress/zlib"
+ "fmt"
+ "io"
+)
+
+// Unpack unpacks the given decrypted data from the WhatsApp web API.
+//
+// It checks the first byte to decide whether to uncompress the data with zlib or just return as-is
+// (without the first byte). There's currently no corresponding Pack function because Marshal
+// already returns the data with a leading zero (i.e. not compressed).
+func Unpack(data []byte) ([]byte, error) {
+ dataType, data := data[0], data[1:]
+ if 2&dataType > 0 {
+ if decompressor, err := zlib.NewReader(bytes.NewReader(data)); err != nil {
+ return nil, fmt.Errorf("failed to create zlib reader: %w", err)
+ } else if data, err = io.ReadAll(decompressor); err != nil {
+ return nil, err
+ }
+ }
+ return data, nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/binary/xml.go b/vendor/go.mau.fi/whatsmeow/binary/xml.go
new file mode 100644
index 00000000..0f411890
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/binary/xml.go
@@ -0,0 +1,108 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package binary
+
+import (
+ "encoding/hex"
+ "fmt"
+ "sort"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+)
+
+// Options to control how Node.XMLString behaves.
+var (
+ IndentXML = false
+ MaxBytesToPrintAsHex = 128
+)
+
+// XMLString converts the Node to its XML representation
+func (n *Node) XMLString() string {
+ content := n.contentString()
+ if len(content) == 0 {
+ return fmt.Sprintf("<%[1]s%[2]s/>", n.Tag, n.attributeString())
+ }
+ newline := "\n"
+ if len(content) == 1 || !IndentXML {
+ newline = ""
+ }
+ return fmt.Sprintf("<%[1]s%[2]s>%[4]s%[3]s%[4]s</%[1]s>", n.Tag, n.attributeString(), strings.Join(content, newline), newline)
+}
+
+func (n *Node) attributeString() string {
+ if len(n.Attrs) == 0 {
+ return ""
+ }
+ stringAttrs := make([]string, len(n.Attrs)+1)
+ i := 1
+ for key, value := range n.Attrs {
+ stringAttrs[i] = fmt.Sprintf(`%s="%v"`, key, value)
+ i++
+ }
+ sort.Strings(stringAttrs)
+ return strings.Join(stringAttrs, " ")
+}
+
+func printable(data []byte) string {
+ if !utf8.Valid(data) {
+ return ""
+ }
+ str := string(data)
+ for _, c := range str {
+ if !unicode.IsPrint(c) {
+ return ""
+ }
+ }
+ return str
+}
+
+func (n *Node) contentString() []string {
+ split := make([]string, 0)
+ switch content := n.Content.(type) {
+ case []Node:
+ for _, item := range content {
+ split = append(split, strings.Split(item.XMLString(), "\n")...)
+ }
+ case []byte:
+ if strContent := printable(content); len(strContent) > 0 {
+ if IndentXML {
+ split = append(split, strings.Split(string(content), "\n")...)
+ } else {
+ split = append(split, strings.ReplaceAll(string(content), "\n", "\\n"))
+ }
+ } else if len(content) > MaxBytesToPrintAsHex {
+ split = append(split, fmt.Sprintf("<!-- %d bytes -->", len(content)))
+ } else if !IndentXML {
+ split = append(split, hex.EncodeToString(content))
+ } else {
+ hexData := hex.EncodeToString(content)
+ for i := 0; i < len(hexData); i += 80 {
+ if len(hexData) < i+80 {
+ split = append(split, hexData[i:])
+ } else {
+ split = append(split, hexData[i:i+80])
+ }
+ }
+ }
+ case nil:
+ // don't append anything
+ default:
+ strContent := fmt.Sprintf("%s", content)
+ if IndentXML {
+ split = append(split, strings.Split(strContent, "\n")...)
+ } else {
+ split = append(split, strings.ReplaceAll(strContent, "\n", "\\n"))
+ }
+ }
+ if len(split) > 1 && IndentXML {
+ for i, line := range split {
+ split[i] = " " + line
+ }
+ }
+ return split
+}
diff --git a/vendor/go.mau.fi/whatsmeow/call.go b/vendor/go.mau.fi/whatsmeow/call.go
new file mode 100644
index 00000000..e48e791c
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/call.go
@@ -0,0 +1,73 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+func (cli *Client) handleCallEvent(node *waBinary.Node) {
+ go cli.sendAck(node)
+
+ if len(node.GetChildren()) != 1 {
+ cli.dispatchEvent(&events.UnknownCallEvent{Node: node})
+ return
+ }
+ ag := node.AttrGetter()
+ child := node.GetChildren()[0]
+ cag := child.AttrGetter()
+ basicMeta := types.BasicCallMeta{
+ From: ag.JID("from"),
+ Timestamp: time.Unix(ag.Int64("t"), 0),
+ CallCreator: cag.JID("call-creator"),
+ CallID: cag.String("call-id"),
+ }
+ switch child.Tag {
+ case "offer":
+ cli.dispatchEvent(&events.CallOffer{
+ BasicCallMeta: basicMeta,
+ CallRemoteMeta: types.CallRemoteMeta{
+ RemotePlatform: ag.String("platform"),
+ RemoteVersion: ag.String("version"),
+ },
+ Data: &child,
+ })
+ case "offer_notice":
+ cli.dispatchEvent(&events.CallOfferNotice{
+ BasicCallMeta: basicMeta,
+ Media: cag.String("media"),
+ Type: cag.String("type"),
+ Data: &child,
+ })
+ case "relaylatency":
+ cli.dispatchEvent(&events.CallRelayLatency{
+ BasicCallMeta: basicMeta,
+ Data: &child,
+ })
+ case "accept":
+ cli.dispatchEvent(&events.CallAccept{
+ BasicCallMeta: basicMeta,
+ CallRemoteMeta: types.CallRemoteMeta{
+ RemotePlatform: ag.String("platform"),
+ RemoteVersion: ag.String("version"),
+ },
+ Data: &child,
+ })
+ case "terminate":
+ cli.dispatchEvent(&events.CallTerminate{
+ BasicCallMeta: basicMeta,
+ Reason: cag.String("reason"),
+ Data: &child,
+ })
+ default:
+ cli.dispatchEvent(&events.UnknownCallEvent{Node: node})
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/client.go b/vendor/go.mau.fi/whatsmeow/client.go
new file mode 100644
index 00000000..52ed0773
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/client.go
@@ -0,0 +1,459 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package whatsmeow implements a client for interacting with the WhatsApp web multidevice API.
+package whatsmeow
+
+import (
+ "context"
+ "crypto/rand"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "runtime/debug"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "go.mau.fi/whatsmeow/appstate"
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/socket"
+ "go.mau.fi/whatsmeow/store"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+ "go.mau.fi/whatsmeow/util/keys"
+ waLog "go.mau.fi/whatsmeow/util/log"
+)
+
+// EventHandler is a function that can handle events from WhatsApp.
+type EventHandler func(evt interface{})
+type nodeHandler func(node *waBinary.Node)
+
+var nextHandlerID uint32
+
+type wrappedEventHandler struct {
+ fn EventHandler
+ id uint32
+}
+
+// Client contains everything necessary to connect to and interact with the WhatsApp web API.
+type Client struct {
+ Store *store.Device
+ Log waLog.Logger
+ recvLog waLog.Logger
+ sendLog waLog.Logger
+
+ socket *socket.NoiseSocket
+ socketLock sync.RWMutex
+
+ isLoggedIn uint32
+ expectedDisconnectVal uint32
+ EnableAutoReconnect bool
+ LastSuccessfulConnect time.Time
+ AutoReconnectErrors int
+
+ // EmitAppStateEventsOnFullSync can be set to true if you want to get app state events emitted
+ // even when re-syncing the whole state.
+ EmitAppStateEventsOnFullSync bool
+
+ appStateProc *appstate.Processor
+ appStateSyncLock sync.Mutex
+
+ uploadPreKeysLock sync.Mutex
+ lastPreKeyUpload time.Time
+
+ mediaConn *MediaConn
+ mediaConnLock sync.Mutex
+
+ responseWaiters map[string]chan<- *waBinary.Node
+ responseWaitersLock sync.Mutex
+
+ nodeHandlers map[string]nodeHandler
+ handlerQueue chan *waBinary.Node
+ eventHandlers []wrappedEventHandler
+ eventHandlersLock sync.RWMutex
+
+ messageRetries map[string]int
+ messageRetriesLock sync.Mutex
+
+ privacySettingsCache atomic.Value
+
+ groupParticipantsCache map[types.JID][]types.JID
+ groupParticipantsCacheLock sync.Mutex
+ userDevicesCache map[types.JID][]types.JID
+ userDevicesCacheLock sync.Mutex
+
+ recentMessagesMap map[recentMessageKey]*waProto.Message
+ recentMessagesList [recentMessagesSize]recentMessageKey
+ recentMessagesPtr int
+ recentMessagesLock sync.RWMutex
+ // GetMessageForRetry is used to find the source message for handling retry receipts
+ // when the message is not found in the recently sent message cache.
+ GetMessageForRetry func(to types.JID, id types.MessageID) *waProto.Message
+ // PreRetryCallback is called before a retry receipt is accepted.
+ // If it returns false, the accepting will be cancelled and the retry receipt will be ignored.
+ PreRetryCallback func(receipt *events.Receipt, retryCount int, msg *waProto.Message) bool
+
+ uniqueID string
+ idCounter uint32
+}
+
+// Size of buffer for the channel that all incoming XML nodes go through.
+// In general it shouldn't go past a few buffered messages, but the channel is big to be safe.
+const handlerQueueSize = 2048
+
+// NewClient initializes a new WhatsApp web client.
+//
+// The logger can be nil, it will default to a no-op logger.
+//
+// The device store must be set. A default SQL-backed implementation is available in the store/sqlstore package.
+// container, err := sqlstore.New("sqlite3", "file:yoursqlitefile.db?_foreign_keys=on", nil)
+// if err != nil {
+// panic(err)
+// }
+// // If you want multiple sessions, remember their JIDs and use .GetDevice(jid) or .GetAllDevices() instead.
+// deviceStore, err := container.GetFirstDevice()
+// if err != nil {
+// panic(err)
+// }
+// client := whatsmeow.NewClient(deviceStore, nil)
+func NewClient(deviceStore *store.Device, log waLog.Logger) *Client {
+ if log == nil {
+ log = waLog.Noop
+ }
+ randomBytes := make([]byte, 2)
+ _, _ = rand.Read(randomBytes)
+ cli := &Client{
+ Store: deviceStore,
+ Log: log,
+ recvLog: log.Sub("Recv"),
+ sendLog: log.Sub("Send"),
+ uniqueID: fmt.Sprintf("%d.%d-", randomBytes[0], randomBytes[1]),
+ responseWaiters: make(map[string]chan<- *waBinary.Node),
+ eventHandlers: make([]wrappedEventHandler, 0, 1),
+ messageRetries: make(map[string]int),
+ handlerQueue: make(chan *waBinary.Node, handlerQueueSize),
+ appStateProc: appstate.NewProcessor(deviceStore, log.Sub("AppState")),
+
+ groupParticipantsCache: make(map[types.JID][]types.JID),
+ userDevicesCache: make(map[types.JID][]types.JID),
+
+ recentMessagesMap: make(map[recentMessageKey]*waProto.Message, recentMessagesSize),
+ GetMessageForRetry: func(to types.JID, id types.MessageID) *waProto.Message { return nil },
+
+ EnableAutoReconnect: true,
+ }
+ cli.nodeHandlers = map[string]nodeHandler{
+ "message": cli.handleEncryptedMessage,
+ "receipt": cli.handleReceipt,
+ "call": cli.handleCallEvent,
+ "chatstate": cli.handleChatState,
+ "presence": cli.handlePresence,
+ "notification": cli.handleNotification,
+ "success": cli.handleConnectSuccess,
+ "failure": cli.handleConnectFailure,
+ "stream:error": cli.handleStreamError,
+ "iq": cli.handleIQ,
+ "ib": cli.handleIB,
+ }
+ return cli
+}
+
+// Connect connects the client to the WhatsApp web websocket. After connection, it will either
+// authenticate if there's data in the device store, or emit a QREvent to set up a new link.
+func (cli *Client) Connect() error {
+ cli.socketLock.Lock()
+ defer cli.socketLock.Unlock()
+ if cli.socket != nil {
+ if !cli.socket.IsConnected() {
+ cli.unlockedDisconnect()
+ } else {
+ return ErrAlreadyConnected
+ }
+ }
+
+ cli.resetExpectedDisconnect()
+ fs := socket.NewFrameSocket(cli.Log.Sub("Socket"), socket.WAConnHeader)
+ if err := fs.Connect(); err != nil {
+ fs.Close(0)
+ return err
+ } else if err = cli.doHandshake(fs, *keys.NewKeyPair()); err != nil {
+ fs.Close(0)
+ return fmt.Errorf("noise handshake failed: %w", err)
+ }
+ go cli.keepAliveLoop(cli.socket.Context())
+ go cli.handlerQueueLoop(cli.socket.Context())
+ return nil
+}
+
+// IsLoggedIn returns true after the client is successfully connected and authenticated on WhatsApp.
+func (cli *Client) IsLoggedIn() bool {
+ return atomic.LoadUint32(&cli.isLoggedIn) == 1
+}
+
+func (cli *Client) onDisconnect(ns *socket.NoiseSocket, remote bool) {
+ ns.Stop(false)
+ cli.socketLock.Lock()
+ defer cli.socketLock.Unlock()
+ if cli.socket == ns {
+ cli.socket = nil
+ cli.clearResponseWaiters()
+ if !cli.isExpectedDisconnect() && remote {
+ cli.Log.Debugf("Emitting Disconnected event")
+ go cli.dispatchEvent(&events.Disconnected{})
+ go cli.autoReconnect()
+ } else if remote {
+ cli.Log.Debugf("OnDisconnect() called, but it was expected, so not emitting event")
+ } else {
+ cli.Log.Debugf("OnDisconnect() called after manual disconnection")
+ }
+ } else {
+ cli.Log.Debugf("Ignoring OnDisconnect on different socket")
+ }
+}
+
+func (cli *Client) expectDisconnect() {
+ atomic.StoreUint32(&cli.expectedDisconnectVal, 1)
+}
+
+func (cli *Client) resetExpectedDisconnect() {
+ atomic.StoreUint32(&cli.expectedDisconnectVal, 0)
+}
+
+func (cli *Client) isExpectedDisconnect() bool {
+ return atomic.LoadUint32(&cli.expectedDisconnectVal) == 1
+}
+
+func (cli *Client) autoReconnect() {
+ if !cli.EnableAutoReconnect || cli.Store.ID == nil {
+ return
+ }
+ for {
+ cli.AutoReconnectErrors++
+ autoReconnectDelay := time.Duration(cli.AutoReconnectErrors) * 2 * time.Second
+ cli.Log.Debugf("Automatically reconnecting after %v", autoReconnectDelay)
+ time.Sleep(autoReconnectDelay)
+ err := cli.Connect()
+ if errors.Is(err, ErrAlreadyConnected) {
+ cli.Log.Debugf("Connect() said we're already connected after autoreconnect sleep")
+ return
+ } else if err != nil {
+ cli.Log.Errorf("Error reconnecting after autoreconnect sleep: %v", err)
+ } else {
+ return
+ }
+ }
+}
+
+// IsConnected checks if the client is connected to the WhatsApp web websocket.
+// Note that this doesn't check if the client is authenticated. See the IsLoggedIn field for that.
+func (cli *Client) IsConnected() bool {
+ cli.socketLock.RLock()
+ connected := cli.socket != nil && cli.socket.IsConnected()
+ cli.socketLock.RUnlock()
+ return connected
+}
+
+// Disconnect disconnects from the WhatsApp web websocket.
+func (cli *Client) Disconnect() {
+ if cli.socket == nil {
+ return
+ }
+ cli.socketLock.Lock()
+ cli.unlockedDisconnect()
+ cli.socketLock.Unlock()
+}
+
+// Disconnect closes the websocket connection.
+func (cli *Client) unlockedDisconnect() {
+ if cli.socket != nil {
+ cli.socket.Stop(true)
+ cli.socket = nil
+ }
+}
+
+// Logout sends a request to unlink the device, then disconnects from the websocket and deletes the local device store.
+//
+// If the logout request fails, the disconnection and local data deletion will not happen either.
+// If an error is returned, but you want to force disconnect/clear data, call Client.Disconnect() and Client.Store.Delete() manually.
+func (cli *Client) Logout() error {
+ if cli.Store.ID == nil {
+ return ErrNotLoggedIn
+ }
+ _, err := cli.sendIQ(infoQuery{
+ Namespace: "md",
+ Type: "set",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{
+ Tag: "remove-companion-device",
+ Attrs: waBinary.Attrs{
+ "jid": *cli.Store.ID,
+ "reason": "user_initiated",
+ },
+ }},
+ })
+ if err != nil {
+ return fmt.Errorf("error sending logout request: %w", err)
+ }
+ cli.Disconnect()
+ err = cli.Store.Delete()
+ if err != nil {
+ return fmt.Errorf("error deleting data from store: %w", err)
+ }
+ return nil
+}
+
+// AddEventHandler registers a new function to receive all events emitted by this client.
+//
+// The returned integer is the event handler ID, which can be passed to RemoveEventHandler to remove it.
+//
+// All registered event handlers will receive all events. You should use a type switch statement to
+// filter the events you want:
+// func myEventHandler(evt interface{}) {
+// switch v := evt.(type) {
+// case *events.Message:
+// fmt.Println("Received a message!")
+// case *events.Receipt:
+// fmt.Println("Received a receipt!")
+// }
+// }
+//
+// If you want to access the Client instance inside the event handler, the recommended way is to
+// wrap the whole handler in another struct:
+// type MyClient struct {
+// WAClient *whatsmeow.Client
+// eventHandlerID uint32
+// }
+//
+// func (mycli *MyClient) register() {
+// mycli.eventHandlerID = mycli.WAClient.AddEventHandler(mycli.myEventHandler)
+// }
+//
+// func (mycli *MyClient) myEventHandler(evt interface{}) {
+// // Handle event and access mycli.WAClient
+// }
+func (cli *Client) AddEventHandler(handler EventHandler) uint32 {
+ nextID := atomic.AddUint32(&nextHandlerID, 1)
+ cli.eventHandlersLock.Lock()
+ cli.eventHandlers = append(cli.eventHandlers, wrappedEventHandler{handler, nextID})
+ cli.eventHandlersLock.Unlock()
+ return nextID
+}
+
+// RemoveEventHandler removes a previously registered event handler function.
+// If the function with the given ID is found, this returns true.
+//
+// N.B. Do not run this directly from an event handler. That would cause a deadlock because the
+// event dispatcher holds a read lock on the event handler list, and this method wants a write lock
+// on the same list. Instead run it in a goroutine:
+// func (mycli *MyClient) myEventHandler(evt interface{}) {
+// if noLongerWantEvents {
+// go mycli.WAClient.RemoveEventHandler(mycli.eventHandlerID)
+// }
+// }
+func (cli *Client) RemoveEventHandler(id uint32) bool {
+ cli.eventHandlersLock.Lock()
+ defer cli.eventHandlersLock.Unlock()
+ for index := range cli.eventHandlers {
+ if cli.eventHandlers[index].id == id {
+ if index == 0 {
+ cli.eventHandlers[0].fn = nil
+ cli.eventHandlers = cli.eventHandlers[1:]
+ return true
+ } else if index < len(cli.eventHandlers)-1 {
+ copy(cli.eventHandlers[index:], cli.eventHandlers[index+1:])
+ }
+ cli.eventHandlers[len(cli.eventHandlers)-1].fn = nil
+ cli.eventHandlers = cli.eventHandlers[:len(cli.eventHandlers)-1]
+ return true
+ }
+ }
+ return false
+}
+
+// RemoveEventHandlers removes all event handlers that have been registered with AddEventHandler
+func (cli *Client) RemoveEventHandlers() {
+ cli.eventHandlersLock.Lock()
+ cli.eventHandlers = make([]wrappedEventHandler, 0, 1)
+ cli.eventHandlersLock.Unlock()
+}
+
+func (cli *Client) handleFrame(data []byte) {
+ decompressed, err := waBinary.Unpack(data)
+ if err != nil {
+ cli.Log.Warnf("Failed to decompress frame: %v", err)
+ cli.Log.Debugf("Errored frame hex: %s", hex.EncodeToString(data))
+ return
+ }
+ node, err := waBinary.Unmarshal(decompressed)
+ if err != nil {
+ cli.Log.Warnf("Failed to decode node in frame: %v", err)
+ cli.Log.Debugf("Errored frame hex: %s", hex.EncodeToString(decompressed))
+ return
+ }
+ cli.recvLog.Debugf("%s", node.XMLString())
+ if node.Tag == "xmlstreamend" {
+ if !cli.isExpectedDisconnect() {
+ cli.Log.Warnf("Received stream end frame")
+ }
+ // TODO should we do something else?
+ } else if cli.receiveResponse(node) {
+ // handled
+ } else if _, ok := cli.nodeHandlers[node.Tag]; ok {
+ select {
+ case cli.handlerQueue <- node:
+ default:
+ cli.Log.Warnf("Handler queue is full, message ordering is no longer guaranteed")
+ go func() {
+ cli.handlerQueue <- node
+ }()
+ }
+ } else {
+ cli.Log.Debugf("Didn't handle WhatsApp node %s", node.Tag)
+ }
+}
+
+func (cli *Client) handlerQueueLoop(ctx context.Context) {
+ for {
+ select {
+ case node := <-cli.handlerQueue:
+ cli.nodeHandlers[node.Tag](node)
+ case <-ctx.Done():
+ return
+ }
+ }
+}
+func (cli *Client) sendNode(node waBinary.Node) error {
+ cli.socketLock.RLock()
+ sock := cli.socket
+ cli.socketLock.RUnlock()
+ if sock == nil {
+ return ErrNotConnected
+ }
+
+ payload, err := waBinary.Marshal(node)
+ if err != nil {
+ return fmt.Errorf("failed to marshal node: %w", err)
+ }
+
+ cli.sendLog.Debugf("%s", node.XMLString())
+ return sock.SendFrame(payload)
+}
+
+func (cli *Client) dispatchEvent(evt interface{}) {
+ cli.eventHandlersLock.RLock()
+ defer func() {
+ cli.eventHandlersLock.RUnlock()
+ err := recover()
+ if err != nil {
+ cli.Log.Errorf("Event handler panicked while handling a %T: %v\n%s", evt, err, debug.Stack())
+ }
+ }()
+ for _, handler := range cli.eventHandlers {
+ handler.fn(evt)
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/connectionevents.go b/vendor/go.mau.fi/whatsmeow/connectionevents.go
new file mode 100644
index 00000000..c1a6e764
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/connectionevents.go
@@ -0,0 +1,141 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "sync/atomic"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+func (cli *Client) handleStreamError(node *waBinary.Node) {
+ atomic.StoreUint32(&cli.isLoggedIn, 0)
+ code, _ := node.Attrs["code"].(string)
+ conflict, _ := node.GetOptionalChildByTag("conflict")
+ conflictType := conflict.AttrGetter().OptionalString("type")
+ switch {
+ case code == "515":
+ cli.Log.Infof("Got 515 code, reconnecting...")
+ go func() {
+ cli.Disconnect()
+ err := cli.Connect()
+ if err != nil {
+ cli.Log.Errorf("Failed to reconnect after 515 code:", err)
+ }
+ }()
+ case code == "401" && conflictType == "device_removed":
+ cli.expectDisconnect()
+ cli.Log.Infof("Got device removed stream error, sending LoggedOut event and deleting session")
+ go cli.dispatchEvent(&events.LoggedOut{OnConnect: false})
+ err := cli.Store.Delete()
+ if err != nil {
+ cli.Log.Warnf("Failed to delete store after device_removed error: %v", err)
+ }
+ case conflictType == "replaced":
+ cli.expectDisconnect()
+ cli.Log.Infof("Got replaced stream error, sending StreamReplaced event")
+ go cli.dispatchEvent(&events.StreamReplaced{})
+ case code == "503":
+ // This seems to happen when the server wants to restart or something.
+ // The disconnection will be emitted as an events.Disconnected and then the auto-reconnect will do its thing.
+ cli.Log.Warnf("Got 503 stream error, assuming automatic reconnect will handle it")
+ default:
+ cli.Log.Errorf("Unknown stream error: %s", node.XMLString())
+ go cli.dispatchEvent(&events.StreamError{Code: code, Raw: node})
+ }
+}
+
+func (cli *Client) handleIB(node *waBinary.Node) {
+ children := node.GetChildren()
+ for _, child := range children {
+ ag := child.AttrGetter()
+ switch child.Tag {
+ case "downgrade_webclient":
+ go cli.dispatchEvent(&events.QRScannedWithoutMultidevice{})
+ case "offline_preview":
+ cli.dispatchEvent(&events.OfflineSyncPreview{
+ Total: ag.Int("count"),
+ AppDataChanges: ag.Int("appdata"),
+ Messages: ag.Int("message"),
+ Notifications: ag.Int("notification"),
+ Receipts: ag.Int("receipt"),
+ })
+ case "offline":
+ cli.dispatchEvent(&events.OfflineSyncCompleted{
+ Count: ag.Int("count"),
+ })
+ }
+ }
+}
+
+func (cli *Client) handleConnectFailure(node *waBinary.Node) {
+ ag := node.AttrGetter()
+ reason := ag.String("reason")
+ if reason == "401" {
+ cli.expectDisconnect()
+ cli.Log.Infof("Got 401 connect failure, sending LoggedOut event and deleting session")
+ go cli.dispatchEvent(&events.LoggedOut{OnConnect: true})
+ err := cli.Store.Delete()
+ if err != nil {
+ cli.Log.Warnf("Failed to delete store after 401 failure: %v", err)
+ }
+ } else {
+ cli.expectDisconnect()
+ cli.Log.Warnf("Unknown connect failure: %s", node.XMLString())
+ go cli.dispatchEvent(&events.ConnectFailure{Reason: reason, Raw: node})
+ }
+}
+
+func (cli *Client) handleConnectSuccess(node *waBinary.Node) {
+ cli.Log.Infof("Successfully authenticated")
+ cli.LastSuccessfulConnect = time.Now()
+ cli.AutoReconnectErrors = 0
+ atomic.StoreUint32(&cli.isLoggedIn, 1)
+ go func() {
+ if dbCount, err := cli.Store.PreKeys.UploadedPreKeyCount(); err != nil {
+ cli.Log.Errorf("Failed to get number of prekeys in database: %v", err)
+ } else if serverCount, err := cli.getServerPreKeyCount(); err != nil {
+ cli.Log.Warnf("Failed to get number of prekeys on server: %v", err)
+ } else {
+ cli.Log.Debugf("Database has %d prekeys, server says we have %d", dbCount, serverCount)
+ if serverCount < MinPreKeyCount || dbCount < MinPreKeyCount {
+ cli.uploadPreKeys()
+ sc, _ := cli.getServerPreKeyCount()
+ cli.Log.Debugf("Prekey count after upload: %d", sc)
+ }
+ }
+ err := cli.SetPassive(false)
+ if err != nil {
+ cli.Log.Warnf("Failed to send post-connect passive IQ: %v", err)
+ }
+ cli.dispatchEvent(&events.Connected{})
+ }()
+}
+
+// SetPassive tells the WhatsApp server whether this device is passive or not.
+//
+// This seems to mostly affect whether the device receives certain events.
+// By default, whatsmeow will automatically do SetPassive(false) after connecting.
+func (cli *Client) SetPassive(passive bool) error {
+ tag := "active"
+ if passive {
+ tag = "passive"
+ }
+ _, err := cli.sendIQ(infoQuery{
+ Namespace: "passive",
+ Type: "set",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{Tag: tag}},
+ })
+ if err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/download.go b/vendor/go.mau.fi/whatsmeow/download.go
new file mode 100644
index 00000000..502c4ee8
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/download.go
@@ -0,0 +1,213 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "net/http"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/util/cbcutil"
+ "go.mau.fi/whatsmeow/util/hkdfutil"
+)
+
+// MediaType represents a type of uploaded file on WhatsApp.
+// The value is the key which is used as a part of generating the encryption keys.
+type MediaType string
+
+// The known media types
+const (
+ MediaImage MediaType = "WhatsApp Image Keys"
+ MediaVideo MediaType = "WhatsApp Video Keys"
+ MediaAudio MediaType = "WhatsApp Audio Keys"
+ MediaDocument MediaType = "WhatsApp Document Keys"
+ MediaHistory MediaType = "WhatsApp History Keys"
+ MediaAppState MediaType = "WhatsApp App State Keys"
+)
+
+// DownloadableMessage represents a protobuf message that contains attachment info.
+type DownloadableMessage interface {
+ proto.Message
+ GetDirectPath() string
+ GetMediaKey() []byte
+ GetFileSha256() []byte
+ GetFileEncSha256() []byte
+}
+
+// All the message types that are intended to be downloadable
+var (
+ _ DownloadableMessage = (*waProto.ImageMessage)(nil)
+ _ DownloadableMessage = (*waProto.AudioMessage)(nil)
+ _ DownloadableMessage = (*waProto.VideoMessage)(nil)
+ _ DownloadableMessage = (*waProto.DocumentMessage)(nil)
+ _ DownloadableMessage = (*waProto.StickerMessage)(nil)
+ _ DownloadableMessage = (*waProto.HistorySyncNotification)(nil)
+ _ DownloadableMessage = (*waProto.ExternalBlobReference)(nil)
+)
+
+type downloadableMessageWithLength interface {
+ DownloadableMessage
+ GetFileLength() uint64
+}
+
+type downloadableMessageWithSizeBytes interface {
+ DownloadableMessage
+ GetFileSizeBytes() uint64
+}
+
+type downloadableMessageWithURL interface {
+ DownloadableMessage
+ GetUrl() string
+}
+
+var classToMediaType = map[protoreflect.Name]MediaType{
+ "ImageMessage": MediaImage,
+ "AudioMessage": MediaAudio,
+ "VideoMessage": MediaVideo,
+ "DocumentMessage": MediaDocument,
+ "StickerMessage": MediaImage,
+
+ "HistorySyncNotification": MediaHistory,
+ "ExternalBlobReference": MediaAppState,
+}
+
+var mediaTypeToMMSType = map[MediaType]string{
+ MediaImage: "image",
+ MediaAudio: "audio",
+ MediaVideo: "video",
+ MediaDocument: "document",
+ MediaHistory: "md-msg-hist",
+ MediaAppState: "md-app-state",
+}
+
+// DownloadAny loops through the downloadable parts of the given message and downloads the first non-nil item.
+func (cli *Client) DownloadAny(msg *waProto.Message) (data []byte, err error) {
+ downloadables := []DownloadableMessage{msg.GetImageMessage(), msg.GetAudioMessage(), msg.GetVideoMessage(), msg.GetDocumentMessage(), msg.GetStickerMessage()}
+ for _, downloadable := range downloadables {
+ if downloadable != nil {
+ return cli.Download(downloadable)
+ }
+ }
+ return nil, ErrNothingDownloadableFound
+}
+
+func getSize(msg DownloadableMessage) int {
+ switch sized := msg.(type) {
+ case downloadableMessageWithLength:
+ return int(sized.GetFileLength())
+ case downloadableMessageWithSizeBytes:
+ return int(sized.GetFileSizeBytes())
+ default:
+ return -1
+ }
+}
+
+// Download downloads the attachment from the given protobuf message.
+func (cli *Client) Download(msg DownloadableMessage) (data []byte, err error) {
+ mediaType, ok := classToMediaType[msg.ProtoReflect().Descriptor().Name()]
+ if !ok {
+ return nil, fmt.Errorf("%w '%s'", ErrUnknownMediaType, string(msg.ProtoReflect().Descriptor().Name()))
+ }
+ urlable, ok := msg.(downloadableMessageWithURL)
+ if ok && len(urlable.GetUrl()) > 0 {
+ return downloadAndDecrypt(urlable.GetUrl(), 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])
+ } else {
+ return nil, ErrNoURLPresent
+ }
+}
+
+func (cli *Client) downloadMediaWithPath(directPath string, encFileHash, fileHash, mediaKey []byte, fileLength int, mediaType MediaType, mmsType string) (data []byte, err error) {
+ err = cli.refreshMediaConn(false)
+ if err != nil {
+ return nil, fmt.Errorf("failed to refresh media connections: %w", err)
+ }
+ for i, host := range cli.mediaConn.Hosts {
+ mediaURL := fmt.Sprintf("https://%s%s&hash=%s&mms-type=%s&__wa-mms=", host.Hostname, directPath, base64.URLEncoding.EncodeToString(encFileHash), mmsType)
+ data, err = downloadAndDecrypt(mediaURL, mediaKey, mediaType, fileLength, encFileHash, fileHash)
+ // TODO there are probably some errors that shouldn't retry
+ if err != nil {
+ if i >= len(cli.mediaConn.Hosts)-1 {
+ return nil, fmt.Errorf("failed to download media from last host: %w", err)
+ }
+ cli.Log.Warnf("Failed to download media: %s, trying with next host...", err)
+ }
+ }
+ return
+}
+
+func 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 = downloadEncryptedMedia(url, fileEncSha256); err != nil {
+
+ } else if err = validateMedia(iv, ciphertext, macKey, mac); err != nil {
+
+ } else if data, err = cbcutil.Decrypt(cipherKey, iv, ciphertext); err != nil {
+ 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) {
+ err = ErrInvalidMediaSHA256
+ }
+ return
+}
+
+func getMediaKeys(mediaKey []byte, appInfo MediaType) (iv, cipherKey, macKey, refKey []byte) {
+ mediaKeyExpanded := hkdfutil.SHA256(mediaKey, nil, []byte(appInfo), 112)
+ return mediaKeyExpanded[:16], mediaKeyExpanded[16:48], mediaKeyExpanded[48:80], mediaKeyExpanded[80:]
+}
+
+func downloadEncryptedMedia(url string, checksum []byte) (file, mac []byte, err error) {
+ var resp *http.Response
+ resp, err = http.Get(url)
+ if err != nil {
+ return
+ }
+ defer resp.Body.Close()
+ if resp.StatusCode != http.StatusOK {
+ if resp.StatusCode == http.StatusNotFound {
+ err = ErrMediaDownloadFailedWith404
+ } else if resp.StatusCode == http.StatusGone {
+ err = ErrMediaDownloadFailedWith410
+ } else {
+ err = fmt.Errorf("download failed with status code %d", resp.StatusCode)
+ }
+ return
+ }
+ var data []byte
+ data, err = io.ReadAll(resp.Body)
+ if err != nil {
+ return
+ } else if len(data) <= 10 {
+ err = ErrTooShortFile
+ return
+ }
+ file, mac = data[:len(data)-10], data[len(data)-10:]
+ if len(checksum) == 32 && sha256.Sum256(data) != *(*[32]byte)(checksum) {
+ err = ErrInvalidMediaEncSHA256
+ }
+ return
+}
+
+func validateMedia(iv, file, macKey, mac []byte) error {
+ h := hmac.New(sha256.New, macKey)
+ h.Write(iv)
+ h.Write(file)
+ if !hmac.Equal(h.Sum(nil)[:10], mac) {
+ return ErrInvalidMediaHMAC
+ }
+ return nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/errors.go b/vendor/go.mau.fi/whatsmeow/errors.go
new file mode 100644
index 00000000..584aa76f
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/errors.go
@@ -0,0 +1,157 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "errors"
+ "fmt"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+)
+
+// Miscellaneous errors
+var (
+ ErrNoSession = errors.New("can't encrypt message for device: no signal session established")
+ ErrIQTimedOut = errors.New("info query timed out")
+ ErrIQDisconnected = errors.New("websocket disconnected before info query returned response")
+ ErrNotConnected = errors.New("websocket not connected")
+ ErrNotLoggedIn = errors.New("the store doesn't contain a device JID")
+
+ ErrAlreadyConnected = errors.New("websocket is already connected")
+
+ ErrQRAlreadyConnected = errors.New("GetQRChannel must be called before connecting")
+ ErrQRStoreContainsID = errors.New("GetQRChannel can only be called when there's no user ID in the client's Store")
+
+ ErrNoPushName = errors.New("can't send presence without PushName set")
+)
+
+var (
+ // ErrProfilePictureUnauthorized is returned by GetProfilePictureInfo when trying to get the profile picture of a user
+ // whose privacy settings prevent you from seeing their profile picture (status code 401).
+ ErrProfilePictureUnauthorized = errors.New("the user has hidden their profile picture from you")
+ // ErrGroupInviteLinkUnauthorized is returned by GetGroupInviteLink if you don't have the permission to get the link (status code 401).
+ ErrGroupInviteLinkUnauthorized = errors.New("you don't have the permission to get the group's invite link")
+ // ErrNotInGroup is returned by group info getting methods if you're not in the group (status code 403).
+ ErrNotInGroup = errors.New("you're not participating in that group")
+ // ErrGroupNotFound is returned by group info getting methods if the group doesn't exist (status code 404).
+ ErrGroupNotFound = errors.New("that group does not exist")
+ // ErrInviteLinkInvalid is returned by methods that use group invite links if the invite link is malformed.
+ ErrInviteLinkInvalid = errors.New("that group invite link is not valid")
+ // ErrInviteLinkRevoked is returned by methods that use group invite links if the invite link was valid, but has been revoked and can no longer be used.
+ ErrInviteLinkRevoked = errors.New("that group invite link has been revoked")
+ // ErrBusinessMessageLinkNotFound is returned by ResolveBusinessMessageLink if the link doesn't exist or has been revoked.
+ ErrBusinessMessageLinkNotFound = errors.New("that business message link does not exist or has been revoked")
+)
+
+// Some errors that Client.SendMessage can return
+var (
+ ErrBroadcastListUnsupported = errors.New("sending to broadcast lists is not yet supported")
+ ErrUnknownServer = errors.New("can't send message to unknown server")
+ ErrRecipientADJID = errors.New("message recipient must be normal (non-AD) JID")
+ ErrSendDisconnected = errors.New("websocket disconnected before message send returned response")
+)
+
+// Some errors that Client.Download can return
+var (
+ ErrMediaDownloadFailedWith404 = errors.New("download failed with status code 404")
+ ErrMediaDownloadFailedWith410 = errors.New("download failed with status code 410")
+ ErrNoURLPresent = errors.New("no url present")
+ ErrFileLengthMismatch = errors.New("file length does not match")
+ ErrTooShortFile = errors.New("file too short")
+ ErrInvalidMediaHMAC = errors.New("invalid media hmac")
+ ErrInvalidMediaEncSHA256 = errors.New("hash of media ciphertext doesn't match")
+ ErrInvalidMediaSHA256 = errors.New("hash of media plaintext doesn't match")
+ ErrUnknownMediaType = errors.New("unknown media type")
+ ErrNothingDownloadableFound = errors.New("didn't find any attachments in message")
+)
+
+type wrappedIQError struct {
+ HumanError error
+ IQError error
+}
+
+func (err *wrappedIQError) Error() string {
+ return err.HumanError.Error()
+}
+
+func (err *wrappedIQError) Is(other error) bool {
+ return errors.Is(other, err.HumanError)
+}
+
+func (err *wrappedIQError) Unwrap() error {
+ return err.IQError
+}
+
+func wrapIQError(human, iq error) error {
+ return &wrappedIQError{human, iq}
+}
+
+// IQError is a generic error container for info queries
+type IQError struct {
+ Code int
+ Text string
+ ErrorNode *waBinary.Node
+ RawNode *waBinary.Node
+}
+
+// Common errors returned by info queries for use with errors.Is
+var (
+ ErrIQNotAuthorized error = &IQError{Code: 401, Text: "not-authorized"}
+ ErrIQForbidden error = &IQError{Code: 403, Text: "forbidden"}
+ ErrIQNotFound error = &IQError{Code: 404, Text: "item-not-found"}
+ ErrIQNotAcceptable error = &IQError{Code: 406, Text: "not-acceptable"}
+ ErrIQGone error = &IQError{Code: 410, Text: "gone"}
+)
+
+func parseIQError(node *waBinary.Node) error {
+ var err IQError
+ err.RawNode = node
+ val, ok := node.GetOptionalChildByTag("error")
+ if ok {
+ err.ErrorNode = &val
+ ag := val.AttrGetter()
+ err.Code = ag.OptionalInt("code")
+ err.Text = ag.OptionalString("text")
+ }
+ return &err
+}
+
+func (iqe *IQError) Error() string {
+ if iqe.Code == 0 {
+ if iqe.ErrorNode != nil {
+ return fmt.Sprintf("info query returned unknown error: %s", iqe.ErrorNode.XMLString())
+ } else if iqe.RawNode != nil {
+ return fmt.Sprintf("info query returned unexpected response: %s", iqe.RawNode.XMLString())
+ } else {
+ return "unknown info query error"
+ }
+ }
+ return fmt.Sprintf("info query returned status %d: %s", iqe.Code, iqe.Text)
+}
+
+func (iqe *IQError) Is(other error) bool {
+ otherIQE, ok := other.(*IQError)
+ if !ok {
+ return false
+ } else if iqe.Code != 0 && otherIQE.Code != 0 {
+ return otherIQE.Code == iqe.Code && otherIQE.Text == iqe.Text
+ } else if iqe.ErrorNode != nil && otherIQE.ErrorNode != nil {
+ return iqe.ErrorNode.XMLString() == otherIQE.ErrorNode.XMLString()
+ } else {
+ return false
+ }
+}
+
+// ElementMissingError is returned by various functions that parse XML elements when a required element is missing.
+type ElementMissingError struct {
+ Tag string
+ In string
+}
+
+func (eme *ElementMissingError) Error() string {
+ return fmt.Sprintf("missing <%s> element in %s", eme.Tag, eme.In)
+}
diff --git a/vendor/go.mau.fi/whatsmeow/group.go b/vendor/go.mau.fi/whatsmeow/group.go
new file mode 100644
index 00000000..947b11b4
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/group.go
@@ -0,0 +1,566 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+const InviteLinkPrefix = "https://chat.whatsapp.com/"
+
+func (cli *Client) sendGroupIQ(iqType infoQueryType, jid types.JID, content waBinary.Node) (*waBinary.Node, error) {
+ return cli.sendIQ(infoQuery{
+ Namespace: "w:g2",
+ Type: iqType,
+ To: jid,
+ Content: []waBinary.Node{content},
+ })
+}
+
+// CreateGroup creates a group on WhatsApp with the given name and participants.
+//
+// You don't need to include your own JID in the participants array, the WhatsApp servers will add it implicitly.
+func (cli *Client) CreateGroup(name string, participants []types.JID) (*types.GroupInfo, error) {
+ participantNodes := make([]waBinary.Node, len(participants))
+ for i, participant := range participants {
+ participantNodes[i] = waBinary.Node{
+ Tag: "participant",
+ Attrs: waBinary.Attrs{"jid": participant},
+ }
+ }
+ key := GenerateMessageID()
+ resp, err := cli.sendGroupIQ(iqSet, types.GroupServerJID, waBinary.Node{
+ Tag: "create",
+ Attrs: waBinary.Attrs{
+ "subject": name,
+ "key": key,
+ },
+ Content: participantNodes,
+ })
+ if err != nil {
+ return nil, err
+ }
+ groupNode, ok := resp.GetOptionalChildByTag("group")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "group", In: "response to create group query"}
+ }
+ return cli.parseGroupNode(&groupNode)
+}
+
+// LeaveGroup leaves the specified group on WhatsApp.
+func (cli *Client) LeaveGroup(jid types.JID) error {
+ _, err := cli.sendGroupIQ(iqSet, types.GroupServerJID, waBinary.Node{
+ Tag: "leave",
+ Content: []waBinary.Node{{
+ Tag: "group",
+ Attrs: waBinary.Attrs{"id": jid},
+ }},
+ })
+ return err
+}
+
+type ParticipantChange string
+
+const (
+ ParticipantChangeAdd ParticipantChange = "add"
+ ParticipantChangeRemove ParticipantChange = "remove"
+ ParticipantChangePromote ParticipantChange = "promote"
+ ParticipantChangeDemote ParticipantChange = "demote"
+)
+
+// UpdateGroupParticipants can be used to add, remove, promote and demote members in a WhatsApp group.
+func (cli *Client) UpdateGroupParticipants(jid types.JID, participantChanges map[types.JID]ParticipantChange) (*waBinary.Node, error) {
+ content := make([]waBinary.Node, len(participantChanges))
+ i := 0
+ for participantJID, change := range participantChanges {
+ content[i] = waBinary.Node{
+ Tag: string(change),
+ Content: []waBinary.Node{{
+ Tag: "participant",
+ Attrs: waBinary.Attrs{"jid": participantJID},
+ }},
+ }
+ i++
+ }
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "w:g2",
+ Type: iqSet,
+ To: jid,
+ Content: content,
+ })
+ if err != nil {
+ return nil, err
+ }
+ // TODO proper return value?
+ return resp, nil
+}
+
+// SetGroupName updates the name (subject) of the given group on WhatsApp.
+func (cli *Client) SetGroupName(jid types.JID, name string) error {
+ _, err := cli.sendGroupIQ(iqSet, jid, waBinary.Node{
+ Tag: "subject",
+ Content: []byte(name),
+ })
+ return err
+}
+
+// SetGroupTopic updates the topic (description) of the given group on WhatsApp.
+//
+// The previousID and newID fields are optional. If the previous ID is not specified, this will
+// automatically fetch the current group info to find the previous topic ID. If the new ID is not
+// specified, one will be generated with GenerateMessageID().
+func (cli *Client) SetGroupTopic(jid types.JID, previousID, newID, topic string) error {
+ if previousID == "" {
+ oldInfo, err := cli.GetGroupInfo(jid)
+ if err != nil {
+ return fmt.Errorf("failed to get old group info to update topic: %v", err)
+ }
+ previousID = oldInfo.TopicID
+ }
+ if newID == "" {
+ newID = GenerateMessageID()
+ }
+ _, err := cli.sendGroupIQ(iqSet, jid, waBinary.Node{
+ Tag: "description",
+ Attrs: waBinary.Attrs{
+ "prev": previousID,
+ "id": newID,
+ },
+ Content: []waBinary.Node{{
+ Tag: "body",
+ Content: []byte(topic),
+ }},
+ })
+ return err
+}
+
+// SetGroupLocked changes whether the group is locked (i.e. whether only admins can modify group info).
+func (cli *Client) SetGroupLocked(jid types.JID, locked bool) error {
+ tag := "locked"
+ if !locked {
+ tag = "unlocked"
+ }
+ _, err := cli.sendGroupIQ(iqSet, jid, waBinary.Node{Tag: tag})
+ return err
+}
+
+// SetGroupAnnounce changes whether the group is in announce mode (i.e. whether only admins can send messages).
+func (cli *Client) SetGroupAnnounce(jid types.JID, announce bool) error {
+ tag := "announcement"
+ if !announce {
+ tag = "not_announcement"
+ }
+ _, err := cli.sendGroupIQ(iqSet, jid, waBinary.Node{Tag: tag})
+ return err
+}
+
+// GetGroupInviteLink requests the invite link to the group from the WhatsApp servers.
+//
+// If reset is true, then the old invite link will be revoked and a new one generated.
+func (cli *Client) GetGroupInviteLink(jid types.JID, reset bool) (string, error) {
+ iqType := iqGet
+ if reset {
+ iqType = iqSet
+ }
+ resp, err := cli.sendGroupIQ(iqType, jid, waBinary.Node{Tag: "invite"})
+ if errors.Is(err, ErrIQNotAuthorized) {
+ return "", wrapIQError(ErrGroupInviteLinkUnauthorized, err)
+ } else if errors.Is(err, ErrIQNotFound) {
+ return "", wrapIQError(ErrGroupNotFound, err)
+ } else if errors.Is(err, ErrIQForbidden) {
+ return "", wrapIQError(ErrNotInGroup, err)
+ } else if err != nil {
+ return "", err
+ }
+ code, ok := resp.GetChildByTag("invite").Attrs["code"].(string)
+ if !ok {
+ return "", fmt.Errorf("didn't find invite code in response")
+ }
+ return InviteLinkPrefix + code, nil
+}
+
+// GetGroupInfoFromInvite gets the group info from an invite message.
+//
+// Note that this is specifically for invite messages, not invite links. Use GetGroupInfoFromLink for resolving chat.whatsapp.com links.
+func (cli *Client) GetGroupInfoFromInvite(jid, inviter types.JID, code string, expiration int64) (*types.GroupInfo, error) {
+ resp, err := cli.sendGroupIQ(iqGet, jid, waBinary.Node{
+ Tag: "query",
+ Content: []waBinary.Node{{
+ Tag: "add_request",
+ Attrs: waBinary.Attrs{
+ "code": code,
+ "expiration": expiration,
+ "admin": inviter,
+ },
+ }},
+ })
+ if err != nil {
+ return nil, err
+ }
+ groupNode, ok := resp.GetOptionalChildByTag("group")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "group", In: "response to invite group info query"}
+ }
+ return cli.parseGroupNode(&groupNode)
+}
+
+// JoinGroupWithInvite joins a group using an invite message.
+//
+// Note that this is specifically for invite messages, not invite links. Use JoinGroupWithLink for joining with chat.whatsapp.com links.
+func (cli *Client) JoinGroupWithInvite(jid, inviter types.JID, code string, expiration int64) error {
+ _, err := cli.sendGroupIQ(iqSet, jid, waBinary.Node{
+ Tag: "accept",
+ Attrs: waBinary.Attrs{
+ "code": code,
+ "expiration": expiration,
+ "admin": inviter,
+ },
+ })
+ return err
+}
+
+// GetGroupInfoFromLink resolves the given invite link and asks the WhatsApp servers for info about the group.
+// This will not cause the user to join the group.
+func (cli *Client) GetGroupInfoFromLink(code string) (*types.GroupInfo, error) {
+ code = strings.TrimPrefix(code, InviteLinkPrefix)
+ resp, err := cli.sendGroupIQ(iqGet, types.GroupServerJID, waBinary.Node{
+ Tag: "invite",
+ Attrs: waBinary.Attrs{"code": code},
+ })
+ if errors.Is(err, ErrIQGone) {
+ return nil, wrapIQError(ErrInviteLinkRevoked, err)
+ } else if errors.Is(err, ErrIQNotAcceptable) {
+ return nil, wrapIQError(ErrInviteLinkInvalid, err)
+ } else if err != nil {
+ return nil, err
+ }
+ groupNode, ok := resp.GetOptionalChildByTag("group")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "group", In: "response to group link info query"}
+ }
+ return cli.parseGroupNode(&groupNode)
+}
+
+// JoinGroupWithLink joins the group using the given invite link.
+func (cli *Client) JoinGroupWithLink(code string) (types.JID, error) {
+ code = strings.TrimPrefix(code, InviteLinkPrefix)
+ resp, err := cli.sendGroupIQ(iqSet, types.GroupServerJID, waBinary.Node{
+ Tag: "invite",
+ Attrs: waBinary.Attrs{"code": code},
+ })
+ if errors.Is(err, ErrIQGone) {
+ return types.EmptyJID, wrapIQError(ErrInviteLinkRevoked, err)
+ } else if errors.Is(err, ErrIQNotAcceptable) {
+ return types.EmptyJID, wrapIQError(ErrInviteLinkInvalid, err)
+ } else if err != nil {
+ return types.EmptyJID, err
+ }
+ groupNode, ok := resp.GetOptionalChildByTag("group")
+ if !ok {
+ return types.EmptyJID, &ElementMissingError{Tag: "group", In: "response to group link join query"}
+ }
+ return groupNode.AttrGetter().JID("jid"), nil
+}
+
+// GetJoinedGroups returns the list of groups the user is participating in.
+func (cli *Client) GetJoinedGroups() ([]*types.GroupInfo, error) {
+ resp, err := cli.sendGroupIQ(iqGet, types.GroupServerJID, waBinary.Node{
+ Tag: "participating",
+ Content: []waBinary.Node{
+ {Tag: "participants"},
+ {Tag: "description"},
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+ groups, ok := resp.GetOptionalChildByTag("groups")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "groups", In: "response to group list query"}
+ }
+ children := groups.GetChildren()
+ infos := make([]*types.GroupInfo, 0, len(children))
+ for _, child := range children {
+ if child.Tag != "group" {
+ cli.Log.Debugf("Unexpected child in group list response: %s", child.XMLString())
+ continue
+ }
+ parsed, parseErr := cli.parseGroupNode(&child)
+ if parseErr != nil {
+ cli.Log.Warnf("Error parsing group %s: %v", parsed.JID, parseErr)
+ }
+ infos = append(infos, parsed)
+ }
+ return infos, nil
+}
+
+// GetGroupInfo requests basic info about a group chat from the WhatsApp servers.
+func (cli *Client) GetGroupInfo(jid types.JID) (*types.GroupInfo, error) {
+ return cli.getGroupInfo(jid, true)
+}
+
+func (cli *Client) getGroupInfo(jid types.JID, lockParticipantCache bool) (*types.GroupInfo, error) {
+ res, err := cli.sendGroupIQ(iqGet, jid, waBinary.Node{
+ Tag: "query",
+ Attrs: waBinary.Attrs{"request": "interactive"},
+ })
+ if errors.Is(err, ErrIQNotFound) {
+ return nil, wrapIQError(ErrGroupNotFound, err)
+ } else if errors.Is(err, ErrIQForbidden) {
+ return nil, wrapIQError(ErrNotInGroup, err)
+ } else if err != nil {
+ return nil, err
+ }
+
+ groupNode, ok := res.GetOptionalChildByTag("group")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "groups", In: "response to group info query"}
+ }
+ groupInfo, err := cli.parseGroupNode(&groupNode)
+ if err != nil {
+ return groupInfo, err
+ }
+ if lockParticipantCache {
+ cli.groupParticipantsCacheLock.Lock()
+ defer cli.groupParticipantsCacheLock.Unlock()
+ }
+ participants := make([]types.JID, len(groupInfo.Participants))
+ for i, part := range groupInfo.Participants {
+ participants[i] = part.JID
+ }
+ cli.groupParticipantsCache[jid] = participants
+ return groupInfo, nil
+}
+
+func (cli *Client) getGroupMembers(jid types.JID) ([]types.JID, error) {
+ cli.groupParticipantsCacheLock.Lock()
+ defer cli.groupParticipantsCacheLock.Unlock()
+ if _, ok := cli.groupParticipantsCache[jid]; !ok {
+ _, err := cli.getGroupInfo(jid, false)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return cli.groupParticipantsCache[jid], nil
+}
+
+func (cli *Client) parseGroupNode(groupNode *waBinary.Node) (*types.GroupInfo, error) {
+ var group types.GroupInfo
+ ag := groupNode.AttrGetter()
+
+ group.JID = types.NewJID(ag.String("id"), types.GroupServer)
+ group.OwnerJID = ag.OptionalJIDOrEmpty("creator")
+
+ group.Name = ag.String("subject")
+ group.NameSetAt = time.Unix(ag.Int64("s_t"), 0)
+ group.NameSetBy = ag.OptionalJIDOrEmpty("s_o")
+
+ group.GroupCreated = time.Unix(ag.Int64("creation"), 0)
+
+ group.AnnounceVersionID = ag.OptionalString("a_v_id")
+ group.ParticipantVersionID = ag.OptionalString("p_v_id")
+
+ for _, child := range groupNode.GetChildren() {
+ childAG := child.AttrGetter()
+ switch child.Tag {
+ case "participant":
+ pcpType := childAG.OptionalString("type")
+ participant := types.GroupParticipant{
+ IsAdmin: pcpType == "admin" || pcpType == "superadmin",
+ IsSuperAdmin: pcpType == "superadmin",
+ JID: childAG.JID("jid"),
+ }
+ group.Participants = append(group.Participants, participant)
+ case "description":
+ body, bodyOK := child.GetOptionalChildByTag("body")
+ if bodyOK {
+ group.Topic, _ = body.Content.(string)
+ group.TopicID = childAG.String("id")
+ group.TopicSetBy = childAG.OptionalJIDOrEmpty("participant")
+ group.TopicSetAt = time.Unix(childAG.Int64("t"), 0)
+ }
+ case "announcement":
+ group.IsAnnounce = true
+ case "locked":
+ group.IsLocked = true
+ case "ephemeral":
+ group.IsEphemeral = true
+ group.DisappearingTimer = uint32(childAG.Uint64("expiration"))
+ default:
+ cli.Log.Debugf("Unknown element in group node %s: %s", group.JID.String(), child.XMLString())
+ }
+ if !childAG.OK() {
+ cli.Log.Warnf("Possibly failed to parse %s element in group node: %+v", child.Tag, childAG.Errors)
+ }
+ }
+
+ return &group, ag.Error()
+}
+
+func parseParticipantList(node *waBinary.Node) (participants []types.JID) {
+ children := node.GetChildren()
+ participants = make([]types.JID, 0, len(children))
+ for _, child := range children {
+ jid, ok := child.Attrs["jid"].(types.JID)
+ if child.Tag != "participant" || !ok {
+ continue
+ }
+ participants = append(participants, jid)
+ }
+ return
+}
+
+func (cli *Client) parseGroupCreate(node *waBinary.Node) (*events.JoinedGroup, error) {
+ groupNode, ok := node.GetOptionalChildByTag("group")
+ if !ok {
+ return nil, fmt.Errorf("group create notification didn't contain group info")
+ }
+ var evt events.JoinedGroup
+ evt.Reason = node.AttrGetter().OptionalString("reason")
+ info, err := cli.parseGroupNode(&groupNode)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse group info in create notification: %w", err)
+ }
+ evt.GroupInfo = *info
+ return &evt, nil
+}
+
+func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, error) {
+ var evt events.GroupInfo
+ ag := node.AttrGetter()
+ evt.JID = ag.JID("from")
+ evt.Notify = ag.OptionalString("notify")
+ evt.Sender = ag.OptionalJID("participant")
+ evt.Timestamp = time.Unix(ag.Int64("t"), 0)
+ if !ag.OK() {
+ return nil, fmt.Errorf("group change doesn't contain required attributes: %w", ag.Error())
+ }
+
+ for _, child := range node.GetChildren() {
+ cag := child.AttrGetter()
+ if child.Tag == "add" || child.Tag == "remove" || child.Tag == "promote" || child.Tag == "demote" {
+ evt.PrevParticipantVersionID = cag.String("prev_v_id")
+ evt.ParticipantVersionID = cag.String("v_id")
+ }
+ switch child.Tag {
+ case "add":
+ evt.JoinReason = cag.OptionalString("reason")
+ evt.Join = parseParticipantList(&child)
+ case "remove":
+ evt.Leave = parseParticipantList(&child)
+ case "promote":
+ evt.Promote = parseParticipantList(&child)
+ case "demote":
+ evt.Demote = parseParticipantList(&child)
+ case "locked":
+ evt.Locked = &types.GroupLocked{IsLocked: true}
+ case "unlocked":
+ evt.Locked = &types.GroupLocked{IsLocked: false}
+ case "subject":
+ evt.Name = &types.GroupName{
+ Name: cag.String("subject"),
+ NameSetAt: time.Unix(cag.Int64("s_t"), 0),
+ NameSetBy: cag.OptionalJIDOrEmpty("s_o"),
+ }
+ case "description":
+ topicChild := child.GetChildByTag("body")
+ topicBytes, ok := topicChild.Content.([]byte)
+ if !ok {
+ return nil, fmt.Errorf("group change description has unexpected body: %s", topicChild.XMLString())
+ }
+ var setBy types.JID
+ if evt.Sender != nil {
+ setBy = *evt.Sender
+ }
+ evt.Topic = &types.GroupTopic{
+ Topic: string(topicBytes),
+ TopicID: cag.String("id"),
+ TopicSetAt: evt.Timestamp,
+ TopicSetBy: setBy,
+ }
+ case "announcement":
+ evt.Announce = &types.GroupAnnounce{
+ IsAnnounce: true,
+ AnnounceVersionID: cag.String("v_id"),
+ }
+ case "not_announcement":
+ evt.Announce = &types.GroupAnnounce{
+ IsAnnounce: false,
+ AnnounceVersionID: cag.String("v_id"),
+ }
+ case "invite":
+ link := InviteLinkPrefix + cag.String("code")
+ evt.NewInviteLink = &link
+ case "ephemeral":
+ timer := uint32(cag.Uint64("expiration"))
+ evt.Ephemeral = &types.GroupEphemeral{
+ IsEphemeral: true,
+ DisappearingTimer: timer,
+ }
+ case "not_ephemeral":
+ evt.Ephemeral = &types.GroupEphemeral{IsEphemeral: false}
+ default:
+ evt.UnknownChanges = append(evt.UnknownChanges, &child)
+ }
+ if !cag.OK() {
+ return nil, fmt.Errorf("group change %s element doesn't contain required attributes: %w", child.Tag, cag.Error())
+ }
+ }
+ return &evt, nil
+}
+
+func (cli *Client) updateGroupParticipantCache(evt *events.GroupInfo) {
+ if len(evt.Join) == 0 && len(evt.Leave) == 0 {
+ return
+ }
+ cli.groupParticipantsCacheLock.Lock()
+ defer cli.groupParticipantsCacheLock.Unlock()
+ cached, ok := cli.groupParticipantsCache[evt.JID]
+ if !ok {
+ return
+ }
+Outer:
+ for _, jid := range evt.Join {
+ for _, existingJID := range cached {
+ if jid == existingJID {
+ continue Outer
+ }
+ }
+ cached = append(cached, jid)
+ }
+ for _, jid := range evt.Leave {
+ for i, existingJID := range cached {
+ if existingJID == jid {
+ cached[i] = cached[len(cached)-1]
+ cached = cached[:len(cached)-1]
+ break
+ }
+ }
+ }
+ cli.groupParticipantsCache[evt.JID] = cached
+}
+
+func (cli *Client) parseGroupNotification(node *waBinary.Node) (interface{}, error) {
+ children := node.GetChildren()
+ if len(children) == 1 && children[0].Tag == "create" {
+ return cli.parseGroupCreate(&children[0])
+ } else {
+ groupChange, err := cli.parseGroupChange(node)
+ if err != nil {
+ return nil, err
+ }
+ cli.updateGroupParticipantCache(groupChange)
+ return groupChange, nil
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/handshake.go b/vendor/go.mau.fi/whatsmeow/handshake.go
new file mode 100644
index 00000000..ecd0398d
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/handshake.go
@@ -0,0 +1,131 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "bytes"
+ "fmt"
+ "time"
+
+ "google.golang.org/protobuf/proto"
+
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/socket"
+ "go.mau.fi/whatsmeow/util/keys"
+)
+
+const NoiseHandshakeResponseTimeout = 20 * time.Second
+
+// doHandshake implements the Noise_XX_25519_AESGCM_SHA256 handshake for the WhatsApp web API.
+func (cli *Client) doHandshake(fs *socket.FrameSocket, ephemeralKP keys.KeyPair) error {
+ nh := socket.NewNoiseHandshake()
+ nh.Start(socket.NoiseStartPattern, fs.Header)
+ nh.Authenticate(ephemeralKP.Pub[:])
+ data, err := proto.Marshal(&waProto.HandshakeMessage{
+ ClientHello: &waProto.ClientHello{
+ Ephemeral: ephemeralKP.Pub[:],
+ },
+ })
+ if err != nil {
+ return fmt.Errorf("failed to marshal handshake message: %w", err)
+ }
+ err = fs.SendFrame(data)
+ if err != nil {
+ return fmt.Errorf("failed to send handshake message: %w", err)
+ }
+ var resp []byte
+ select {
+ case resp = <-fs.Frames:
+ case <-time.After(NoiseHandshakeResponseTimeout):
+ return fmt.Errorf("timed out waiting for handshake response")
+ }
+ var handshakeResponse waProto.HandshakeMessage
+ err = proto.Unmarshal(resp, &handshakeResponse)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal handshake response: %w", err)
+ }
+ serverEphemeral := handshakeResponse.GetServerHello().GetEphemeral()
+ serverStaticCiphertext := handshakeResponse.GetServerHello().GetStatic()
+ certificateCiphertext := handshakeResponse.GetServerHello().GetPayload()
+ if len(serverEphemeral) != 32 || serverStaticCiphertext == nil || certificateCiphertext == nil {
+ return fmt.Errorf("missing parts of handshake response")
+ }
+ serverEphemeralArr := *(*[32]byte)(serverEphemeral)
+
+ nh.Authenticate(serverEphemeral)
+ err = nh.MixSharedSecretIntoKey(*ephemeralKP.Priv, serverEphemeralArr)
+ if err != nil {
+ return fmt.Errorf("failed to mix server ephemeral key in: %w", err)
+ }
+
+ staticDecrypted, err := nh.Decrypt(serverStaticCiphertext)
+ if err != nil {
+ return fmt.Errorf("failed to decrypt server static ciphertext: %w", err)
+ } else if len(staticDecrypted) != 32 {
+ return fmt.Errorf("unexpected length of server static plaintext %d (expected 32)", len(staticDecrypted))
+ }
+ err = nh.MixSharedSecretIntoKey(*ephemeralKP.Priv, *(*[32]byte)(staticDecrypted))
+ if err != nil {
+ return fmt.Errorf("failed to mix server static key in: %w", err)
+ }
+
+ certDecrypted, err := nh.Decrypt(certificateCiphertext)
+ if err != nil {
+ return fmt.Errorf("failed to decrypt noise certificate ciphertext: %w", err)
+ }
+ var cert waProto.NoiseCertificate
+ err = proto.Unmarshal(certDecrypted, &cert)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal noise certificate: %w", err)
+ }
+ certDetailsRaw := cert.GetDetails()
+ certSignature := cert.GetSignature()
+ if certDetailsRaw == nil || certSignature == nil {
+ return fmt.Errorf("missing parts of noise certificate")
+ }
+ var certDetails waProto.NoiseCertificateDetails
+ err = proto.Unmarshal(certDetailsRaw, &certDetails)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal noise certificate details: %w", err)
+ } else if !bytes.Equal(certDetails.GetKey(), staticDecrypted) {
+ return fmt.Errorf("cert key doesn't match decrypted static")
+ }
+
+ encryptedPubkey := nh.Encrypt(cli.Store.NoiseKey.Pub[:])
+ err = nh.MixSharedSecretIntoKey(*cli.Store.NoiseKey.Priv, serverEphemeralArr)
+ if err != nil {
+ return fmt.Errorf("failed to mix noise private key in: %w", err)
+ }
+
+ clientFinishPayloadBytes, err := proto.Marshal(cli.Store.GetClientPayload())
+ if err != nil {
+ return fmt.Errorf("failed to marshal client finish payload: %w", err)
+ }
+ encryptedClientFinishPayload := nh.Encrypt(clientFinishPayloadBytes)
+ data, err = proto.Marshal(&waProto.HandshakeMessage{
+ ClientFinish: &waProto.ClientFinish{
+ Static: encryptedPubkey,
+ Payload: encryptedClientFinishPayload,
+ },
+ })
+ if err != nil {
+ return fmt.Errorf("failed to marshal handshake finish message: %w", err)
+ }
+ err = fs.SendFrame(data)
+ if err != nil {
+ return fmt.Errorf("failed to send handshake finish message: %w", err)
+ }
+
+ ns, err := nh.Finish(fs, cli.handleFrame, cli.onDisconnect)
+ if err != nil {
+ return fmt.Errorf("failed to create noise socket: %w", err)
+ }
+
+ cli.socket = ns
+
+ return nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/keepalive.go b/vendor/go.mau.fi/whatsmeow/keepalive.go
new file mode 100644
index 00000000..ec05df1d
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/keepalive.go
@@ -0,0 +1,62 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "context"
+ "math/rand"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+)
+
+var (
+ // KeepAliveResponseDeadline specifies the duration to wait for a response to websocket keepalive pings.
+ KeepAliveResponseDeadline = 10 * time.Second
+ // KeepAliveIntervalMin specifies the minimum interval for websocket keepalive pings.
+ KeepAliveIntervalMin = 20 * time.Second
+ // KeepAliveIntervalMax specifies the maximum interval for websocket keepalive pings.
+ KeepAliveIntervalMax = 30 * time.Second
+)
+
+func (cli *Client) keepAliveLoop(ctx context.Context) {
+ for {
+ interval := rand.Int63n(KeepAliveIntervalMax.Milliseconds()-KeepAliveIntervalMin.Milliseconds()) + KeepAliveIntervalMin.Milliseconds()
+ select {
+ case <-time.After(time.Duration(interval) * time.Millisecond):
+ if !cli.sendKeepAlive(ctx) {
+ return
+ }
+ case <-ctx.Done():
+ return
+ }
+ }
+}
+
+func (cli *Client) sendKeepAlive(ctx context.Context) bool {
+ respCh, err := cli.sendIQAsync(infoQuery{
+ Namespace: "w:p",
+ Type: "get",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{Tag: "ping"}},
+ })
+ if err != nil {
+ cli.Log.Warnf("Failed to send keepalive: %v", err)
+ return true
+ }
+ select {
+ case <-respCh:
+ // All good
+ case <-time.After(KeepAliveResponseDeadline):
+ // TODO disconnect websocket?
+ cli.Log.Warnf("Keepalive timed out")
+ case <-ctx.Done():
+ return false
+ }
+ return true
+}
diff --git a/vendor/go.mau.fi/whatsmeow/mediaconn.go b/vendor/go.mau.fi/whatsmeow/mediaconn.go
new file mode 100644
index 00000000..6faa27a6
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/mediaconn.go
@@ -0,0 +1,93 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "fmt"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+)
+
+//type MediaConnIP struct {
+// IP4 net.IP
+// IP6 net.IP
+//}
+
+// MediaConnHost represents a single host to download media from.
+type MediaConnHost struct {
+ Hostname string
+ //IPs []MediaConnIP
+}
+
+// MediaConn contains a list of WhatsApp servers from which attachments can be downloaded from.
+type MediaConn struct {
+ Auth string
+ AuthTTL int
+ TTL int
+ MaxBuckets int
+ FetchedAt time.Time
+ Hosts []MediaConnHost
+}
+
+// Expiry returns the time when the MediaConn expires.
+func (mc *MediaConn) Expiry() time.Time {
+ return mc.FetchedAt.Add(time.Duration(mc.TTL) * time.Second)
+}
+
+func (cli *Client) refreshMediaConn(force bool) error {
+ cli.mediaConnLock.Lock()
+ defer cli.mediaConnLock.Unlock()
+ if cli.mediaConn == nil || force || time.Now().After(cli.mediaConn.Expiry()) {
+ var err error
+ cli.mediaConn, err = cli.queryMediaConn()
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (cli *Client) queryMediaConn() (*MediaConn, error) {
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "w:m",
+ Type: "set",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{Tag: "media_conn"}},
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to query media connections: %w", err)
+ } else if len(resp.GetChildren()) == 0 || resp.GetChildren()[0].Tag != "media_conn" {
+ return nil, fmt.Errorf("failed to query media connections: unexpected child tag")
+ }
+ respMC := resp.GetChildren()[0]
+ var mc MediaConn
+ ag := respMC.AttrGetter()
+ mc.FetchedAt = time.Now()
+ mc.Auth = ag.String("auth")
+ mc.TTL = ag.Int("ttl")
+ mc.AuthTTL = ag.Int("auth_ttl")
+ mc.MaxBuckets = ag.Int("max_buckets")
+ if !ag.OK() {
+ return nil, fmt.Errorf("failed to parse media connections: %+v", ag.Errors)
+ }
+ for _, child := range respMC.GetChildren() {
+ if child.Tag != "host" {
+ cli.Log.Warnf("Unexpected child in media_conn element: %s", child.XMLString())
+ continue
+ }
+ cag := child.AttrGetter()
+ mc.Hosts = append(mc.Hosts, MediaConnHost{
+ Hostname: cag.String("hostname"),
+ })
+ if !cag.OK() {
+ return nil, fmt.Errorf("failed to parse media connection host: %+v", ag.Errors)
+ }
+ }
+ return &mc, nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/message.go b/vendor/go.mau.fi/whatsmeow/message.go
new file mode 100644
index 00000000..f8906142
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/message.go
@@ -0,0 +1,383 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "bytes"
+ "compress/zlib"
+ "crypto/rand"
+ "errors"
+ "fmt"
+ "io"
+ "strconv"
+ "time"
+
+ "go.mau.fi/libsignal/signalerror"
+ "google.golang.org/protobuf/proto"
+
+ "go.mau.fi/libsignal/groups"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/session"
+
+ "go.mau.fi/whatsmeow/appstate"
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/store"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+var pbSerializer = store.SignalProtobufSerializer
+
+func (cli *Client) handleEncryptedMessage(node *waBinary.Node) {
+ info, err := cli.parseMessageInfo(node)
+ if err != nil {
+ cli.Log.Warnf("Failed to parse message: %v", err)
+ } else {
+ if len(info.PushName) > 0 && info.PushName != "-" {
+ go cli.updatePushName(info.Sender, info, info.PushName)
+ }
+ cli.decryptMessages(info, node)
+ }
+}
+
+func (cli *Client) parseMessageSource(node *waBinary.Node) (source types.MessageSource, err error) {
+ from, ok := node.Attrs["from"].(types.JID)
+ if !ok {
+ err = fmt.Errorf("didn't find valid `from` attribute in message")
+ } else if from.Server == types.GroupServer || from.Server == types.BroadcastServer {
+ source.IsGroup = true
+ source.Chat = from
+ sender, ok := node.Attrs["participant"].(types.JID)
+ if !ok {
+ err = fmt.Errorf("didn't find valid `participant` attribute in group message")
+ } else {
+ source.Sender = sender
+ if source.Sender.User == cli.Store.ID.User {
+ source.IsFromMe = true
+ }
+ }
+ if from.Server == types.BroadcastServer {
+ recipient, ok := node.Attrs["recipient"].(types.JID)
+ if ok {
+ source.BroadcastListOwner = recipient
+ }
+ }
+ } else if from.User == cli.Store.ID.User {
+ source.IsFromMe = true
+ source.Sender = from
+ recipient, ok := node.Attrs["recipient"].(types.JID)
+ if !ok {
+ source.Chat = from.ToNonAD()
+ } else {
+ source.Chat = recipient
+ }
+ } else {
+ source.Chat = from.ToNonAD()
+ source.Sender = from
+ }
+ return
+}
+
+func (cli *Client) parseMessageInfo(node *waBinary.Node) (*types.MessageInfo, error) {
+ var info types.MessageInfo
+ var err error
+ var ok bool
+ info.MessageSource, err = cli.parseMessageSource(node)
+ if err != nil {
+ return nil, err
+ }
+ info.ID, ok = node.Attrs["id"].(string)
+ if !ok {
+ return nil, fmt.Errorf("didn't find valid `id` attribute in message")
+ }
+ ts, ok := node.Attrs["t"].(string)
+ if !ok {
+ return nil, fmt.Errorf("didn't find valid `t` (timestamp) attribute in message")
+ }
+ tsInt, err := strconv.ParseInt(ts, 10, 64)
+ if err != nil {
+ return nil, fmt.Errorf("didn't find valid `t` (timestamp) attribute in message: %w", err)
+ }
+ info.Timestamp = time.Unix(tsInt, 0)
+
+ info.PushName, _ = node.Attrs["notify"].(string)
+ info.Category, _ = node.Attrs["category"].(string)
+
+ return &info, nil
+}
+
+func (cli *Client) decryptMessages(info *types.MessageInfo, node *waBinary.Node) {
+ go cli.sendAck(node)
+ if len(node.GetChildrenByTag("unavailable")) == len(node.GetChildren()) {
+ cli.Log.Warnf("Unavailable message %s from %s", info.ID, info.SourceString())
+ go cli.sendRetryReceipt(node, true)
+ cli.dispatchEvent(&events.UndecryptableMessage{Info: *info, IsUnavailable: true})
+ return
+ }
+ children := node.GetChildren()
+ cli.Log.Debugf("Decrypting %d messages from %s", len(children), info.SourceString())
+ handled := false
+ for _, child := range children {
+ if child.Tag != "enc" {
+ continue
+ }
+ encType, ok := child.Attrs["type"].(string)
+ if !ok {
+ continue
+ }
+ var decrypted []byte
+ var err error
+ if encType == "pkmsg" || encType == "msg" {
+ decrypted, err = cli.decryptDM(&child, info.Sender, encType == "pkmsg")
+ } else if info.IsGroup && encType == "skmsg" {
+ decrypted, err = cli.decryptGroupMsg(&child, info.Sender, info.Chat)
+ } else {
+ cli.Log.Warnf("Unhandled encrypted message (type %s) from %s", encType, info.SourceString())
+ continue
+ }
+ if err != nil {
+ cli.Log.Warnf("Error decrypting message from %s: %v", info.SourceString(), err)
+ go cli.sendRetryReceipt(node, false)
+ cli.dispatchEvent(&events.UndecryptableMessage{Info: *info, IsUnavailable: false})
+ return
+ }
+
+ var msg waProto.Message
+ err = proto.Unmarshal(decrypted, &msg)
+ if err != nil {
+ cli.Log.Warnf("Error unmarshaling decrypted message from %s: %v", info.SourceString(), err)
+ continue
+ }
+
+ cli.handleDecryptedMessage(info, &msg)
+ handled = true
+ }
+ if handled {
+ go cli.sendMessageReceipt(info)
+ }
+}
+
+func (cli *Client) decryptDM(child *waBinary.Node, from types.JID, isPreKey bool) ([]byte, error) {
+ content, _ := child.Content.([]byte)
+
+ builder := session.NewBuilderFromSignal(cli.Store, from.SignalAddress(), pbSerializer)
+ cipher := session.NewCipher(builder, from.SignalAddress())
+ var plaintext []byte
+ if isPreKey {
+ preKeyMsg, err := protocol.NewPreKeySignalMessageFromBytes(content, pbSerializer.PreKeySignalMessage, pbSerializer.SignalMessage)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse prekey message: %w", err)
+ }
+ plaintext, _, err = cipher.DecryptMessageReturnKey(preKeyMsg)
+ if errors.Is(err, signalerror.ErrUntrustedIdentity) {
+ cli.Log.Warnf("Got %v error while trying to decrypt prekey message from %s, clearing stored identity and retrying", err, from)
+ err = cli.Store.Identities.DeleteIdentity(from.SignalAddress().String())
+ if err != nil {
+ cli.Log.Warnf("Failed to delete identity of %s from store after decryption error: %v", from, err)
+ }
+ err = cli.Store.Sessions.DeleteSession(from.SignalAddress().String())
+ if err != nil {
+ cli.Log.Warnf("Failed to delete session with %s from store after decryption error: %v", from, err)
+ }
+ cli.dispatchEvent(&events.IdentityChange{JID: from, Timestamp: time.Now(), Implicit: true})
+ plaintext, _, err = cipher.DecryptMessageReturnKey(preKeyMsg)
+ }
+ if err != nil {
+ return nil, fmt.Errorf("failed to decrypt prekey message: %w", err)
+ }
+ } else {
+ msg, err := protocol.NewSignalMessageFromBytes(content, pbSerializer.SignalMessage)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse normal message: %w", err)
+ }
+ plaintext, err = cipher.Decrypt(msg)
+ if err != nil {
+ return nil, fmt.Errorf("failed to decrypt normal message: %w", err)
+ }
+ }
+ return unpadMessage(plaintext)
+}
+
+func (cli *Client) decryptGroupMsg(child *waBinary.Node, from types.JID, chat types.JID) ([]byte, error) {
+ content, _ := child.Content.([]byte)
+
+ senderKeyName := protocol.NewSenderKeyName(chat.String(), from.SignalAddress())
+ builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer)
+ cipher := groups.NewGroupCipher(builder, senderKeyName, cli.Store)
+ msg, err := protocol.NewSenderKeyMessageFromBytes(content, pbSerializer.SenderKeyMessage)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse group message: %w", err)
+ }
+ plaintext, err := cipher.Decrypt(msg)
+ if err != nil {
+ return nil, fmt.Errorf("failed to decrypt group message: %w", err)
+ }
+ return unpadMessage(plaintext)
+}
+
+const checkPadding = true
+
+func isValidPadding(plaintext []byte) bool {
+ lastByte := plaintext[len(plaintext)-1]
+ expectedPadding := bytes.Repeat([]byte{lastByte}, int(lastByte))
+ return bytes.HasSuffix(plaintext, expectedPadding)
+}
+
+func unpadMessage(plaintext []byte) ([]byte, error) {
+ if checkPadding && !isValidPadding(plaintext) {
+ return nil, fmt.Errorf("plaintext doesn't have expected padding")
+ }
+ return plaintext[:len(plaintext)-int(plaintext[len(plaintext)-1])], nil
+}
+
+func padMessage(plaintext []byte) []byte {
+ var pad [1]byte
+ _, err := rand.Read(pad[:])
+ if err != nil {
+ panic(err)
+ }
+ pad[0] &= 0xf
+ if pad[0] == 0 {
+ pad[0] = 0xf
+ }
+ plaintext = append(plaintext, bytes.Repeat(pad[:], int(pad[0]))...)
+ return plaintext
+}
+
+func (cli *Client) handleSenderKeyDistributionMessage(chat, from types.JID, rawSKDMsg *waProto.SenderKeyDistributionMessage) {
+ builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer)
+ senderKeyName := protocol.NewSenderKeyName(chat.String(), from.SignalAddress())
+ sdkMsg, err := protocol.NewSenderKeyDistributionMessageFromBytes(rawSKDMsg.AxolotlSenderKeyDistributionMessage, pbSerializer.SenderKeyDistributionMessage)
+ if err != nil {
+ cli.Log.Errorf("Failed to parse sender key distribution message from %s for %s: %v", from, chat, err)
+ return
+ }
+ builder.Process(senderKeyName, sdkMsg)
+ cli.Log.Debugf("Processed sender key distribution message from %s in %s", senderKeyName.Sender().String(), senderKeyName.GroupID())
+}
+
+func (cli *Client) handleHistorySyncNotification(notif *waProto.HistorySyncNotification) {
+ var historySync waProto.HistorySync
+ if data, err := cli.Download(notif); err != nil {
+ cli.Log.Errorf("Failed to download history sync data: %v", err)
+ } else if reader, err := zlib.NewReader(bytes.NewReader(data)); err != nil {
+ cli.Log.Errorf("Failed to create zlib reader for history sync data: %v", err)
+ } else if rawData, err := io.ReadAll(reader); err != nil {
+ cli.Log.Errorf("Failed to decompress history sync data: %v", err)
+ } else if err = proto.Unmarshal(rawData, &historySync); err != nil {
+ cli.Log.Errorf("Failed to unmarshal history sync data: %v", err)
+ } else {
+ cli.Log.Debugf("Received history sync")
+ if historySync.GetSyncType() == waProto.HistorySync_PUSH_NAME {
+ go cli.handleHistoricalPushNames(historySync.GetPushnames())
+ }
+ cli.dispatchEvent(&events.HistorySync{
+ Data: &historySync,
+ })
+ }
+}
+
+func (cli *Client) handleAppStateSyncKeyShare(keys *waProto.AppStateSyncKeyShare) {
+ for _, key := range keys.GetKeys() {
+ marshaledFingerprint, err := proto.Marshal(key.GetKeyData().GetFingerprint())
+ if err != nil {
+ cli.Log.Errorf("Failed to marshal fingerprint of app state sync key %X", key.GetKeyId().GetKeyId())
+ continue
+ }
+ err = cli.Store.AppStateKeys.PutAppStateSyncKey(key.GetKeyId().GetKeyId(), store.AppStateSyncKey{
+ Data: key.GetKeyData().GetKeyData(),
+ Fingerprint: marshaledFingerprint,
+ Timestamp: key.GetKeyData().GetTimestamp(),
+ })
+ if err != nil {
+ cli.Log.Errorf("Failed to store app state sync key %X", key.GetKeyId().GetKeyId())
+ continue
+ }
+ cli.Log.Debugf("Received app state sync key %X", key.GetKeyId().GetKeyId())
+ }
+
+ for _, name := range appstate.AllPatchNames {
+ err := cli.FetchAppState(name, false, true)
+ if err != nil {
+ cli.Log.Errorf("Failed to do initial fetch of app state %s: %v", name, err)
+ }
+ }
+}
+
+func (cli *Client) handleProtocolMessage(info *types.MessageInfo, msg *waProto.Message) {
+ protoMsg := msg.GetProtocolMessage()
+
+ if protoMsg.GetHistorySyncNotification() != nil && info.IsFromMe {
+ cli.handleHistorySyncNotification(protoMsg.HistorySyncNotification)
+ cli.sendProtocolMessageReceipt(info.ID, "hist_sync")
+ }
+
+ if protoMsg.GetAppStateSyncKeyShare() != nil && info.IsFromMe {
+ cli.handleAppStateSyncKeyShare(protoMsg.AppStateSyncKeyShare)
+ }
+
+ if info.Category == "peer" {
+ cli.sendProtocolMessageReceipt(info.ID, "peer_msg")
+ }
+}
+
+func (cli *Client) handleDecryptedMessage(info *types.MessageInfo, msg *waProto.Message) {
+ evt := &events.Message{Info: *info, RawMessage: msg}
+
+ // First unwrap device sent messages
+ if msg.GetDeviceSentMessage().GetMessage() != nil {
+ msg = msg.GetDeviceSentMessage().GetMessage()
+ evt.Info.DeviceSentMeta = &types.DeviceSentMeta{
+ DestinationJID: msg.GetDeviceSentMessage().GetDestinationJid(),
+ Phash: msg.GetDeviceSentMessage().GetPhash(),
+ }
+ }
+
+ if msg.GetSenderKeyDistributionMessage() != nil {
+ if !info.IsGroup {
+ cli.Log.Warnf("Got sender key distribution message in non-group chat from", info.Sender)
+ } else {
+ cli.handleSenderKeyDistributionMessage(info.Chat, info.Sender, msg.SenderKeyDistributionMessage)
+ }
+ }
+ if msg.GetProtocolMessage() != nil {
+ go cli.handleProtocolMessage(info, msg)
+ }
+
+ // Unwrap ephemeral and view-once messages
+ // Hopefully sender key distribution messages and protocol messages can't be inside ephemeral messages
+ if msg.GetEphemeralMessage().GetMessage() != nil {
+ msg = msg.GetEphemeralMessage().GetMessage()
+ evt.IsEphemeral = true
+ }
+ if msg.GetViewOnceMessage().GetMessage() != nil {
+ msg = msg.GetViewOnceMessage().GetMessage()
+ evt.IsViewOnce = true
+ }
+ evt.Message = msg
+
+ cli.dispatchEvent(evt)
+}
+
+func (cli *Client) sendProtocolMessageReceipt(id, msgType string) {
+ if len(id) == 0 {
+ return
+ }
+ err := cli.sendNode(waBinary.Node{
+ Tag: "receipt",
+ Attrs: waBinary.Attrs{
+ "id": id,
+ "type": msgType,
+ "to": types.NewJID(cli.Store.ID.User, types.LegacyUserServer),
+ },
+ Content: nil,
+ })
+ if err != nil {
+ cli.Log.Warnf("Failed to send acknowledgement for protocol message %s: %v", id, err)
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/notification.go b/vendor/go.mau.fi/whatsmeow/notification.go
new file mode 100644
index 00000000..43ab69ce
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/notification.go
@@ -0,0 +1,205 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "errors"
+ "time"
+
+ "go.mau.fi/whatsmeow/appstate"
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+func (cli *Client) handleEncryptNotification(node *waBinary.Node) {
+ from := node.AttrGetter().JID("from")
+ if from == types.ServerJID {
+ count := node.GetChildByTag("count")
+ ag := count.AttrGetter()
+ otksLeft := ag.Int("value")
+ if !ag.OK() {
+ cli.Log.Warnf("Didn't get number of OTKs left in encryption notification %s", node.XMLString())
+ return
+ }
+ cli.Log.Infof("Got prekey count from server: %s", node.XMLString())
+ if otksLeft < MinPreKeyCount {
+ cli.uploadPreKeys()
+ }
+ } else if _, ok := node.GetOptionalChildByTag("identity"); ok {
+ cli.Log.Debugf("Got identity change for %s: %s, deleting all identities/sessions for that number", from, node.XMLString())
+ err := cli.Store.Identities.DeleteAllIdentities(from.User)
+ if err != nil {
+ cli.Log.Warnf("Failed to delete all identities of %s from store after identity change: %v", from, err)
+ }
+ err = cli.Store.Sessions.DeleteAllSessions(from.User)
+ if err != nil {
+ cli.Log.Warnf("Failed to delete all sessions of %s from store after identity change: %v", from, err)
+ }
+ ts := time.Unix(node.AttrGetter().Int64("t"), 0)
+ cli.dispatchEvent(&events.IdentityChange{JID: from, Timestamp: ts})
+ } else {
+ cli.Log.Debugf("Got unknown encryption notification from server: %s", node.XMLString())
+ }
+}
+
+func (cli *Client) handleAppStateNotification(node *waBinary.Node) {
+ for _, collection := range node.GetChildrenByTag("collection") {
+ ag := collection.AttrGetter()
+ name := appstate.WAPatchName(ag.String("name"))
+ version := ag.Uint64("version")
+ cli.Log.Debugf("Got server sync notification that app state %s has updated to version %d", name, version)
+ err := cli.FetchAppState(name, false, false)
+ if errors.Is(err, ErrIQDisconnected) || errors.Is(err, ErrNotConnected) {
+ // There are some app state changes right before a remote logout, so stop syncing if we're disconnected.
+ cli.Log.Debugf("Failed to sync app state after notification: %v, not trying to sync other states", err)
+ return
+ } else if err != nil {
+ cli.Log.Errorf("Failed to sync app state after notification: %v", err)
+ }
+ }
+}
+
+func (cli *Client) handlePictureNotification(node *waBinary.Node) {
+ ts := time.Unix(node.AttrGetter().Int64("t"), 0)
+ for _, child := range node.GetChildren() {
+ ag := child.AttrGetter()
+ var evt events.Picture
+ evt.Timestamp = ts
+ evt.JID = ag.JID("jid")
+ evt.Author = ag.OptionalJIDOrEmpty("author")
+ if child.Tag == "delete" {
+ evt.Remove = true
+ } else if child.Tag == "add" {
+ evt.PictureID = ag.String("id")
+ } else if child.Tag == "set" {
+ // TODO sometimes there's a hash and no ID?
+ evt.PictureID = ag.String("id")
+ } else {
+ continue
+ }
+ if !ag.OK() {
+ cli.Log.Debugf("Ignoring picture change notification with unexpected attributes: %v", ag.Error())
+ continue
+ }
+ cli.dispatchEvent(&evt)
+ }
+}
+
+func (cli *Client) handleDeviceNotification(node *waBinary.Node) {
+ cli.userDevicesCacheLock.Lock()
+ defer cli.userDevicesCacheLock.Unlock()
+ ag := node.AttrGetter()
+ from := ag.JID("from")
+ cached, ok := cli.userDevicesCache[from]
+ if !ok {
+ cli.Log.Debugf("No device list cached for %s, ignoring device list notification", from)
+ return
+ }
+ cachedParticipantHash := participantListHashV2(cached)
+ for _, child := range node.GetChildren() {
+ if child.Tag != "add" && child.Tag != "remove" {
+ cli.Log.Debugf("Unknown device list change tag %s", child.Tag)
+ continue
+ }
+ cag := child.AttrGetter()
+ deviceHash := cag.String("device_hash")
+ deviceChild, _ := child.GetOptionalChildByTag("device")
+ changedDeviceJID := deviceChild.AttrGetter().JID("jid")
+ switch child.Tag {
+ case "add":
+ cached = append(cached, changedDeviceJID)
+ case "remove":
+ for i, jid := range cached {
+ if jid == changedDeviceJID {
+ cached = append(cached[:i], cached[i+1:]...)
+ }
+ }
+ case "update":
+ // ???
+ }
+ newParticipantHash := participantListHashV2(cached)
+ if newParticipantHash == deviceHash {
+ cli.Log.Debugf("%s's device list hash changed from %s to %s (%s). New hash matches", from, cachedParticipantHash, deviceHash, child.Tag)
+ cli.userDevicesCache[from] = cached
+ } else {
+ cli.Log.Warnf("%s's device list hash changed from %s to %s (%s). New hash doesn't match (%s)", from, cachedParticipantHash, deviceHash, child.Tag, newParticipantHash)
+ delete(cli.userDevicesCache, from)
+ }
+ }
+}
+
+func (cli *Client) handleOwnDevicesNotification(node *waBinary.Node) {
+ cli.userDevicesCacheLock.Lock()
+ defer cli.userDevicesCacheLock.Unlock()
+ cached, ok := cli.userDevicesCache[cli.Store.ID.ToNonAD()]
+ if !ok {
+ cli.Log.Debugf("Ignoring own device change notification, device list not cached")
+ return
+ }
+ oldHash := participantListHashV2(cached)
+ expectedNewHash := node.AttrGetter().String("dhash")
+ var newDeviceList []types.JID
+ for _, child := range node.GetChildren() {
+ jid := child.AttrGetter().JID("jid")
+ if child.Tag == "device" && !jid.IsEmpty() {
+ jid.AD = true
+ newDeviceList = append(newDeviceList, jid)
+ }
+ }
+ newHash := participantListHashV2(newDeviceList)
+ if newHash != expectedNewHash {
+ cli.Log.Debugf("Received own device list change notification %s -> %s, but expected hash was %s", oldHash, newHash, expectedNewHash)
+ delete(cli.userDevicesCache, cli.Store.ID.ToNonAD())
+ } else {
+ cli.Log.Debugf("Received own device list change notification %s -> %s", oldHash, newHash)
+ cli.userDevicesCache[cli.Store.ID.ToNonAD()] = newDeviceList
+ }
+}
+
+func (cli *Client) handleAccountSyncNotification(node *waBinary.Node) {
+ for _, child := range node.GetChildren() {
+ switch child.Tag {
+ case "privacy":
+ cli.handlePrivacySettingsNotification(&child)
+ case "devices":
+ cli.handleOwnDevicesNotification(&child)
+ default:
+ cli.Log.Debugf("Unhandled account sync item %s", child.Tag)
+ }
+ }
+}
+
+func (cli *Client) handleNotification(node *waBinary.Node) {
+ ag := node.AttrGetter()
+ notifType := ag.String("type")
+ if !ag.OK() {
+ return
+ }
+ go cli.sendAck(node)
+ switch notifType {
+ case "encrypt":
+ go cli.handleEncryptNotification(node)
+ case "server_sync":
+ go cli.handleAppStateNotification(node)
+ case "account_sync":
+ go cli.handleAccountSyncNotification(node)
+ case "devices":
+ go cli.handleDeviceNotification(node)
+ case "w:gp2":
+ evt, err := cli.parseGroupNotification(node)
+ if err != nil {
+ cli.Log.Errorf("Failed to parse group notification: %v", err)
+ } else {
+ go cli.dispatchEvent(evt)
+ }
+ case "picture":
+ go cli.handlePictureNotification(node)
+ default:
+ cli.Log.Debugf("Unhandled notification with type %s", notifType)
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/pair.go b/vendor/go.mau.fi/whatsmeow/pair.go
new file mode 100644
index 00000000..389d6f52
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/pair.go
@@ -0,0 +1,244 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "bytes"
+ "crypto/hmac"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "strings"
+ "time"
+
+ "google.golang.org/protobuf/proto"
+
+ "go.mau.fi/libsignal/ecc"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+ "go.mau.fi/whatsmeow/util/keys"
+)
+
+const qrScanTimeout = 30 * time.Second
+
+func (cli *Client) handleIQ(node *waBinary.Node) {
+ children := node.GetChildren()
+ if len(children) != 1 || node.Attrs["from"] != types.ServerJID {
+ return
+ }
+ switch children[0].Tag {
+ case "pair-device":
+ cli.handlePairDevice(node)
+ case "pair-success":
+ cli.handlePairSuccess(node)
+ }
+}
+
+func (cli *Client) handlePairDevice(node *waBinary.Node) {
+ pairDevice := node.GetChildByTag("pair-device")
+ err := cli.sendNode(waBinary.Node{
+ Tag: "iq",
+ Attrs: waBinary.Attrs{
+ "to": node.Attrs["from"],
+ "id": node.Attrs["id"],
+ "type": "result",
+ },
+ })
+ if err != nil {
+ cli.Log.Warnf("Failed to send acknowledgement for pair-device request: %v", err)
+ }
+
+ evt := &events.QR{Codes: make([]string, 0, len(pairDevice.GetChildren()))}
+ for i, child := range pairDevice.GetChildren() {
+ if child.Tag != "ref" {
+ cli.Log.Warnf("pair-device node contains unexpected child tag %s at index %d", child.Tag, i)
+ continue
+ }
+ content, ok := child.Content.([]byte)
+ if !ok {
+ cli.Log.Warnf("pair-device node contains unexpected child content type %T at index %d", child, i)
+ continue
+ }
+ evt.Codes = append(evt.Codes, cli.makeQRData(string(content)))
+ }
+
+ cli.dispatchEvent(evt)
+}
+
+func (cli *Client) makeQRData(ref string) string {
+ noise := base64.StdEncoding.EncodeToString(cli.Store.NoiseKey.Pub[:])
+ identity := base64.StdEncoding.EncodeToString(cli.Store.IdentityKey.Pub[:])
+ adv := base64.StdEncoding.EncodeToString(cli.Store.AdvSecretKey)
+ return strings.Join([]string{ref, noise, identity, adv}, ",")
+}
+
+func (cli *Client) handlePairSuccess(node *waBinary.Node) {
+ id := node.Attrs["id"].(string)
+ pairSuccess := node.GetChildByTag("pair-success")
+
+ deviceIdentityBytes, _ := pairSuccess.GetChildByTag("device-identity").Content.([]byte)
+ businessName, _ := pairSuccess.GetChildByTag("biz").Attrs["name"].(string)
+ jid, _ := pairSuccess.GetChildByTag("device").Attrs["jid"].(types.JID)
+ platform, _ := pairSuccess.GetChildByTag("platform").Attrs["name"].(string)
+
+ go func() {
+ err := cli.handlePair(deviceIdentityBytes, id, businessName, platform, jid)
+ if err != nil {
+ cli.Log.Errorf("Failed to pair device: %v", err)
+ cli.Disconnect()
+ cli.dispatchEvent(&events.PairError{ID: jid, BusinessName: businessName, Platform: platform, Error: err})
+ } else {
+ cli.Log.Infof("Successfully paired %s", cli.Store.ID)
+ cli.dispatchEvent(&events.PairSuccess{ID: jid, BusinessName: businessName, Platform: platform})
+ }
+ }()
+}
+
+func (cli *Client) handlePair(deviceIdentityBytes []byte, reqID, businessName, platform string, jid types.JID) error {
+ var deviceIdentityContainer waProto.ADVSignedDeviceIdentityHMAC
+ err := proto.Unmarshal(deviceIdentityBytes, &deviceIdentityContainer)
+ if err != nil {
+ cli.sendIQError(reqID, 500, "internal-error")
+ return fmt.Errorf("failed to parse device identity container in pair success message: %w", err)
+ }
+
+ h := hmac.New(sha256.New, cli.Store.AdvSecretKey)
+ h.Write(deviceIdentityContainer.Details)
+ if !bytes.Equal(h.Sum(nil), deviceIdentityContainer.Hmac) {
+ cli.Log.Warnf("Invalid HMAC from pair success message")
+ cli.sendIQError(reqID, 401, "not-authorized")
+ return fmt.Errorf("invalid device identity HMAC in pair success message")
+ }
+
+ var deviceIdentity waProto.ADVSignedDeviceIdentity
+ err = proto.Unmarshal(deviceIdentityContainer.Details, &deviceIdentity)
+ if err != nil {
+ cli.sendIQError(reqID, 500, "internal-error")
+ return fmt.Errorf("failed to parse signed device identity in pair success message: %w", err)
+ }
+
+ if !verifyDeviceIdentityAccountSignature(&deviceIdentity, cli.Store.IdentityKey) {
+ cli.sendIQError(reqID, 401, "not-authorized")
+ return fmt.Errorf("invalid device signature in pair success message")
+ }
+
+ deviceIdentity.DeviceSignature = generateDeviceSignature(&deviceIdentity, cli.Store.IdentityKey)[:]
+
+ var deviceIdentityDetails waProto.ADVDeviceIdentity
+ err = proto.Unmarshal(deviceIdentity.Details, &deviceIdentityDetails)
+ if err != nil {
+ cli.sendIQError(reqID, 500, "internal-error")
+ return fmt.Errorf("failed to parse device identity details in pair success message: %w", err)
+ }
+
+ mainDeviceJID := jid
+ mainDeviceJID.Device = 0
+ mainDeviceIdentity := *(*[32]byte)(deviceIdentity.AccountSignatureKey)
+ deviceIdentity.AccountSignatureKey = nil
+
+ cli.Store.Account = proto.Clone(&deviceIdentity).(*waProto.ADVSignedDeviceIdentity)
+
+ selfSignedDeviceIdentity, err := proto.Marshal(&deviceIdentity)
+ if err != nil {
+ cli.sendIQError(reqID, 500, "internal-error")
+ return fmt.Errorf("failed to marshal self-signed device identity: %w", err)
+ }
+
+ cli.Store.ID = &jid
+ cli.Store.BusinessName = businessName
+ cli.Store.Platform = platform
+ err = cli.Store.Save()
+ if err != nil {
+ cli.sendIQError(reqID, 500, "internal-error")
+ return fmt.Errorf("failed to save device store: %w", err)
+ }
+ err = cli.Store.Identities.PutIdentity(mainDeviceJID.SignalAddress().String(), mainDeviceIdentity)
+ if err != nil {
+ _ = cli.Store.Delete()
+ cli.sendIQError(reqID, 500, "internal-error")
+ return fmt.Errorf("failed to store main device identity: %w", err)
+ }
+
+ // Expect a disconnect after this and don't dispatch the usual Disconnected event
+ cli.expectDisconnect()
+
+ err = cli.sendNode(waBinary.Node{
+ Tag: "iq",
+ Attrs: waBinary.Attrs{
+ "to": types.ServerJID,
+ "type": "result",
+ "id": reqID,
+ },
+ Content: []waBinary.Node{{
+ Tag: "pair-device-sign",
+ Content: []waBinary.Node{{
+ Tag: "device-identity",
+ Attrs: waBinary.Attrs{
+ "key-index": deviceIdentityDetails.GetKeyIndex(),
+ },
+ Content: selfSignedDeviceIdentity,
+ }},
+ }},
+ })
+ if err != nil {
+ _ = cli.Store.Delete()
+ return fmt.Errorf("failed to send pairing confirmation: %w", err)
+ }
+ return nil
+}
+
+func concatBytes(data ...[]byte) []byte {
+ length := 0
+ for _, item := range data {
+ length += len(item)
+ }
+ output := make([]byte, length)
+ ptr := 0
+ for _, item := range data {
+ ptr += copy(output[ptr:ptr+len(item)], item)
+ }
+ return output
+}
+
+func verifyDeviceIdentityAccountSignature(deviceIdentity *waProto.ADVSignedDeviceIdentity, ikp *keys.KeyPair) bool {
+ if len(deviceIdentity.AccountSignatureKey) != 32 || len(deviceIdentity.AccountSignature) != 64 {
+ return false
+ }
+
+ signatureKey := ecc.NewDjbECPublicKey(*(*[32]byte)(deviceIdentity.AccountSignatureKey))
+ signature := *(*[64]byte)(deviceIdentity.AccountSignature)
+
+ message := concatBytes([]byte{6, 0}, deviceIdentity.Details, ikp.Pub[:])
+ return ecc.VerifySignature(signatureKey, message, signature)
+}
+
+func generateDeviceSignature(deviceIdentity *waProto.ADVSignedDeviceIdentity, ikp *keys.KeyPair) *[64]byte {
+ message := concatBytes([]byte{6, 1}, deviceIdentity.Details, ikp.Pub[:], deviceIdentity.AccountSignatureKey)
+ sig := ecc.CalculateSignature(ecc.NewDjbECPrivateKey(*ikp.Priv), message)
+ return &sig
+}
+
+func (cli *Client) sendIQError(id string, code int, text string) waBinary.Node {
+ return waBinary.Node{
+ Tag: "iq",
+ Attrs: waBinary.Attrs{
+ "to": types.ServerJID,
+ "type": "error",
+ "id": id,
+ },
+ Content: []waBinary.Node{{
+ Tag: "error",
+ Attrs: waBinary.Attrs{
+ "code": code,
+ "text": text,
+ },
+ }},
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/prekeys.go b/vendor/go.mau.fi/whatsmeow/prekeys.go
new file mode 100644
index 00000000..850013b6
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/prekeys.go
@@ -0,0 +1,235 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "encoding/binary"
+ "fmt"
+ "time"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/keys/prekey"
+ "go.mau.fi/libsignal/util/optional"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/util/keys"
+)
+
+const (
+ // WantedPreKeyCount is the number of prekeys that the client should upload to the WhatsApp servers in a single batch.
+ WantedPreKeyCount = 50
+ // MinPreKeyCount is the number of prekeys when the client will upload a new batch of prekeys to the WhatsApp servers.
+ MinPreKeyCount = 5
+)
+
+func (cli *Client) getServerPreKeyCount() (int, error) {
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "encrypt",
+ Type: "get",
+ To: types.ServerJID,
+ Content: []waBinary.Node{
+ {Tag: "count"},
+ },
+ })
+ if err != nil {
+ return 0, fmt.Errorf("failed to get prekey count on server: %w", err)
+ }
+ count := resp.GetChildByTag("count")
+ ag := count.AttrGetter()
+ val := ag.Int("value")
+ return val, ag.Error()
+}
+
+func (cli *Client) uploadPreKeys() {
+ cli.uploadPreKeysLock.Lock()
+ defer cli.uploadPreKeysLock.Unlock()
+ if cli.lastPreKeyUpload.Add(10 * time.Minute).After(time.Now()) {
+ sc, _ := cli.getServerPreKeyCount()
+ if sc >= WantedPreKeyCount {
+ cli.Log.Debugf("Canceling prekey upload request due to likely race condition")
+ return
+ }
+ }
+ var registrationIDBytes [4]byte
+ binary.BigEndian.PutUint32(registrationIDBytes[:], cli.Store.RegistrationID)
+ preKeys, err := cli.Store.PreKeys.GetOrGenPreKeys(WantedPreKeyCount)
+ if err != nil {
+ cli.Log.Errorf("Failed to get prekeys to upload: %v", err)
+ return
+ }
+ cli.Log.Infof("Uploading %d new prekeys to server", len(preKeys))
+ _, err = cli.sendIQ(infoQuery{
+ Namespace: "encrypt",
+ Type: "set",
+ To: types.ServerJID,
+ Content: []waBinary.Node{
+ {Tag: "registration", Content: registrationIDBytes[:]},
+ {Tag: "type", Content: []byte{ecc.DjbType}},
+ {Tag: "identity", Content: cli.Store.IdentityKey.Pub[:]},
+ {Tag: "list", Content: preKeysToNodes(preKeys)},
+ preKeyToNode(cli.Store.SignedPreKey),
+ },
+ })
+ if err != nil {
+ cli.Log.Errorf("Failed to send request to upload prekeys: %v", err)
+ return
+ }
+ cli.Log.Debugf("Got response to uploading prekeys")
+ err = cli.Store.PreKeys.MarkPreKeysAsUploaded(preKeys[len(preKeys)-1].KeyID)
+ if err != nil {
+ cli.Log.Warnf("Failed to mark prekeys as uploaded: %v", err)
+ }
+ cli.lastPreKeyUpload = time.Now()
+}
+
+type preKeyResp struct {
+ bundle *prekey.Bundle
+ err error
+}
+
+func (cli *Client) fetchPreKeys(users []types.JID) (map[types.JID]preKeyResp, error) {
+ requests := make([]waBinary.Node, len(users))
+ for i, user := range users {
+ requests[i].Tag = "user"
+ requests[i].Attrs = waBinary.Attrs{
+ "jid": user,
+ "reason": "identity",
+ }
+ }
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "encrypt",
+ Type: "get",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{
+ Tag: "key",
+ Content: requests,
+ }},
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to send prekey request: %w", err)
+ } else if len(resp.GetChildren()) == 0 {
+ return nil, fmt.Errorf("got empty response to prekey request")
+ }
+ list := resp.GetChildByTag("list")
+ respData := make(map[types.JID]preKeyResp)
+ for _, child := range list.GetChildren() {
+ if child.Tag != "user" {
+ continue
+ }
+ jid := child.AttrGetter().JID("jid")
+ jid.AD = true
+ bundle, err := nodeToPreKeyBundle(uint32(jid.Device), child)
+ respData[jid] = preKeyResp{bundle, err}
+ }
+ return respData, nil
+}
+
+func preKeyToNode(key *keys.PreKey) waBinary.Node {
+ var keyID [4]byte
+ binary.BigEndian.PutUint32(keyID[:], key.KeyID)
+ node := waBinary.Node{
+ Tag: "key",
+ Content: []waBinary.Node{
+ {Tag: "id", Content: keyID[1:]},
+ {Tag: "value", Content: key.Pub[:]},
+ },
+ }
+ if key.Signature != nil {
+ node.Tag = "skey"
+ node.Content = append(node.GetChildren(), waBinary.Node{
+ Tag: "signature",
+ Content: key.Signature[:],
+ })
+ }
+ return node
+}
+
+func nodeToPreKeyBundle(deviceID uint32, node waBinary.Node) (*prekey.Bundle, error) {
+ errorNode, ok := node.GetOptionalChildByTag("error")
+ if ok && errorNode.Tag == "error" {
+ return nil, fmt.Errorf("got error getting prekeys: %s", errorNode.XMLString())
+ }
+
+ registrationBytes, ok := node.GetChildByTag("registration").Content.([]byte)
+ if !ok || len(registrationBytes) != 4 {
+ return nil, fmt.Errorf("invalid registration ID in prekey response")
+ }
+ registrationID := binary.BigEndian.Uint32(registrationBytes)
+
+ keysNode, ok := node.GetOptionalChildByTag("keys")
+ if !ok {
+ keysNode = node
+ }
+
+ identityKeyRaw, ok := keysNode.GetChildByTag("identity").Content.([]byte)
+ if !ok || len(identityKeyRaw) != 32 {
+ return nil, fmt.Errorf("invalid identity key in prekey response")
+ }
+ identityKeyPub := *(*[32]byte)(identityKeyRaw)
+
+ preKey, err := nodeToPreKey(keysNode.GetChildByTag("key"))
+ if err != nil {
+ return nil, fmt.Errorf("invalid prekey in prekey response: %w", err)
+ }
+ signedPreKey, err := nodeToPreKey(keysNode.GetChildByTag("skey"))
+ if err != nil {
+ return nil, fmt.Errorf("invalid signed prekey in prekey response: %w", err)
+ }
+
+ return prekey.NewBundle(registrationID, deviceID,
+ optional.NewOptionalUint32(preKey.KeyID), signedPreKey.KeyID,
+ ecc.NewDjbECPublicKey(*preKey.Pub), ecc.NewDjbECPublicKey(*signedPreKey.Pub), *signedPreKey.Signature,
+ identity.NewKey(ecc.NewDjbECPublicKey(identityKeyPub))), nil
+}
+
+func nodeToPreKey(node waBinary.Node) (*keys.PreKey, error) {
+ key := keys.PreKey{
+ KeyPair: keys.KeyPair{},
+ KeyID: 0,
+ Signature: nil,
+ }
+ if id := node.GetChildByTag("id"); id.Tag != "id" {
+ return nil, fmt.Errorf("prekey node doesn't contain ID tag")
+ } else if idBytes, ok := id.Content.([]byte); !ok {
+ return nil, fmt.Errorf("prekey ID has unexpected content (%T)", id.Content)
+ } else if len(idBytes) != 3 {
+ return nil, fmt.Errorf("prekey ID has unexpected number of bytes (%d, expected 3)", len(idBytes))
+ } else {
+ key.KeyID = binary.BigEndian.Uint32(append([]byte{0}, idBytes...))
+ }
+ if pubkey := node.GetChildByTag("value"); pubkey.Tag != "value" {
+ return nil, fmt.Errorf("prekey node doesn't contain value tag")
+ } else if pubkeyBytes, ok := pubkey.Content.([]byte); !ok {
+ return nil, fmt.Errorf("prekey value has unexpected content (%T)", pubkey.Content)
+ } else if len(pubkeyBytes) != 32 {
+ return nil, fmt.Errorf("prekey value has unexpected number of bytes (%d, expected 32)", len(pubkeyBytes))
+ } else {
+ key.KeyPair.Pub = (*[32]byte)(pubkeyBytes)
+ }
+ if node.Tag == "skey" {
+ if sig := node.GetChildByTag("signature"); sig.Tag != "signature" {
+ return nil, fmt.Errorf("prekey node doesn't contain signature tag")
+ } else if sigBytes, ok := sig.Content.([]byte); !ok {
+ return nil, fmt.Errorf("prekey signature has unexpected content (%T)", sig.Content)
+ } else if len(sigBytes) != 64 {
+ return nil, fmt.Errorf("prekey signature has unexpected number of bytes (%d, expected 64)", len(sigBytes))
+ } else {
+ key.Signature = (*[64]byte)(sigBytes)
+ }
+ }
+ return &key, nil
+}
+
+func preKeysToNodes(prekeys []*keys.PreKey) []waBinary.Node {
+ nodes := make([]waBinary.Node, len(prekeys))
+ for i, key := range prekeys {
+ nodes[i] = preKeyToNode(key)
+ }
+ return nodes
+}
diff --git a/vendor/go.mau.fi/whatsmeow/presence.go b/vendor/go.mau.fi/whatsmeow/presence.go
new file mode 100644
index 00000000..e308717b
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/presence.go
@@ -0,0 +1,101 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+func (cli *Client) handleChatState(node *waBinary.Node) {
+ source, err := cli.parseMessageSource(node)
+ if err != nil {
+ cli.Log.Warnf("Failed to parse chat state update: %v", err)
+ } else if len(node.GetChildren()) != 1 {
+ cli.Log.Warnf("Failed to parse chat state update: unexpected number of children in element (%d)", len(node.GetChildren()))
+ } else {
+ child := node.GetChildren()[0]
+ presence := types.ChatPresence(child.Tag)
+ if presence != types.ChatPresenceComposing && presence != types.ChatPresenceRecording && presence != types.ChatPresencePaused {
+ cli.Log.Warnf("Unrecognized chat presence state %s", child.Tag)
+ }
+ cli.dispatchEvent(&events.ChatPresence{
+ MessageSource: source,
+ State: presence,
+ })
+ }
+}
+
+func (cli *Client) handlePresence(node *waBinary.Node) {
+ var evt events.Presence
+ ag := node.AttrGetter()
+ evt.From = ag.JID("from")
+ presenceType := ag.OptionalString("type")
+ if presenceType == "unavailable" {
+ evt.Unavailable = true
+ } else if presenceType != "" {
+ cli.Log.Debugf("Unrecognized presence type '%s' in presence event from %s", presenceType, evt.From)
+ }
+ lastSeen := ag.OptionalString("last")
+ if lastSeen != "" && lastSeen != "deny" {
+ evt.LastSeen = time.Unix(ag.Int64("last"), 0)
+ }
+ if !ag.OK() {
+ cli.Log.Warnf("Error parsing presence event: %+v", ag.Errors)
+ } else {
+ cli.dispatchEvent(&evt)
+ }
+}
+
+// SendPresence updates the user's presence status on WhatsApp.
+//
+// You should call this at least once after connecting so that the server has your pushname.
+// Otherwise, other users will see "-" as the name.
+func (cli *Client) SendPresence(state types.Presence) error {
+ if len(cli.Store.PushName) == 0 {
+ return ErrNoPushName
+ }
+ return cli.sendNode(waBinary.Node{
+ Tag: "presence",
+ Attrs: waBinary.Attrs{
+ "name": cli.Store.PushName,
+ "type": string(state),
+ },
+ })
+}
+
+// SubscribePresence asks the WhatsApp servers to send presence updates of a specific user to this client.
+//
+// After subscribing to this event, you should start receiving *events.Presence for that user in normal event handlers.
+//
+// Also, it seems that the WhatsApp servers require you to be online to receive presence status from other users,
+// so you should mark yourself as online before trying to use this function:
+// cli.SendPresence(types.PresenceAvailable)
+func (cli *Client) SubscribePresence(jid types.JID) error {
+ return cli.sendNode(waBinary.Node{
+ Tag: "presence",
+ Attrs: waBinary.Attrs{
+ "type": "subscribe",
+ "to": jid,
+ },
+ })
+}
+
+// SendChatPresence updates the user's typing status in a specific chat.
+func (cli *Client) SendChatPresence(state types.ChatPresence, jid types.JID) error {
+ return cli.sendNode(waBinary.Node{
+ Tag: "chatstate",
+ Attrs: waBinary.Attrs{
+ "from": *cli.Store.ID,
+ "to": jid,
+ },
+ Content: []waBinary.Node{{Tag: string(state)}},
+ })
+}
diff --git a/vendor/go.mau.fi/whatsmeow/privacysettings.go b/vendor/go.mau.fi/whatsmeow/privacysettings.go
new file mode 100644
index 00000000..3aca72dd
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/privacysettings.go
@@ -0,0 +1,93 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+// TryFetchPrivacySettings will fetch the user's privacy settings, either from the in-memory cache or from the server.
+func (cli *Client) TryFetchPrivacySettings(ignoreCache bool) (*types.PrivacySettings, error) {
+ if val := cli.privacySettingsCache.Load(); val != nil && !ignoreCache {
+ return val.(*types.PrivacySettings), nil
+ }
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "privacy",
+ Type: iqGet,
+ To: types.ServerJID,
+ Content: []waBinary.Node{{Tag: "privacy"}},
+ })
+ if err != nil {
+ return nil, err
+ }
+ privacyNode, ok := resp.GetOptionalChildByTag("privacy")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "privacy", In: "response to privacy settings query"}
+ }
+ var settings types.PrivacySettings
+ cli.parsePrivacySettings(&privacyNode, &settings)
+ cli.privacySettingsCache.Store(&settings)
+ return &settings, nil
+}
+
+// GetPrivacySettings will get the user's privacy settings. If an error occurs while fetching them, the error will be
+// logged, but the method will just return an empty struct.
+func (cli *Client) GetPrivacySettings() (settings types.PrivacySettings) {
+ settingsPtr, err := cli.TryFetchPrivacySettings(false)
+ if err != nil {
+ cli.Log.Errorf("Failed to fetch privacy settings: %v", err)
+ } else {
+ settings = *settingsPtr
+ }
+ return
+}
+
+func (cli *Client) parsePrivacySettings(privacyNode *waBinary.Node, settings *types.PrivacySettings) *events.PrivacySettings {
+ var evt events.PrivacySettings
+ for _, child := range privacyNode.GetChildren() {
+ if child.Tag != "category" {
+ continue
+ }
+ ag := child.AttrGetter()
+ name := ag.String("name")
+ value := types.PrivacySetting(ag.String("value"))
+ switch name {
+ case "groupadd":
+ settings.GroupAdd = value
+ evt.GroupAddChanged = true
+ case "last":
+ settings.LastSeen = value
+ evt.LastSeenChanged = true
+ case "status":
+ settings.Status = value
+ evt.StatusChanged = true
+ case "profile":
+ settings.Profile = value
+ evt.ProfileChanged = true
+ case "readreceipts":
+ settings.ReadReceipts = value
+ evt.ReadReceiptsChanged = true
+ }
+ }
+ return &evt
+}
+
+func (cli *Client) handlePrivacySettingsNotification(privacyNode *waBinary.Node) {
+ cli.Log.Debugf("Parsing privacy settings change notification")
+ settings, err := cli.TryFetchPrivacySettings(false)
+ if err != nil {
+ cli.Log.Errorf("Failed to fetch privacy settings when handling change: %v", err)
+ }
+ evt := cli.parsePrivacySettings(privacyNode, settings)
+ // The data isn't be reliable if the fetch failed, so only cache if it didn't fail
+ if err == nil {
+ cli.privacySettingsCache.Store(settings)
+ }
+ cli.dispatchEvent(evt)
+}
diff --git a/vendor/go.mau.fi/whatsmeow/qrchan.go b/vendor/go.mau.fi/whatsmeow/qrchan.go
new file mode 100644
index 00000000..c96b2188
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/qrchan.go
@@ -0,0 +1,168 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "context"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "go.mau.fi/whatsmeow/types/events"
+ waLog "go.mau.fi/whatsmeow/util/log"
+)
+
+type QRChannelItem struct {
+ // The type of event, "code" for new QR codes.
+ // For non-code/error events, you can just compare the whole item to the event variables (like QRChannelSuccess).
+ Event string
+ // If the item is a pair error, then this field contains the error message.
+ Error error
+ // If the item is a new code, then this field contains the raw data.
+ Code string
+ // The timeout after which the next code will be sent down the channel.
+ Timeout time.Duration
+}
+
+var (
+ // QRChannelSuccess is emitted from GetQRChannel when the pairing is successful.
+ QRChannelSuccess = QRChannelItem{Event: "success"}
+ // QRChannelTimeout is emitted from GetQRChannel if the socket gets disconnected by the server before the pairing is successful.
+ QRChannelTimeout = QRChannelItem{Event: "timeout"}
+ // QRChannelErrUnexpectedEvent is emitted from GetQRChannel if an unexpected connection event is received,
+ // as that likely means that the pairing has already happened before the channel was set up.
+ QRChannelErrUnexpectedEvent = QRChannelItem{Event: "err-unexpected-state"}
+ // QRChannelScannedWithoutMultidevice is emitted from GetQRChannel if events.QRScannedWithoutMultidevice is received.
+ QRChannelScannedWithoutMultidevice = QRChannelItem{Event: "err-scanned-without-multidevice"}
+)
+
+type qrChannel struct {
+ sync.Mutex
+ cli *Client
+ log waLog.Logger
+ ctx context.Context
+ handlerID uint32
+ closed uint32
+ output chan<- QRChannelItem
+ stopQRs chan struct{}
+}
+
+func (qrc *qrChannel) emitQRs(evt *events.QR) {
+ var nextCode string
+ for {
+ if len(evt.Codes) == 0 {
+ if atomic.CompareAndSwapUint32(&qrc.closed, 0, 1) {
+ qrc.log.Debugf("Ran out of QR codes, closing channel with status %s and disconnecting client", QRChannelTimeout)
+ qrc.output <- QRChannelTimeout
+ close(qrc.output)
+ go qrc.cli.RemoveEventHandler(qrc.handlerID)
+ qrc.cli.Disconnect()
+ } else {
+ qrc.log.Debugf("Ran out of QR codes, but channel is already closed")
+ }
+ return
+ } else if atomic.LoadUint32(&qrc.closed) == 1 {
+ qrc.log.Debugf("QR code channel is closed, exiting QR emitter")
+ return
+ }
+ timeout := 20 * time.Second
+ if len(evt.Codes) == 6 {
+ timeout = 60 * time.Second
+ }
+ nextCode, evt.Codes = evt.Codes[0], evt.Codes[1:]
+ qrc.log.Debugf("Emitting QR code %s", nextCode)
+ select {
+ case qrc.output <- QRChannelItem{Code: nextCode, Timeout: timeout, Event: "code"}:
+ default:
+ qrc.log.Debugf("Output channel didn't accept code, exiting QR emitter")
+ if atomic.CompareAndSwapUint32(&qrc.closed, 0, 1) {
+ close(qrc.output)
+ go qrc.cli.RemoveEventHandler(qrc.handlerID)
+ qrc.cli.Disconnect()
+ }
+ return
+ }
+ select {
+ case <-time.After(timeout):
+ case <-qrc.stopQRs:
+ qrc.log.Debugf("Got signal to stop QR emitter")
+ return
+ case <-qrc.ctx.Done():
+ qrc.log.Debugf("Context is done, stopping QR emitter")
+ if atomic.CompareAndSwapUint32(&qrc.closed, 0, 1) {
+ close(qrc.output)
+ go qrc.cli.RemoveEventHandler(qrc.handlerID)
+ qrc.cli.Disconnect()
+ }
+ }
+ }
+}
+
+func (qrc *qrChannel) handleEvent(rawEvt interface{}) {
+ if atomic.LoadUint32(&qrc.closed) == 1 {
+ qrc.log.Debugf("Dropping event of type %T, channel is closed", rawEvt)
+ return
+ }
+ var outputType QRChannelItem
+ switch evt := rawEvt.(type) {
+ case *events.QR:
+ qrc.log.Debugf("Received QR code event, starting to emit codes to channel")
+ go qrc.emitQRs(evt)
+ return
+ case *events.QRScannedWithoutMultidevice:
+ qrc.log.Debugf("QR code scanned without multidevice enabled")
+ qrc.output <- QRChannelScannedWithoutMultidevice
+ return
+ case *events.PairSuccess:
+ outputType = QRChannelSuccess
+ case *events.PairError:
+ outputType = QRChannelItem{
+ Event: "error",
+ Error: evt.Error,
+ }
+ case *events.Disconnected:
+ outputType = QRChannelTimeout
+ case *events.Connected, *events.ConnectFailure, *events.LoggedOut:
+ outputType = QRChannelErrUnexpectedEvent
+ default:
+ return
+ }
+ close(qrc.stopQRs)
+ if atomic.CompareAndSwapUint32(&qrc.closed, 0, 1) {
+ qrc.log.Debugf("Closing channel with status %+v", outputType)
+ qrc.output <- outputType
+ close(qrc.output)
+ } else {
+ qrc.log.Debugf("Got status %+v, but channel is already closed", outputType)
+ }
+ // Has to be done in background because otherwise there's a deadlock with eventHandlersLock
+ go qrc.cli.RemoveEventHandler(qrc.handlerID)
+}
+
+// GetQRChannel returns a channel that automatically outputs a new QR code when the previous one expires.
+//
+// This must be called *before* Connect(). It will then listen to all the relevant events from the client.
+//
+// The last value to be emitted will be a special string, either "success", "timeout" or "err-already-have-id",
+// depending on the result of the pairing. The channel will be closed immediately after one of those.
+func (cli *Client) GetQRChannel(ctx context.Context) (<-chan QRChannelItem, error) {
+ if cli.IsConnected() {
+ return nil, ErrQRAlreadyConnected
+ } else if cli.Store.ID != nil {
+ return nil, ErrQRStoreContainsID
+ }
+ ch := make(chan QRChannelItem, 8)
+ qrc := qrChannel{
+ output: ch,
+ stopQRs: make(chan struct{}),
+ cli: cli,
+ log: cli.Log.Sub("QRChannel"),
+ ctx: ctx,
+ }
+ qrc.handlerID = cli.AddEventHandler(qrc.handleEvent)
+ return ch, nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/receipt.go b/vendor/go.mau.fi/whatsmeow/receipt.go
new file mode 100644
index 00000000..dec03c5d
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/receipt.go
@@ -0,0 +1,148 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "fmt"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+func (cli *Client) handleReceipt(node *waBinary.Node) {
+ receipt, err := cli.parseReceipt(node)
+ if err != nil {
+ cli.Log.Warnf("Failed to parse receipt: %v", err)
+ } else {
+ if receipt.Type == events.ReceiptTypeRetry {
+ go func() {
+ err := cli.handleRetryReceipt(receipt, node)
+ if err != nil {
+ cli.Log.Errorf("Failed to handle retry receipt for %s/%s from %s: %v", receipt.Chat, receipt.MessageIDs[0], receipt.Sender, err)
+ }
+ }()
+ }
+ go cli.dispatchEvent(receipt)
+ }
+ go cli.sendAck(node)
+}
+
+func (cli *Client) parseReceipt(node *waBinary.Node) (*events.Receipt, error) {
+ ag := node.AttrGetter()
+ source, err := cli.parseMessageSource(node)
+ if err != nil {
+ return nil, err
+ }
+ receipt := events.Receipt{
+ MessageSource: source,
+ Timestamp: time.Unix(ag.Int64("t"), 0),
+ Type: events.ReceiptType(ag.OptionalString("type")),
+ }
+ mainMessageID := ag.String("id")
+ if !ag.OK() {
+ return nil, fmt.Errorf("failed to parse read receipt attrs: %+v", ag.Errors)
+ }
+
+ receiptChildren := node.GetChildren()
+ if len(receiptChildren) == 1 && receiptChildren[0].Tag == "list" {
+ listChildren := receiptChildren[0].GetChildren()
+ receipt.MessageIDs = make([]string, 1, len(listChildren)+1)
+ receipt.MessageIDs[0] = mainMessageID
+ for _, item := range listChildren {
+ if id, ok := item.Attrs["id"].(string); ok && item.Tag == "item" {
+ receipt.MessageIDs = append(receipt.MessageIDs, id)
+ }
+ }
+ } else {
+ receipt.MessageIDs = []types.MessageID{mainMessageID}
+ }
+ return &receipt, nil
+}
+
+func (cli *Client) sendAck(node *waBinary.Node) {
+ attrs := waBinary.Attrs{
+ "class": node.Tag,
+ "id": node.Attrs["id"],
+ }
+ attrs["to"] = node.Attrs["from"]
+ if participant, ok := node.Attrs["participant"]; ok {
+ attrs["participant"] = participant
+ }
+ if recipient, ok := node.Attrs["recipient"]; ok {
+ attrs["recipient"] = recipient
+ }
+ if receiptType, ok := node.Attrs["type"]; node.Tag != "message" && ok {
+ attrs["type"] = receiptType
+ }
+ err := cli.sendNode(waBinary.Node{
+ Tag: "ack",
+ Attrs: attrs,
+ })
+ if err != nil {
+ cli.Log.Warnf("Failed to send acknowledgement for %s %s: %v", node.Tag, node.Attrs["id"], err)
+ }
+}
+
+// MarkRead sends a read receipt for the given message IDs including the given timestamp as the read at time.
+//
+// The first JID parameter (chat) must always be set to the chat ID (user ID in DMs and group ID in group chats).
+// The second JID parameter (sender) must be set in group chats and must be the user ID who sent the message.
+func (cli *Client) MarkRead(ids []types.MessageID, timestamp time.Time, chat, sender types.JID) error {
+ node := waBinary.Node{
+ Tag: "receipt",
+ Attrs: waBinary.Attrs{
+ "id": ids[0],
+ "type": "read",
+ "to": chat,
+ "t": timestamp.Unix(),
+ },
+ }
+ if cli.GetPrivacySettings().ReadReceipts == types.PrivacySettingNone {
+ node.Attrs["type"] = "read-self"
+ }
+ if !sender.IsEmpty() && chat.Server != types.DefaultUserServer {
+ node.Attrs["participant"] = sender.ToNonAD()
+ }
+ if len(ids) > 1 {
+ children := make([]waBinary.Node, len(ids)-1)
+ for i := 1; i < len(ids); i++ {
+ children[i-1].Tag = "item"
+ children[i-1].Attrs = waBinary.Attrs{"id": ids[i]}
+ }
+ node.Content = []waBinary.Node{{
+ Tag: "list",
+ Content: children,
+ }}
+ }
+ return cli.sendNode(node)
+}
+
+func (cli *Client) sendMessageReceipt(info *types.MessageInfo) {
+ attrs := waBinary.Attrs{
+ "id": info.ID,
+ }
+ if info.IsFromMe {
+ attrs["type"] = "sender"
+ } else {
+ attrs["type"] = "inactive"
+ }
+ attrs["to"] = info.Chat
+ if info.IsGroup {
+ attrs["participant"] = info.Sender
+ } else if info.IsFromMe {
+ attrs["recipient"] = info.Sender
+ }
+ err := cli.sendNode(waBinary.Node{
+ Tag: "receipt",
+ Attrs: attrs,
+ })
+ if err != nil {
+ cli.Log.Warnf("Failed to send receipt for %s: %v", info.ID, err)
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/request.go b/vendor/go.mau.fi/whatsmeow/request.go
new file mode 100644
index 00000000..62ef3477
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/request.go
@@ -0,0 +1,141 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "context"
+ "strconv"
+ "sync/atomic"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+)
+
+func (cli *Client) generateRequestID() string {
+ return cli.uniqueID + strconv.FormatUint(uint64(atomic.AddUint32(&cli.idCounter, 1)), 10)
+}
+
+var closedNode = &waBinary.Node{Tag: "xmlstreamend"}
+
+func (cli *Client) clearResponseWaiters() {
+ cli.responseWaitersLock.Lock()
+ for _, waiter := range cli.responseWaiters {
+ select {
+ case waiter <- closedNode:
+ default:
+ close(waiter)
+ }
+ }
+ cli.responseWaiters = make(map[string]chan<- *waBinary.Node)
+ cli.responseWaitersLock.Unlock()
+}
+
+func (cli *Client) waitResponse(reqID string) chan *waBinary.Node {
+ ch := make(chan *waBinary.Node, 1)
+ cli.responseWaitersLock.Lock()
+ cli.responseWaiters[reqID] = ch
+ cli.responseWaitersLock.Unlock()
+ return ch
+}
+
+func (cli *Client) cancelResponse(reqID string, ch chan *waBinary.Node) {
+ cli.responseWaitersLock.Lock()
+ close(ch)
+ delete(cli.responseWaiters, reqID)
+ cli.responseWaitersLock.Unlock()
+}
+
+func (cli *Client) receiveResponse(data *waBinary.Node) bool {
+ id, ok := data.Attrs["id"].(string)
+ if !ok || (data.Tag != "iq" && data.Tag != "ack") {
+ return false
+ }
+ cli.responseWaitersLock.Lock()
+ waiter, ok := cli.responseWaiters[id]
+ if !ok {
+ cli.responseWaitersLock.Unlock()
+ return false
+ }
+ delete(cli.responseWaiters, id)
+ cli.responseWaitersLock.Unlock()
+ waiter <- data
+ return true
+}
+
+type infoQueryType string
+
+const (
+ iqSet infoQueryType = "set"
+ iqGet infoQueryType = "get"
+)
+
+type infoQuery struct {
+ Namespace string
+ Type infoQueryType
+ To types.JID
+ ID string
+ Content interface{}
+
+ Timeout time.Duration
+ Context context.Context
+}
+
+func (cli *Client) sendIQAsync(query infoQuery) (<-chan *waBinary.Node, error) {
+ if len(query.ID) == 0 {
+ query.ID = cli.generateRequestID()
+ }
+ waiter := cli.waitResponse(query.ID)
+ attrs := waBinary.Attrs{
+ "id": query.ID,
+ "xmlns": query.Namespace,
+ "type": string(query.Type),
+ }
+ if !query.To.IsEmpty() {
+ attrs["to"] = query.To
+ }
+ err := cli.sendNode(waBinary.Node{
+ Tag: "iq",
+ Attrs: attrs,
+ Content: query.Content,
+ })
+ if err != nil {
+ cli.cancelResponse(query.ID, waiter)
+ return nil, err
+ }
+ return waiter, nil
+}
+
+func (cli *Client) sendIQ(query infoQuery) (*waBinary.Node, error) {
+ resChan, err := cli.sendIQAsync(query)
+ if err != nil {
+ return nil, err
+ }
+ if query.Timeout == 0 {
+ query.Timeout = 1 * time.Minute
+ }
+ if query.Context == nil {
+ query.Context = context.Background()
+ }
+ select {
+ case res := <-resChan:
+ if res == closedNode {
+ return nil, ErrIQDisconnected
+ }
+ resType, _ := res.Attrs["type"].(string)
+ if res.Tag != "iq" || (resType != "result" && resType != "error") {
+ return res, &IQError{RawNode: res}
+ } else if resType == "error" {
+ return res, parseIQError(res)
+ }
+ return res, nil
+ case <-query.Context.Done():
+ return nil, query.Context.Err()
+ case <-time.After(query.Timeout):
+ return nil, ErrIQTimedOut
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/retry.go b/vendor/go.mau.fi/whatsmeow/retry.go
new file mode 100644
index 00000000..5cc460f9
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/retry.go
@@ -0,0 +1,264 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "encoding/binary"
+ "fmt"
+ "time"
+
+ "go.mau.fi/libsignal/ecc"
+ "go.mau.fi/libsignal/groups"
+ "go.mau.fi/libsignal/keys/prekey"
+ "go.mau.fi/libsignal/protocol"
+ "google.golang.org/protobuf/proto"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+// Number of sent messages to cache in memory for handling retry receipts.
+const recentMessagesSize = 256
+
+type recentMessageKey struct {
+ To types.JID
+ ID types.MessageID
+}
+
+// RecentMessage contains the info needed to re-send a message when another device fails to decrypt it.
+type RecentMessage struct {
+ Proto *waProto.Message
+ Timestamp time.Time
+}
+
+func (cli *Client) addRecentMessage(to types.JID, id types.MessageID, message *waProto.Message) {
+ cli.recentMessagesLock.Lock()
+ key := recentMessageKey{to, id}
+ if cli.recentMessagesList[cli.recentMessagesPtr].ID != "" {
+ delete(cli.recentMessagesMap, cli.recentMessagesList[cli.recentMessagesPtr])
+ }
+ cli.recentMessagesMap[key] = message
+ cli.recentMessagesList[cli.recentMessagesPtr] = key
+ cli.recentMessagesPtr++
+ if cli.recentMessagesPtr >= len(cli.recentMessagesList) {
+ cli.recentMessagesPtr = 0
+ }
+ cli.recentMessagesLock.Unlock()
+}
+
+func (cli *Client) getRecentMessage(to types.JID, id types.MessageID) *waProto.Message {
+ cli.recentMessagesLock.RLock()
+ msg, _ := cli.recentMessagesMap[recentMessageKey{to, id}]
+ cli.recentMessagesLock.RUnlock()
+ return msg
+}
+
+func (cli *Client) getMessageForRetry(receipt *events.Receipt, messageID types.MessageID) (*waProto.Message, error) {
+ msg := cli.getRecentMessage(receipt.Chat, messageID)
+ if msg == nil {
+ msg = cli.GetMessageForRetry(receipt.Chat, messageID)
+ if msg == nil {
+ return nil, fmt.Errorf("couldn't find message %s", messageID)
+ } else {
+ cli.Log.Debugf("Found message in GetMessageForRetry to accept retry receipt for %s/%s from %s", receipt.Chat, messageID, receipt.Sender)
+ }
+ } else {
+ cli.Log.Debugf("Found message in local cache to accept retry receipt for %s/%s from %s", receipt.Chat, messageID, receipt.Sender)
+ }
+ return proto.Clone(msg).(*waProto.Message), nil
+}
+
+// handleRetryReceipt handles an incoming retry receipt for an outgoing message.
+func (cli *Client) handleRetryReceipt(receipt *events.Receipt, node *waBinary.Node) error {
+ retryChild, ok := node.GetOptionalChildByTag("retry")
+ if !ok {
+ return &ElementMissingError{Tag: "retry", In: "retry receipt"}
+ }
+ ag := retryChild.AttrGetter()
+ messageID := ag.String("id")
+ timestamp := time.Unix(ag.Int64("t"), 0)
+ retryCount := ag.Int("count")
+ if !ag.OK() {
+ return ag.Error()
+ }
+ msg, err := cli.getMessageForRetry(receipt, messageID)
+ if err != nil {
+ return err
+ }
+
+ if receipt.IsGroup {
+ builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer)
+ senderKeyName := protocol.NewSenderKeyName(receipt.Chat.String(), cli.Store.ID.SignalAddress())
+ signalSKDMessage, err := builder.Create(senderKeyName)
+ if err != nil {
+ cli.Log.Warnf("Failed to create sender key distribution message to include in retry of %s in %s to %s: %v", messageID, receipt.Chat, receipt.Sender, err)
+ } else {
+ msg.SenderKeyDistributionMessage = &waProto.SenderKeyDistributionMessage{
+ GroupId: proto.String(receipt.Chat.String()),
+ AxolotlSenderKeyDistributionMessage: signalSKDMessage.Serialize(),
+ }
+ }
+ } else if receipt.IsFromMe {
+ msg = &waProto.Message{
+ DeviceSentMessage: &waProto.DeviceSentMessage{
+ DestinationJid: proto.String(receipt.Chat.String()),
+ Message: msg,
+ },
+ }
+ }
+
+ if cli.PreRetryCallback != nil && !cli.PreRetryCallback(receipt, retryCount, msg) {
+ cli.Log.Debugf("Cancelled retry receipt in PreRetryCallback")
+ return nil
+ }
+
+ plaintext, err := proto.Marshal(msg)
+ if err != nil {
+ return fmt.Errorf("failed to marshal message: %w", err)
+ }
+ _, hasKeys := node.GetOptionalChildByTag("keys")
+ var bundle *prekey.Bundle
+ if hasKeys {
+ bundle, err = nodeToPreKeyBundle(uint32(receipt.Sender.Device), *node)
+ if err != nil {
+ return fmt.Errorf("failed to read prekey bundle in retry receipt: %w", err)
+ }
+ } else if retryCount >= 2 || !cli.Store.ContainsSession(receipt.Sender.SignalAddress()) {
+ if retryCount >= 2 {
+ cli.Log.Debugf("Fetching prekeys for %s due to retry receipt with count>1 but no prekey bundle", receipt.Sender)
+ } else {
+ cli.Log.Debugf("Fetching prekeys for %s for handling retry receipt because we don't have a Signal session with them", receipt.Sender)
+ }
+ var keys map[types.JID]preKeyResp
+ keys, err = cli.fetchPreKeys([]types.JID{receipt.Sender})
+ if err != nil {
+ return err
+ }
+ senderAD := receipt.Sender
+ senderAD.AD = true
+ bundle, err = keys[senderAD].bundle, keys[senderAD].err
+ if err != nil {
+ return fmt.Errorf("failed to fetch prekeys: %w", err)
+ } else if bundle == nil {
+ return fmt.Errorf("didn't get prekey bundle for %s (response size: %d)", senderAD, len(keys))
+ }
+ }
+ encrypted, includeDeviceIdentity, err := cli.encryptMessageForDevice(plaintext, receipt.Sender, bundle)
+ if err != nil {
+ return fmt.Errorf("failed to encrypt message for retry: %w", err)
+ }
+ encrypted.Attrs["count"] = retryCount
+
+ attrs := waBinary.Attrs{
+ "to": node.Attrs["from"],
+ "type": "text",
+ "id": messageID,
+ "t": timestamp.Unix(),
+ }
+ if participant, ok := node.Attrs["participant"]; ok {
+ attrs["participant"] = participant
+ }
+ if recipient, ok := node.Attrs["recipient"]; ok {
+ attrs["recipient"] = recipient
+ }
+ if edit, ok := node.Attrs["edit"]; ok {
+ attrs["edit"] = edit
+ }
+ req := waBinary.Node{
+ Tag: "message",
+ Attrs: attrs,
+ Content: []waBinary.Node{*encrypted},
+ }
+ if includeDeviceIdentity {
+ err = cli.appendDeviceIdentityNode(&req)
+ if err != nil {
+ return fmt.Errorf("failed to add device identity to retry message: %w", err)
+ }
+ }
+ err = cli.sendNode(req)
+ if err != nil {
+ return fmt.Errorf("failed to send retry message: %w", err)
+ }
+ cli.Log.Debugf("Sent retry #%d for %s/%s to %s", retryCount, receipt.Chat, messageID, receipt.Sender)
+ return nil
+}
+
+// sendRetryReceipt sends a retry receipt for an incoming message.
+func (cli *Client) sendRetryReceipt(node *waBinary.Node, forceIncludeIdentity bool) {
+ id, _ := node.Attrs["id"].(string)
+ children := node.GetChildren()
+ var retryCountInMsg int
+ if len(children) == 1 && children[0].Tag == "enc" {
+ retryCountInMsg = children[0].AttrGetter().OptionalInt("count")
+ }
+
+ cli.messageRetriesLock.Lock()
+ cli.messageRetries[id]++
+ retryCount := cli.messageRetries[id]
+ // In case the message is a retry response, and we restarted in between, find the count from the message
+ if retryCount == 1 && retryCountInMsg > 0 {
+ retryCount = retryCountInMsg + 1
+ cli.messageRetries[id] = retryCount
+ }
+ cli.messageRetriesLock.Unlock()
+ if retryCount >= 5 {
+ cli.Log.Warnf("Not sending any more retry receipts for %s", id)
+ return
+ }
+
+ var registrationIDBytes [4]byte
+ binary.BigEndian.PutUint32(registrationIDBytes[:], cli.Store.RegistrationID)
+ attrs := waBinary.Attrs{
+ "id": id,
+ "type": "retry",
+ "to": node.Attrs["from"],
+ }
+ if recipient, ok := node.Attrs["recipient"]; ok {
+ attrs["recipient"] = recipient
+ }
+ if participant, ok := node.Attrs["participant"]; ok {
+ attrs["participant"] = participant
+ }
+ payload := waBinary.Node{
+ Tag: "receipt",
+ Attrs: attrs,
+ Content: []waBinary.Node{
+ {Tag: "retry", Attrs: waBinary.Attrs{
+ "count": retryCount,
+ "id": id,
+ "t": node.Attrs["t"],
+ "v": 1,
+ }},
+ {Tag: "registration", Content: registrationIDBytes[:]},
+ },
+ }
+ if retryCount > 1 || forceIncludeIdentity {
+ if key, err := cli.Store.PreKeys.GenOnePreKey(); err != nil {
+ cli.Log.Errorf("Failed to get prekey for retry receipt: %v", err)
+ } else if deviceIdentity, err := proto.Marshal(cli.Store.Account); err != nil {
+ cli.Log.Errorf("Failed to marshal account info: %v", err)
+ return
+ } else {
+ payload.Content = append(payload.GetChildren(), waBinary.Node{
+ Tag: "keys",
+ Content: []waBinary.Node{
+ {Tag: "type", Content: []byte{ecc.DjbType}},
+ {Tag: "identity", Content: cli.Store.IdentityKey.Pub[:]},
+ preKeyToNode(key),
+ preKeyToNode(cli.Store.SignedPreKey),
+ {Tag: "device-identity", Content: deviceIdentity},
+ },
+ })
+ }
+ }
+ err := cli.sendNode(payload)
+ if err != nil {
+ cli.Log.Errorf("Failed to send retry receipt for %s: %v", id, err)
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/send.go b/vendor/go.mau.fi/whatsmeow/send.go
new file mode 100644
index 00000000..fb4653e2
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/send.go
@@ -0,0 +1,357 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/base64"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "sort"
+ "strings"
+ "time"
+
+ "google.golang.org/protobuf/proto"
+
+ "go.mau.fi/libsignal/groups"
+ "go.mau.fi/libsignal/keys/prekey"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/session"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+)
+
+// GenerateMessageID generates a random string that can be used as a message ID on WhatsApp.
+func GenerateMessageID() types.MessageID {
+ id := make([]byte, 16)
+ _, err := rand.Read(id)
+ if err != nil {
+ // Out of entropy
+ panic(err)
+ }
+ return strings.ToUpper(hex.EncodeToString(id))
+}
+
+// SendMessage sends the given message.
+//
+// If the message ID is not provided, a random message ID will be generated.
+//
+// This method will wait for the server to acknowledge the message before returning.
+// The return value is the timestamp of the message from the server.
+func (cli *Client) SendMessage(to types.JID, id types.MessageID, message *waProto.Message) (time.Time, error) {
+ if to.AD {
+ return time.Time{}, ErrRecipientADJID
+ }
+
+ if len(id) == 0 {
+ id = GenerateMessageID()
+ }
+
+ cli.addRecentMessage(to, id, message)
+ respChan := cli.waitResponse(id)
+ var err error
+ var phash string
+ switch to.Server {
+ case types.GroupServer:
+ phash, err = cli.sendGroup(to, id, message)
+ case types.DefaultUserServer:
+ err = cli.sendDM(to, id, message)
+ case types.BroadcastServer:
+ err = ErrBroadcastListUnsupported
+ default:
+ err = fmt.Errorf("%w %s", ErrUnknownServer, to.Server)
+ }
+ if err != nil {
+ cli.cancelResponse(id, respChan)
+ return time.Time{}, err
+ }
+ resp := <-respChan
+ if resp == closedNode {
+ return time.Time{}, ErrSendDisconnected
+ }
+ ag := resp.AttrGetter()
+ ts := time.Unix(ag.Int64("t"), 0)
+ expectedPHash := ag.OptionalString("phash")
+ if len(expectedPHash) > 0 && phash != expectedPHash {
+ cli.Log.Warnf("Server returned different participant list hash when sending to %s. Some devices may not have received the message.", to)
+ // TODO also invalidate device list caches
+ cli.groupParticipantsCacheLock.Lock()
+ delete(cli.groupParticipantsCache, to)
+ cli.groupParticipantsCacheLock.Unlock()
+ }
+ return ts, nil
+}
+
+// RevokeMessage deletes the given message from everyone in the chat.
+// You can only revoke your own messages, and if the message is too old, then other users will ignore the deletion.
+//
+// This method will wait for the server to acknowledge the revocation message before returning.
+// The return value is the timestamp of the message from the server.
+func (cli *Client) RevokeMessage(chat types.JID, id types.MessageID) (time.Time, error) {
+ return cli.SendMessage(chat, cli.generateRequestID(), &waProto.Message{
+ ProtocolMessage: &waProto.ProtocolMessage{
+ Type: waProto.ProtocolMessage_REVOKE.Enum(),
+ Key: &waProto.MessageKey{
+ FromMe: proto.Bool(true),
+ Id: proto.String(id),
+ RemoteJid: proto.String(chat.String()),
+ },
+ },
+ })
+}
+
+func participantListHashV2(participants []types.JID) string {
+ participantsStrings := make([]string, len(participants))
+ for i, part := range participants {
+ participantsStrings[i] = part.String()
+ }
+
+ sort.Strings(participantsStrings)
+ hash := sha256.Sum256([]byte(strings.Join(participantsStrings, "")))
+ return fmt.Sprintf("2:%s", base64.RawStdEncoding.EncodeToString(hash[:6]))
+}
+
+func (cli *Client) sendGroup(to types.JID, id types.MessageID, message *waProto.Message) (string, error) {
+ participants, err := cli.getGroupMembers(to)
+ if err != nil {
+ return "", fmt.Errorf("failed to get group members: %w", err)
+ }
+
+ plaintext, _, err := marshalMessage(to, message)
+ if err != nil {
+ return "", err
+ }
+
+ builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer)
+ senderKeyName := protocol.NewSenderKeyName(to.String(), cli.Store.ID.SignalAddress())
+ signalSKDMessage, err := builder.Create(senderKeyName)
+ if err != nil {
+ return "", fmt.Errorf("failed to create sender key distribution message to send %s to %s: %w", id, to, err)
+ }
+ skdMessage := &waProto.Message{
+ SenderKeyDistributionMessage: &waProto.SenderKeyDistributionMessage{
+ GroupId: proto.String(to.String()),
+ AxolotlSenderKeyDistributionMessage: signalSKDMessage.Serialize(),
+ },
+ }
+ skdPlaintext, err := proto.Marshal(skdMessage)
+ if err != nil {
+ return "", fmt.Errorf("failed to marshal sender key distribution message to send %s to %s: %w", id, to, err)
+ }
+
+ cipher := groups.NewGroupCipher(builder, senderKeyName, cli.Store)
+ encrypted, err := cipher.Encrypt(padMessage(plaintext))
+ if err != nil {
+ return "", fmt.Errorf("failed to encrypt group message to send %s to %s: %w", id, to, err)
+ }
+ ciphertext := encrypted.SignedSerialize()
+
+ node, allDevices, err := cli.prepareMessageNode(to, id, message, participants, skdPlaintext, nil)
+ if err != nil {
+ return "", err
+ }
+
+ phash := participantListHashV2(allDevices)
+ node.Attrs["phash"] = phash
+ node.Content = append(node.GetChildren(), waBinary.Node{
+ Tag: "enc",
+ Content: ciphertext,
+ Attrs: waBinary.Attrs{"v": "2", "type": "skmsg"},
+ })
+
+ err = cli.sendNode(*node)
+ if err != nil {
+ return "", fmt.Errorf("failed to send message node: %w", err)
+ }
+ return phash, nil
+}
+
+func (cli *Client) sendDM(to types.JID, id types.MessageID, message *waProto.Message) error {
+ messagePlaintext, deviceSentMessagePlaintext, err := marshalMessage(to, message)
+ if err != nil {
+ return err
+ }
+
+ node, _, err := cli.prepareMessageNode(to, id, message, []types.JID{to, *cli.Store.ID}, messagePlaintext, deviceSentMessagePlaintext)
+ if err != nil {
+ return err
+ }
+ err = cli.sendNode(*node)
+ if err != nil {
+ return fmt.Errorf("failed to send message node: %w", err)
+ }
+ return nil
+}
+
+func (cli *Client) prepareMessageNode(to types.JID, id types.MessageID, message *waProto.Message, participants []types.JID, plaintext, dsmPlaintext []byte) (*waBinary.Node, []types.JID, error) {
+ allDevices, err := cli.GetUserDevices(participants)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to get device list: %w", err)
+ }
+ participantNodes, includeIdentity := cli.encryptMessageForDevices(allDevices, id, plaintext, dsmPlaintext)
+
+ node := waBinary.Node{
+ Tag: "message",
+ Attrs: waBinary.Attrs{
+ "id": id,
+ "type": "text",
+ "to": to,
+ },
+ Content: []waBinary.Node{{
+ Tag: "participants",
+ Content: participantNodes,
+ }},
+ }
+ if message.ProtocolMessage != nil && message.GetProtocolMessage().GetType() == waProto.ProtocolMessage_REVOKE {
+ node.Attrs["edit"] = "7"
+ }
+ if includeIdentity {
+ err := cli.appendDeviceIdentityNode(&node)
+ if err != nil {
+ return nil, nil, err
+ }
+ }
+ return &node, allDevices, nil
+}
+
+func marshalMessage(to types.JID, message *waProto.Message) (plaintext, dsmPlaintext []byte, err error) {
+ plaintext, err = proto.Marshal(message)
+ if err != nil {
+ err = fmt.Errorf("failed to marshal message: %w", err)
+ return
+ }
+
+ if to.Server != types.GroupServer {
+ dsmPlaintext, err = proto.Marshal(&waProto.Message{
+ DeviceSentMessage: &waProto.DeviceSentMessage{
+ DestinationJid: proto.String(to.String()),
+ Message: message,
+ },
+ })
+ if err != nil {
+ err = fmt.Errorf("failed to marshal message (for own devices): %w", err)
+ return
+ }
+ }
+
+ return
+}
+
+func (cli *Client) appendDeviceIdentityNode(node *waBinary.Node) error {
+ deviceIdentity, err := proto.Marshal(cli.Store.Account)
+ if err != nil {
+ return fmt.Errorf("failed to marshal device identity: %w", err)
+ }
+ node.Content = append(node.GetChildren(), waBinary.Node{
+ Tag: "device-identity",
+ Content: deviceIdentity,
+ })
+ return nil
+}
+
+func (cli *Client) encryptMessageForDevices(allDevices []types.JID, id string, msgPlaintext, dsmPlaintext []byte) ([]waBinary.Node, bool) {
+ includeIdentity := false
+ participantNodes := make([]waBinary.Node, 0, len(allDevices))
+ var retryDevices []types.JID
+ for _, jid := range allDevices {
+ plaintext := msgPlaintext
+ if jid.User == cli.Store.ID.User && dsmPlaintext != nil {
+ if jid == *cli.Store.ID {
+ continue
+ }
+ plaintext = dsmPlaintext
+ }
+ encrypted, isPreKey, err := cli.encryptMessageForDeviceAndWrap(plaintext, jid, nil)
+ if errors.Is(err, ErrNoSession) {
+ retryDevices = append(retryDevices, jid)
+ continue
+ } else if err != nil {
+ cli.Log.Warnf("Failed to encrypt %s for %s: %v", id, jid, err)
+ continue
+ }
+ participantNodes = append(participantNodes, *encrypted)
+ if isPreKey {
+ includeIdentity = true
+ }
+ }
+ if len(retryDevices) > 0 {
+ bundles, err := cli.fetchPreKeys(retryDevices)
+ if err != nil {
+ cli.Log.Warnf("Failed to fetch prekeys for %d to retry encryption: %v", retryDevices, err)
+ } else {
+ for _, jid := range retryDevices {
+ resp := bundles[jid]
+ if resp.err != nil {
+ cli.Log.Warnf("Failed to fetch prekey for %s: %v", jid, resp.err)
+ continue
+ }
+ plaintext := msgPlaintext
+ if jid.User == cli.Store.ID.User && dsmPlaintext != nil {
+ plaintext = dsmPlaintext
+ }
+ encrypted, isPreKey, err := cli.encryptMessageForDeviceAndWrap(plaintext, jid, resp.bundle)
+ if err != nil {
+ cli.Log.Warnf("Failed to encrypt %s for %s (retry): %v", id, jid, err)
+ continue
+ }
+ participantNodes = append(participantNodes, *encrypted)
+ if isPreKey {
+ includeIdentity = true
+ }
+ }
+ }
+ }
+ return participantNodes, includeIdentity
+}
+
+func (cli *Client) encryptMessageForDeviceAndWrap(plaintext []byte, to types.JID, bundle *prekey.Bundle) (*waBinary.Node, bool, error) {
+ node, includeDeviceIdentity, err := cli.encryptMessageForDevice(plaintext, to, bundle)
+ if err != nil {
+ return nil, false, err
+ }
+ return &waBinary.Node{
+ Tag: "to",
+ Attrs: waBinary.Attrs{"jid": to},
+ Content: []waBinary.Node{*node},
+ }, includeDeviceIdentity, nil
+}
+
+func (cli *Client) encryptMessageForDevice(plaintext []byte, to types.JID, bundle *prekey.Bundle) (*waBinary.Node, bool, error) {
+ builder := session.NewBuilderFromSignal(cli.Store, to.SignalAddress(), pbSerializer)
+ if bundle != nil {
+ cli.Log.Debugf("Processing prekey bundle for %s", to)
+ err := builder.ProcessBundle(bundle)
+ if err != nil {
+ return nil, false, fmt.Errorf("failed to process prekey bundle: %w", err)
+ }
+ } else if !cli.Store.ContainsSession(to.SignalAddress()) {
+ return nil, false, ErrNoSession
+ }
+ cipher := session.NewCipher(builder, to.SignalAddress())
+ ciphertext, err := cipher.Encrypt(padMessage(plaintext))
+ if err != nil {
+ return nil, false, fmt.Errorf("cipher encryption failed: %w", err)
+ }
+
+ encType := "msg"
+ if ciphertext.Type() == protocol.PREKEY_TYPE {
+ encType = "pkmsg"
+ }
+
+ return &waBinary.Node{
+ Tag: "enc",
+ Attrs: waBinary.Attrs{
+ "v": "2",
+ "type": encType,
+ },
+ Content: ciphertext.Serialize(),
+ }, encType == "pkmsg", nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/socket/constants.go b/vendor/go.mau.fi/whatsmeow/socket/constants.go
new file mode 100644
index 00000000..88e9a90b
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/socket/constants.go
@@ -0,0 +1,40 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package socket implements a subset of the Noise protocol framework on top of websockets as used by WhatsApp.
+//
+// There shouldn't be any need to manually interact with this package.
+// The Client struct in the top-level whatsmeow package handles everything.
+package socket
+
+import "errors"
+
+const (
+ // Origin is the Origin header for all WhatsApp websocket connections
+ Origin = "https://web.whatsapp.com"
+ // URL is the websocket URL for the new multidevice protocol
+ URL = "wss://web.whatsapp.com/ws/chat"
+)
+
+const (
+ NoiseStartPattern = "Noise_XX_25519_AESGCM_SHA256\x00\x00\x00\x00"
+
+ WADictVersion = 2
+ WAMagicValue = 5
+)
+
+var WAConnHeader = []byte{'W', 'A', WAMagicValue, WADictVersion}
+
+const (
+ FrameMaxSize = 2 << 23
+ FrameLengthSize = 3
+)
+
+var (
+ ErrFrameTooLarge = errors.New("frame too large")
+ ErrSocketClosed = errors.New("frame socket is closed")
+ ErrSocketAlreadyOpen = errors.New("frame socket is already open")
+)
diff --git a/vendor/go.mau.fi/whatsmeow/socket/framesocket.go b/vendor/go.mau.fi/whatsmeow/socket/framesocket.go
new file mode 100644
index 00000000..2bcb21b5
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/socket/framesocket.go
@@ -0,0 +1,228 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package socket
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "sync"
+ "time"
+
+ "github.com/gorilla/websocket"
+
+ waLog "go.mau.fi/whatsmeow/util/log"
+)
+
+type FrameSocket struct {
+ conn *websocket.Conn
+ ctx context.Context
+ cancel func()
+ log waLog.Logger
+ lock sync.Mutex
+
+ Frames chan []byte
+ OnDisconnect func(remote bool)
+ WriteTimeout time.Duration
+
+ Header []byte
+
+ incomingLength int
+ receivedLength int
+ incoming []byte
+ partialHeader []byte
+}
+
+func NewFrameSocket(log waLog.Logger, header []byte) *FrameSocket {
+ return &FrameSocket{
+ conn: nil,
+ log: log,
+ Header: header,
+ Frames: make(chan []byte),
+ }
+}
+
+func (fs *FrameSocket) IsConnected() bool {
+ return fs.conn != nil
+}
+
+func (fs *FrameSocket) Context() context.Context {
+ return fs.ctx
+}
+
+func (fs *FrameSocket) Close(code int) {
+ fs.lock.Lock()
+ defer fs.lock.Unlock()
+
+ if fs.conn == nil {
+ return
+ }
+
+ if code > 0 {
+ message := websocket.FormatCloseMessage(code, "")
+ err := fs.conn.WriteControl(websocket.CloseMessage, message, time.Now().Add(time.Second))
+ if err != nil {
+ fs.log.Warnf("Error sending close message: %v", err)
+ }
+ }
+
+ fs.cancel()
+ err := fs.conn.Close()
+ if err != nil {
+ fs.log.Errorf("Error closing websocket: %v", err)
+ }
+ fs.conn = nil
+ fs.ctx = nil
+ fs.cancel = nil
+ if fs.OnDisconnect != nil {
+ go fs.OnDisconnect(code == 0)
+ }
+}
+
+func (fs *FrameSocket) Connect() error {
+ fs.lock.Lock()
+ defer fs.lock.Unlock()
+
+ if fs.conn != nil {
+ return ErrSocketAlreadyOpen
+ }
+ ctx, cancel := context.WithCancel(context.Background())
+ dialer := websocket.Dialer{}
+
+ headers := http.Header{"Origin": []string{Origin}}
+ fs.log.Debugf("Dialing %s", URL)
+ conn, _, err := dialer.Dial(URL, headers)
+ if err != nil {
+ cancel()
+ return fmt.Errorf("couldn't dial whatsapp web websocket: %w", err)
+ }
+
+ fs.ctx, fs.cancel = ctx, cancel
+ fs.conn = conn
+ conn.SetCloseHandler(func(code int, text string) error {
+ fs.log.Debugf("Server closed websocket with status %d/%s", code, text)
+ cancel()
+ // from default CloseHandler
+ message := websocket.FormatCloseMessage(code, "")
+ _ = conn.WriteControl(websocket.CloseMessage, message, time.Now().Add(time.Second))
+ return nil
+ })
+
+ go fs.readPump(conn, ctx)
+ return nil
+}
+
+func (fs *FrameSocket) SendFrame(data []byte) error {
+ conn := fs.conn
+ if conn == nil {
+ return ErrSocketClosed
+ }
+ dataLength := len(data)
+ if dataLength >= FrameMaxSize {
+ return fmt.Errorf("%w (got %d bytes, max %d bytes)", ErrFrameTooLarge, len(data), FrameMaxSize)
+ }
+
+ headerLength := len(fs.Header)
+ // Whole frame is header + 3 bytes for length + data
+ wholeFrame := make([]byte, headerLength+FrameLengthSize+dataLength)
+
+ // Copy the header if it's there
+ if fs.Header != nil {
+ copy(wholeFrame[:headerLength], fs.Header)
+ // We only want to send the header once
+ fs.Header = nil
+ }
+
+ // Encode length of frame
+ wholeFrame[headerLength] = byte(dataLength >> 16)
+ wholeFrame[headerLength+1] = byte(dataLength >> 8)
+ wholeFrame[headerLength+2] = byte(dataLength)
+
+ // Copy actual frame data
+ copy(wholeFrame[headerLength+FrameLengthSize:], data)
+
+ if fs.WriteTimeout > 0 {
+ err := conn.SetWriteDeadline(time.Now().Add(fs.WriteTimeout))
+ if err != nil {
+ fs.log.Warnf("Failed to set write deadline: %v", err)
+ }
+ }
+ return conn.WriteMessage(websocket.BinaryMessage, wholeFrame)
+}
+
+func (fs *FrameSocket) frameComplete() {
+ data := fs.incoming
+ fs.incoming = nil
+ fs.partialHeader = nil
+ fs.incomingLength = 0
+ fs.receivedLength = 0
+ fs.Frames <- data
+}
+
+func (fs *FrameSocket) processData(msg []byte) {
+ for len(msg) > 0 {
+ // This probably doesn't happen a lot (if at all), so the code is unoptimized
+ if fs.partialHeader != nil {
+ msg = append(fs.partialHeader, msg...)
+ fs.partialHeader = nil
+ }
+ if fs.incoming == nil {
+ if len(msg) >= FrameLengthSize {
+ length := (int(msg[0]) << 16) + (int(msg[1]) << 8) + int(msg[2])
+ fs.incomingLength = length
+ fs.receivedLength = len(msg)
+ msg = msg[FrameLengthSize:]
+ if len(msg) >= length {
+ fs.incoming = msg[:length]
+ msg = msg[length:]
+ fs.frameComplete()
+ } else {
+ fs.incoming = make([]byte, length)
+ copy(fs.incoming, msg)
+ msg = nil
+ }
+ } else {
+ fs.log.Warnf("Received partial header (report if this happens often)")
+ fs.partialHeader = msg
+ msg = nil
+ }
+ } else {
+ if len(fs.incoming)+len(msg) >= fs.incomingLength {
+ copy(fs.incoming[fs.receivedLength:], msg[:fs.incomingLength-fs.receivedLength])
+ msg = msg[fs.incomingLength-fs.receivedLength:]
+ fs.frameComplete()
+ } else {
+ copy(fs.incoming[fs.receivedLength:], msg)
+ fs.receivedLength += len(msg)
+ msg = nil
+ }
+ }
+ }
+}
+
+func (fs *FrameSocket) readPump(conn *websocket.Conn, ctx context.Context) {
+ fs.log.Debugf("Frame websocket read pump starting %p", fs)
+ defer func() {
+ fs.log.Debugf("Frame websocket read pump exiting %p", fs)
+ go fs.Close(0)
+ }()
+ for {
+ msgType, data, err := conn.ReadMessage()
+ if err != nil {
+ // Ignore the error if the context has been closed
+ if !errors.Is(ctx.Err(), context.Canceled) {
+ fs.log.Errorf("Error reading from websocket: %v", err)
+ }
+ return
+ } else if msgType != websocket.BinaryMessage {
+ fs.log.Warnf("Got unexpected websocket message type %d", msgType)
+ continue
+ }
+ fs.processData(data)
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/socket/noisehandshake.go b/vendor/go.mau.fi/whatsmeow/socket/noisehandshake.go
new file mode 100644
index 00000000..26f7f263
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/socket/noisehandshake.go
@@ -0,0 +1,135 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package socket
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/sha256"
+ "fmt"
+ "io"
+ "sync/atomic"
+
+ "golang.org/x/crypto/curve25519"
+ "golang.org/x/crypto/hkdf"
+)
+
+type NoiseHandshake struct {
+ hash []byte
+ salt []byte
+ key cipher.AEAD
+ counter uint32
+}
+
+func NewNoiseHandshake() *NoiseHandshake {
+ return &NoiseHandshake{}
+}
+
+func newCipher(key []byte) (cipher.AEAD, error) {
+ aesCipher, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ aesGCM, err := cipher.NewGCM(aesCipher)
+ if err != nil {
+ return nil, err
+ }
+ return aesGCM, nil
+}
+
+func sha256Slice(data []byte) []byte {
+ hash := sha256.Sum256(data)
+ return hash[:]
+}
+
+func (nh *NoiseHandshake) Start(pattern string, header []byte) {
+ data := []byte(pattern)
+ if len(data) == 32 {
+ nh.hash = data
+ } else {
+ nh.hash = sha256Slice(data)
+ }
+ nh.salt = nh.hash
+ var err error
+ nh.key, err = newCipher(nh.hash)
+ if err != nil {
+ panic(err)
+ }
+ nh.Authenticate(header)
+}
+
+func (nh *NoiseHandshake) Authenticate(data []byte) {
+ nh.hash = sha256Slice(append(nh.hash, data...))
+}
+
+func (nh *NoiseHandshake) postIncrementCounter() uint32 {
+ count := atomic.AddUint32(&nh.counter, 1)
+ return count - 1
+}
+
+func (nh *NoiseHandshake) Encrypt(plaintext []byte) []byte {
+ ciphertext := nh.key.Seal(nil, generateIV(nh.postIncrementCounter()), plaintext, nh.hash)
+ nh.Authenticate(ciphertext)
+ return ciphertext
+}
+
+func (nh *NoiseHandshake) Decrypt(ciphertext []byte) (plaintext []byte, err error) {
+ plaintext, err = nh.key.Open(nil, generateIV(nh.postIncrementCounter()), ciphertext, nh.hash)
+ if err == nil {
+ nh.Authenticate(ciphertext)
+ }
+ return
+}
+
+func (nh *NoiseHandshake) Finish(fs *FrameSocket, frameHandler FrameHandler, disconnectHandler DisconnectHandler) (*NoiseSocket, error) {
+ if write, read, err := nh.extractAndExpand(nh.salt, nil); err != nil {
+ return nil, fmt.Errorf("failed to extract final keys: %w", err)
+ } else if writeKey, err := newCipher(write); err != nil {
+ return nil, fmt.Errorf("failed to create final write cipher: %w", err)
+ } else if readKey, err := newCipher(read); err != nil {
+ return nil, fmt.Errorf("failed to create final read cipher: %w", err)
+ } else if ns, err := newNoiseSocket(fs, writeKey, readKey, frameHandler, disconnectHandler); err != nil {
+ return nil, fmt.Errorf("failed to create noise socket: %w", err)
+ } else {
+ return ns, nil
+ }
+}
+
+func (nh *NoiseHandshake) MixSharedSecretIntoKey(priv, pub [32]byte) error {
+ secret, err := curve25519.X25519(priv[:], pub[:])
+ if err != nil {
+ return fmt.Errorf("failed to do x25519 scalar multiplication: %w", err)
+ }
+ return nh.MixIntoKey(secret)
+}
+
+func (nh *NoiseHandshake) MixIntoKey(data []byte) error {
+ nh.counter = 0
+ write, read, err := nh.extractAndExpand(nh.salt, data)
+ if err != nil {
+ return fmt.Errorf("failed to extract keys for mixing: %w", err)
+ }
+ nh.salt = write
+ nh.key, err = newCipher(read)
+ if err != nil {
+ return fmt.Errorf("failed to create new cipher while mixing keys: %w", err)
+ }
+ return nil
+}
+
+func (nh *NoiseHandshake) extractAndExpand(salt, data []byte) (write []byte, read []byte, err error) {
+ h := hkdf.New(sha256.New, data, salt, nil)
+ write = make([]byte, 32)
+ read = make([]byte, 32)
+
+ if _, err = io.ReadFull(h, write); err != nil {
+ err = fmt.Errorf("failed to read write key: %w", err)
+ } else if _, err = io.ReadFull(h, read); err != nil {
+ err = fmt.Errorf("failed to read read key: %w", err)
+ }
+ return
+}
diff --git a/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go b/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go
new file mode 100644
index 00000000..23bb44e8
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go
@@ -0,0 +1,104 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package socket
+
+import (
+ "context"
+ "crypto/cipher"
+ "encoding/binary"
+ "sync"
+ "sync/atomic"
+
+ "github.com/gorilla/websocket"
+)
+
+type NoiseSocket struct {
+ fs *FrameSocket
+ onFrame FrameHandler
+ writeKey cipher.AEAD
+ readKey cipher.AEAD
+ writeCounter uint32
+ readCounter uint32
+ writeLock sync.Mutex
+ destroyed uint32
+ stopConsumer chan struct{}
+}
+
+type DisconnectHandler func(socket *NoiseSocket, remote bool)
+type FrameHandler func([]byte)
+
+func newNoiseSocket(fs *FrameSocket, writeKey, readKey cipher.AEAD, frameHandler FrameHandler, disconnectHandler DisconnectHandler) (*NoiseSocket, error) {
+ ns := &NoiseSocket{
+ fs: fs,
+ writeKey: writeKey,
+ readKey: readKey,
+ onFrame: frameHandler,
+ stopConsumer: make(chan struct{}),
+ }
+ fs.OnDisconnect = func(remote bool) {
+ disconnectHandler(ns, remote)
+ }
+ go ns.consumeFrames(fs.ctx, fs.Frames)
+ return ns, nil
+}
+
+func (ns *NoiseSocket) consumeFrames(ctx context.Context, frames <-chan []byte) {
+ ctxDone := ctx.Done()
+ for {
+ select {
+ case frame := <-frames:
+ ns.receiveEncryptedFrame(frame)
+ case <-ctxDone:
+ return
+ case <-ns.stopConsumer:
+ return
+ }
+ }
+}
+
+func generateIV(count uint32) []byte {
+ iv := make([]byte, 12)
+ binary.BigEndian.PutUint32(iv[8:], count)
+ return iv
+}
+
+func (ns *NoiseSocket) Context() context.Context {
+ return ns.fs.Context()
+}
+
+func (ns *NoiseSocket) Stop(disconnect bool) {
+ if atomic.CompareAndSwapUint32(&ns.destroyed, 0, 1) {
+ close(ns.stopConsumer)
+ ns.fs.OnDisconnect = nil
+ if disconnect {
+ ns.fs.Close(websocket.CloseNormalClosure)
+ }
+ }
+}
+
+func (ns *NoiseSocket) SendFrame(plaintext []byte) error {
+ ns.writeLock.Lock()
+ ciphertext := ns.writeKey.Seal(nil, generateIV(ns.writeCounter), plaintext, nil)
+ ns.writeCounter++
+ err := ns.fs.SendFrame(ciphertext)
+ ns.writeLock.Unlock()
+ return err
+}
+
+func (ns *NoiseSocket) receiveEncryptedFrame(ciphertext []byte) {
+ count := atomic.AddUint32(&ns.readCounter, 1) - 1
+ plaintext, err := ns.readKey.Open(nil, generateIV(count), ciphertext, nil)
+ if err != nil {
+ ns.fs.log.Warnf("Failed to decrypt frame: %v", err)
+ return
+ }
+ ns.onFrame(plaintext)
+}
+
+func (ns *NoiseSocket) IsConnected() bool {
+ return ns.fs.IsConnected()
+}
diff --git a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go
new file mode 100644
index 00000000..81519ee2
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go
@@ -0,0 +1,118 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package store
+
+import (
+ "crypto/md5"
+ "encoding/binary"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "google.golang.org/protobuf/proto"
+
+ "go.mau.fi/libsignal/ecc"
+
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+)
+
+// waVersion is the WhatsApp web client version
+var waVersion = []uint32{2, 2202, 9}
+
+// waVersionHash is the md5 hash of a dot-separated waVersion
+var waVersionHash [16]byte
+
+func init() {
+ waVersionParts := make([]string, len(waVersion))
+ for i, part := range waVersion {
+ waVersionParts[i] = strconv.Itoa(int(part))
+ }
+ waVersionString := strings.Join(waVersionParts, ".")
+ waVersionHash = md5.Sum([]byte(waVersionString))
+}
+
+var BaseClientPayload = &waProto.ClientPayload{
+ UserAgent: &waProto.UserAgent{
+ Platform: waProto.UserAgent_WEB.Enum(),
+ ReleaseChannel: waProto.UserAgent_RELEASE.Enum(),
+ AppVersion: &waProto.AppVersion{
+ Primary: &waVersion[0],
+ Secondary: &waVersion[1],
+ Tertiary: &waVersion[2],
+ },
+ Mcc: proto.String("000"),
+ Mnc: proto.String("000"),
+ OsVersion: proto.String("0.1.0"),
+ Manufacturer: proto.String(""),
+ Device: proto.String("Desktop"),
+ OsBuildNumber: proto.String("0.1.0"),
+ LocaleLanguageIso6391: proto.String("en"),
+ LocaleCountryIso31661Alpha2: proto.String("en"),
+ },
+ WebInfo: &waProto.WebInfo{
+ WebSubPlatform: waProto.WebInfo_WEB_BROWSER.Enum(),
+ },
+ ConnectType: waProto.ClientPayload_WIFI_UNKNOWN.Enum(),
+ ConnectReason: waProto.ClientPayload_USER_ACTIVATED.Enum(),
+}
+
+var CompanionProps = &waProto.CompanionProps{
+ Os: proto.String("whatsmeow"),
+ Version: &waProto.AppVersion{
+ Primary: proto.Uint32(0),
+ Secondary: proto.Uint32(1),
+ Tertiary: proto.Uint32(0),
+ },
+ PlatformType: waProto.CompanionProps_UNKNOWN.Enum(),
+ RequireFullSync: proto.Bool(false),
+}
+
+func SetOSInfo(name string, version [3]uint32) {
+ CompanionProps.Os = &name
+ CompanionProps.Version.Primary = &version[0]
+ CompanionProps.Version.Secondary = &version[1]
+ CompanionProps.Version.Tertiary = &version[2]
+ BaseClientPayload.UserAgent.OsVersion = proto.String(fmt.Sprintf("%d.%d.%d", version[0], version[1], version[2]))
+ BaseClientPayload.UserAgent.OsBuildNumber = BaseClientPayload.UserAgent.OsVersion
+}
+
+func (device *Device) getRegistrationPayload() *waProto.ClientPayload {
+ payload := proto.Clone(BaseClientPayload).(*waProto.ClientPayload)
+ regID := make([]byte, 4)
+ binary.BigEndian.PutUint32(regID, device.RegistrationID)
+ preKeyID := make([]byte, 4)
+ binary.BigEndian.PutUint32(preKeyID, device.SignedPreKey.KeyID)
+ companionProps, _ := proto.Marshal(CompanionProps)
+ payload.RegData = &waProto.CompanionRegData{
+ ERegid: regID,
+ EKeytype: []byte{ecc.DjbType},
+ EIdent: device.IdentityKey.Pub[:],
+ ESkeyId: preKeyID[1:],
+ ESkeyVal: device.SignedPreKey.Pub[:],
+ ESkeySig: device.SignedPreKey.Signature[:],
+ BuildHash: waVersionHash[:],
+ CompanionProps: companionProps,
+ }
+ payload.Passive = proto.Bool(false)
+ return payload
+}
+
+func (device *Device) getLoginPayload() *waProto.ClientPayload {
+ payload := proto.Clone(BaseClientPayload).(*waProto.ClientPayload)
+ payload.Username = proto.Uint64(device.ID.UserInt())
+ payload.Device = proto.Uint32(uint32(device.ID.Device))
+ payload.Passive = proto.Bool(true)
+ return payload
+}
+
+func (device *Device) GetClientPayload() *waProto.ClientPayload {
+ if device.ID != nil {
+ return device.getLoginPayload()
+ } else {
+ return device.getRegistrationPayload()
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/store/signal.go b/vendor/go.mau.fi/whatsmeow/store/signal.go
new file mode 100644
index 00000000..4c2a4e92
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/store/signal.go
@@ -0,0 +1,168 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package store
+
+import (
+ "go.mau.fi/libsignal/ecc"
+ groupRecord "go.mau.fi/libsignal/groups/state/record"
+ "go.mau.fi/libsignal/keys/identity"
+ "go.mau.fi/libsignal/protocol"
+ "go.mau.fi/libsignal/serialize"
+ "go.mau.fi/libsignal/state/record"
+ "go.mau.fi/libsignal/state/store"
+)
+
+var SignalProtobufSerializer = serialize.NewProtoBufSerializer()
+
+var _ store.SignalProtocol = (*Device)(nil)
+
+func (device *Device) GetIdentityKeyPair() *identity.KeyPair {
+ return identity.NewKeyPair(
+ identity.NewKey(ecc.NewDjbECPublicKey(*device.IdentityKey.Pub)),
+ ecc.NewDjbECPrivateKey(*device.IdentityKey.Priv),
+ )
+}
+
+func (device *Device) GetLocalRegistrationId() uint32 {
+ return device.RegistrationID
+}
+
+func (device *Device) SaveIdentity(address *protocol.SignalAddress, identityKey *identity.Key) {
+ err := device.Identities.PutIdentity(address.String(), identityKey.PublicKey().PublicKey())
+ if err != nil {
+ device.Log.Errorf("Failed to save identity of %s: %v", address.String(), err)
+ }
+}
+
+func (device *Device) IsTrustedIdentity(address *protocol.SignalAddress, identityKey *identity.Key) bool {
+ isTrusted, err := device.Identities.IsTrustedIdentity(address.String(), identityKey.PublicKey().PublicKey())
+ if err != nil {
+ device.Log.Errorf("Failed to check if %s's identity is trusted: %v", address.String(), err)
+ }
+ return isTrusted
+}
+
+func (device *Device) LoadPreKey(id uint32) *record.PreKey {
+ preKey, err := device.PreKeys.GetPreKey(id)
+ if err != nil {
+ device.Log.Errorf("Failed to load prekey %d: %v", id, err)
+ return nil
+ } else if preKey == nil {
+ return nil
+ }
+ return record.NewPreKey(preKey.KeyID, ecc.NewECKeyPair(
+ ecc.NewDjbECPublicKey(*preKey.Pub),
+ ecc.NewDjbECPrivateKey(*preKey.Priv),
+ ), nil)
+}
+
+func (device *Device) RemovePreKey(id uint32) {
+ err := device.PreKeys.RemovePreKey(id)
+ if err != nil {
+ device.Log.Errorf("Failed to remove prekey %d: %v", id, err)
+ }
+}
+
+func (device *Device) StorePreKey(preKeyID uint32, preKeyRecord *record.PreKey) {
+ panic("not implemented")
+}
+
+func (device *Device) ContainsPreKey(preKeyID uint32) bool {
+ panic("not implemented")
+}
+
+func (device *Device) LoadSession(address *protocol.SignalAddress) *record.Session {
+ rawSess, err := device.Sessions.GetSession(address.String())
+ if err != nil {
+ device.Log.Errorf("Failed to load session with %s: %v", address.String(), err)
+ return record.NewSession(SignalProtobufSerializer.Session, SignalProtobufSerializer.State)
+ } else if rawSess == nil {
+ return record.NewSession(SignalProtobufSerializer.Session, SignalProtobufSerializer.State)
+ }
+ sess, err := record.NewSessionFromBytes(rawSess, SignalProtobufSerializer.Session, SignalProtobufSerializer.State)
+ if err != nil {
+ device.Log.Errorf("Failed to deserialize session with %s: %v", address.String(), err)
+ return record.NewSession(SignalProtobufSerializer.Session, SignalProtobufSerializer.State)
+ }
+ return sess
+}
+
+func (device *Device) GetSubDeviceSessions(name string) []uint32 {
+ panic("not implemented")
+}
+
+func (device *Device) StoreSession(address *protocol.SignalAddress, record *record.Session) {
+ err := device.Sessions.PutSession(address.String(), record.Serialize())
+ if err != nil {
+ device.Log.Errorf("Failed to store session with %s: %v", address.String(), err)
+ }
+}
+
+func (device *Device) ContainsSession(remoteAddress *protocol.SignalAddress) bool {
+ hasSession, err := device.Sessions.HasSession(remoteAddress.String())
+ if err != nil {
+ device.Log.Warnf("Failed to check if store has session for %s: %v", remoteAddress.String(), err)
+ }
+ return hasSession
+}
+
+func (device *Device) DeleteSession(remoteAddress *protocol.SignalAddress) {
+ panic("not implemented")
+}
+
+func (device *Device) DeleteAllSessions() {
+ panic("not implemented")
+}
+
+func (device *Device) LoadSignedPreKey(signedPreKeyID uint32) *record.SignedPreKey {
+ if signedPreKeyID == device.SignedPreKey.KeyID {
+ return record.NewSignedPreKey(signedPreKeyID, 0, ecc.NewECKeyPair(
+ ecc.NewDjbECPublicKey(*device.SignedPreKey.Pub),
+ ecc.NewDjbECPrivateKey(*device.SignedPreKey.Priv),
+ ), *device.SignedPreKey.Signature, nil)
+ }
+ return nil
+}
+
+func (device *Device) LoadSignedPreKeys() []*record.SignedPreKey {
+ panic("not implemented")
+}
+
+func (device *Device) StoreSignedPreKey(signedPreKeyID uint32, record *record.SignedPreKey) {
+ panic("not implemented")
+}
+
+func (device *Device) ContainsSignedPreKey(signedPreKeyID uint32) bool {
+ panic("not implemented")
+}
+
+func (device *Device) RemoveSignedPreKey(signedPreKeyID uint32) {
+ panic("not implemented")
+}
+
+func (device *Device) StoreSenderKey(senderKeyName *protocol.SenderKeyName, keyRecord *groupRecord.SenderKey) {
+ err := device.SenderKeys.PutSenderKey(senderKeyName.GroupID(), senderKeyName.Sender().String(), keyRecord.Serialize())
+ if err != nil {
+ device.Log.Errorf("Failed to store sender key from %s for %s: %v", senderKeyName.Sender().String(), senderKeyName.GroupID(), err)
+ }
+}
+
+func (device *Device) LoadSenderKey(senderKeyName *protocol.SenderKeyName) *groupRecord.SenderKey {
+ rawKey, err := device.SenderKeys.GetSenderKey(senderKeyName.GroupID(), senderKeyName.Sender().String())
+ if err != nil {
+ device.Log.Errorf("Failed to load sender key from %s for %s: %v", senderKeyName.Sender().String(), senderKeyName.GroupID(), err)
+ return groupRecord.NewSenderKey(SignalProtobufSerializer.SenderKeyRecord, SignalProtobufSerializer.SenderKeyState)
+ } else if rawKey == nil {
+ return groupRecord.NewSenderKey(SignalProtobufSerializer.SenderKeyRecord, SignalProtobufSerializer.SenderKeyState)
+ }
+ key, err := groupRecord.NewSenderKeyFromBytes(rawKey, SignalProtobufSerializer.SenderKeyRecord, SignalProtobufSerializer.SenderKeyState)
+ if err != nil {
+ device.Log.Errorf("Failed to deserialize sender key from %s for %s: %v", senderKeyName.Sender().String(), senderKeyName.GroupID(), err)
+ return groupRecord.NewSenderKey(SignalProtobufSerializer.SenderKeyRecord, SignalProtobufSerializer.SenderKeyState)
+ }
+ return key
+}
diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go
new file mode 100644
index 00000000..30d91971
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go
@@ -0,0 +1,245 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package sqlstore
+
+import (
+ "crypto/rand"
+ "database/sql"
+ "errors"
+ "fmt"
+ mathRand "math/rand"
+
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/store"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/util/keys"
+ waLog "go.mau.fi/whatsmeow/util/log"
+)
+
+// Container is a wrapper for a SQL database that can contain multiple whatsmeow sessions.
+type Container struct {
+ db *sql.DB
+ dialect string
+ log waLog.Logger
+}
+
+var _ store.DeviceContainer = (*Container)(nil)
+
+// New connects to the given SQL database and wraps it in a Container.
+//
+// Only SQLite and Postgres are currently fully supported.
+//
+// The logger can be nil and will default to a no-op logger.
+//
+// When using SQLite, it's strongly recommended to enable foreign keys by adding `?_foreign_keys=true`:
+// container, err := sqlstore.New("sqlite3", "file:yoursqlitefile.db?_foreign_keys=on", nil)
+func New(dialect, address string, log waLog.Logger) (*Container, error) {
+ db, err := sql.Open(dialect, address)
+ if err != nil {
+ return nil, fmt.Errorf("failed to open database: %w", err)
+ }
+ container := NewWithDB(db, dialect, log)
+ err = container.Upgrade()
+ if err != nil {
+ return nil, fmt.Errorf("failed to upgrade database: %w", err)
+ }
+ return container, nil
+}
+
+// NewWithDB wraps an existing SQL connection in a Container.
+//
+// Only SQLite and Postgres are currently fully supported.
+//
+// The logger can be nil and will default to a no-op logger.
+//
+// When using SQLite, it's strongly recommended to enable foreign keys by adding `?_foreign_keys=true`:
+// db, err := sql.Open("sqlite3", "file:yoursqlitefile.db?_foreign_keys=on")
+// if err != nil {
+// panic(err)
+// }
+// container, err := sqlstore.NewWithDB(db, "sqlite3", nil)
+func NewWithDB(db *sql.DB, dialect string, log waLog.Logger) *Container {
+ if log == nil {
+ log = waLog.Noop
+ }
+ return &Container{
+ db: db,
+ dialect: dialect,
+ log: log,
+ }
+}
+
+const getAllDevicesQuery = `
+SELECT jid, registration_id, noise_key, identity_key,
+ signed_pre_key, signed_pre_key_id, signed_pre_key_sig,
+ adv_key, adv_details, adv_account_sig, adv_device_sig,
+ platform, business_name, push_name
+FROM whatsmeow_device
+`
+
+const getDeviceQuery = getAllDevicesQuery + " WHERE jid=$1"
+
+type scannable interface {
+ Scan(dest ...interface{}) error
+}
+
+func (c *Container) scanDevice(row scannable) (*store.Device, error) {
+ var device store.Device
+ device.Log = c.log
+ device.SignedPreKey = &keys.PreKey{}
+ var noisePriv, identityPriv, preKeyPriv, preKeySig []byte
+ var account waProto.ADVSignedDeviceIdentity
+
+ err := row.Scan(
+ &device.ID, &device.RegistrationID, &noisePriv, &identityPriv,
+ &preKeyPriv, &device.SignedPreKey.KeyID, &preKeySig,
+ &device.AdvSecretKey, &account.Details, &account.AccountSignature, &account.DeviceSignature,
+ &device.Platform, &device.BusinessName, &device.PushName)
+ if err != nil {
+ return nil, fmt.Errorf("failed to scan session: %w", err)
+ } else if len(noisePriv) != 32 || len(identityPriv) != 32 || len(preKeyPriv) != 32 || len(preKeySig) != 64 {
+ return nil, ErrInvalidLength
+ }
+
+ device.NoiseKey = keys.NewKeyPairFromPrivateKey(*(*[32]byte)(noisePriv))
+ device.IdentityKey = keys.NewKeyPairFromPrivateKey(*(*[32]byte)(identityPriv))
+ device.SignedPreKey.KeyPair = *keys.NewKeyPairFromPrivateKey(*(*[32]byte)(preKeyPriv))
+ device.SignedPreKey.Signature = (*[64]byte)(preKeySig)
+ device.Account = &account
+
+ innerStore := NewSQLStore(c, *device.ID)
+ device.Identities = innerStore
+ device.Sessions = innerStore
+ device.PreKeys = innerStore
+ device.SenderKeys = innerStore
+ device.AppStateKeys = innerStore
+ device.AppState = innerStore
+ device.Contacts = innerStore
+ device.ChatSettings = innerStore
+ device.Container = c
+ device.Initialized = true
+
+ return &device, nil
+}
+
+// GetAllDevices finds all the devices in the database.
+func (c *Container) GetAllDevices() ([]*store.Device, error) {
+ res, err := c.db.Query(getAllDevicesQuery)
+ if err != nil {
+ return nil, fmt.Errorf("failed to query sessions: %w", err)
+ }
+ sessions := make([]*store.Device, 0)
+ for res.Next() {
+ sess, scanErr := c.scanDevice(res)
+ if scanErr != nil {
+ return sessions, scanErr
+ }
+ sessions = append(sessions, sess)
+ }
+ return sessions, nil
+}
+
+// GetFirstDevice is a convenience method for getting the first device in the store. If there are
+// no devices, then a new device will be created. You should only use this if you don't want to
+// have multiple sessions simultaneously.
+func (c *Container) GetFirstDevice() (*store.Device, error) {
+ devices, err := c.GetAllDevices()
+ if err != nil {
+ return nil, err
+ }
+ if len(devices) == 0 {
+ return c.NewDevice(), nil
+ } else {
+ return devices[0], nil
+ }
+}
+
+// GetDevice finds the device with the specified JID in the database.
+//
+// If the device is not found, nil is returned instead.
+//
+// Note that the parameter usually must be an AD-JID.
+func (c *Container) GetDevice(jid types.JID) (*store.Device, error) {
+ sess, err := c.scanDevice(c.db.QueryRow(getDeviceQuery, jid))
+ if errors.Is(err, sql.ErrNoRows) {
+ return nil, nil
+ }
+ return sess, err
+}
+
+const (
+ insertDeviceQuery = `
+ INSERT INTO whatsmeow_device (jid, registration_id, noise_key, identity_key,
+ signed_pre_key, signed_pre_key_id, signed_pre_key_sig,
+ adv_key, adv_details, adv_account_sig, adv_device_sig,
+ platform, business_name, push_name)
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
+ ON CONFLICT (jid) DO UPDATE SET platform=$12, business_name=$13, push_name=$14
+ `
+ deleteDeviceQuery = `DELETE FROM whatsmeow_device WHERE jid=$1`
+)
+
+// NewDevice creates a new device in this database.
+//
+// No data is actually stored before Save is called. However, the pairing process will automatically
+// call Save after a successful pairing, so you most likely don't need to call it yourself.
+func (c *Container) NewDevice() *store.Device {
+ device := &store.Device{
+ Log: c.log,
+ Container: c,
+
+ NoiseKey: keys.NewKeyPair(),
+ IdentityKey: keys.NewKeyPair(),
+ RegistrationID: mathRand.Uint32(),
+ AdvSecretKey: make([]byte, 32),
+ }
+ _, err := rand.Read(device.AdvSecretKey)
+ if err != nil {
+ panic(err)
+ }
+ device.SignedPreKey = device.IdentityKey.CreateSignedPreKey(1)
+ return device
+}
+
+// ErrDeviceIDMustBeSet is the error returned by PutDevice if you try to save a device before knowing its JID.
+var ErrDeviceIDMustBeSet = errors.New("device JID must be known before accessing database")
+
+// PutDevice stores the given device in this database. This should be called through Device.Save()
+// (which usually doesn't need to be called manually, as the library does that automatically when relevant).
+func (c *Container) PutDevice(device *store.Device) error {
+ if device.ID == nil {
+ return ErrDeviceIDMustBeSet
+ }
+ _, err := c.db.Exec(insertDeviceQuery,
+ device.ID.String(), device.RegistrationID, device.NoiseKey.Priv[:], device.IdentityKey.Priv[:],
+ device.SignedPreKey.Priv[:], device.SignedPreKey.KeyID, device.SignedPreKey.Signature[:],
+ device.AdvSecretKey, device.Account.Details, device.Account.AccountSignature, device.Account.DeviceSignature,
+ device.Platform, device.BusinessName, device.PushName)
+
+ if !device.Initialized {
+ innerStore := NewSQLStore(c, *device.ID)
+ device.Identities = innerStore
+ device.Sessions = innerStore
+ device.PreKeys = innerStore
+ device.SenderKeys = innerStore
+ device.AppStateKeys = innerStore
+ device.AppState = innerStore
+ device.Contacts = innerStore
+ device.ChatSettings = innerStore
+ device.Initialized = true
+ }
+ return err
+}
+
+// DeleteDevice deletes the given device from this database. This should be called through Device.Delete()
+func (c *Container) DeleteDevice(store *store.Device) error {
+ if store.ID == nil {
+ return ErrDeviceIDMustBeSet
+ }
+ _, err := c.db.Exec(deleteDeviceQuery, store.ID.String())
+ return err
+}
diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go
new file mode 100644
index 00000000..ad1eea7e
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go
@@ -0,0 +1,610 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package sqlstore contains an SQL-backed implementation of the interfaces in the store package.
+package sqlstore
+
+import (
+ "database/sql"
+ "database/sql/driver"
+ "errors"
+ "fmt"
+ "strings"
+ "sync"
+ "time"
+
+ "go.mau.fi/whatsmeow/store"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/util/keys"
+)
+
+// ErrInvalidLength is returned by some database getters if the database returned a byte array with an unexpected length.
+// This should be impossible, as the database schema contains CHECK()s for all the relevant columns.
+var ErrInvalidLength = errors.New("database returned byte array with illegal length")
+
+// PostgresArrayWrapper is a function to wrap array values before passing them to the sql package.
+//
+// When using github.com/lib/pq, you should set
+// whatsmeow.PostgresArrayWrapper = pq.Array
+var PostgresArrayWrapper func(interface{}) interface {
+ driver.Valuer
+ sql.Scanner
+}
+
+type SQLStore struct {
+ *Container
+ JID string
+
+ preKeyLock sync.Mutex
+
+ contactCache map[types.JID]*types.ContactInfo
+ contactCacheLock sync.Mutex
+}
+
+// NewSQLStore creates a new SQLStore with the given database container and user JID.
+// It contains implementations of all the different stores in the store package.
+//
+// In general, you should use Container.NewDevice or Container.GetDevice instead of this.
+func NewSQLStore(c *Container, jid types.JID) *SQLStore {
+ return &SQLStore{
+ Container: c,
+ JID: jid.String(),
+ contactCache: make(map[types.JID]*types.ContactInfo),
+ }
+}
+
+var _ store.IdentityStore = (*SQLStore)(nil)
+var _ store.SessionStore = (*SQLStore)(nil)
+var _ store.PreKeyStore = (*SQLStore)(nil)
+var _ store.SenderKeyStore = (*SQLStore)(nil)
+var _ store.AppStateSyncKeyStore = (*SQLStore)(nil)
+var _ store.AppStateStore = (*SQLStore)(nil)
+var _ store.ContactStore = (*SQLStore)(nil)
+
+const (
+ putIdentityQuery = `
+ INSERT INTO whatsmeow_identity_keys (our_jid, their_id, identity) VALUES ($1, $2, $3)
+ ON CONFLICT (our_jid, their_id) DO UPDATE SET identity=$3
+ `
+ deleteAllIdentitiesQuery = `DELETE FROM whatsmeow_identity_keys WHERE our_jid=$1 AND their_id LIKE $2`
+ deleteIdentityQuery = `DELETE FROM whatsmeow_identity_keys WHERE our_jid=$1 AND their_id=$2`
+ getIdentityQuery = `SELECT identity FROM whatsmeow_identity_keys WHERE our_jid=$1 AND their_id=$2`
+)
+
+func (s *SQLStore) PutIdentity(address string, key [32]byte) error {
+ _, err := s.db.Exec(putIdentityQuery, s.JID, address, key[:])
+ return err
+}
+
+func (s *SQLStore) DeleteAllIdentities(phone string) error {
+ _, err := s.db.Exec(deleteAllIdentitiesQuery, s.JID, phone+":%")
+ return err
+}
+
+func (s *SQLStore) DeleteIdentity(address string) error {
+ _, err := s.db.Exec(deleteAllIdentitiesQuery, s.JID, address)
+ return err
+}
+
+func (s *SQLStore) IsTrustedIdentity(address string, key [32]byte) (bool, error) {
+ var existingIdentity []byte
+ err := s.db.QueryRow(getIdentityQuery, s.JID, address).Scan(&existingIdentity)
+ if errors.Is(err, sql.ErrNoRows) {
+ // Trust if not known, it'll be saved automatically later
+ return true, nil
+ } else if err != nil {
+ return false, err
+ } else if len(existingIdentity) != 32 {
+ return false, ErrInvalidLength
+ }
+ return *(*[32]byte)(existingIdentity) == key, nil
+}
+
+const (
+ getSessionQuery = `SELECT session FROM whatsmeow_sessions WHERE our_jid=$1 AND their_id=$2`
+ hasSessionQuery = `SELECT true FROM whatsmeow_sessions WHERE our_jid=$1 AND their_id=$2`
+ putSessionQuery = `
+ INSERT INTO whatsmeow_sessions (our_jid, their_id, session) VALUES ($1, $2, $3)
+ ON CONFLICT (our_jid, their_id) DO UPDATE SET session=$3
+ `
+ deleteAllSessionsQuery = `DELETE FROM whatsmeow_sessions WHERE our_jid=$1 AND their_id LIKE $2`
+ deleteSessionQuery = `DELETE FROM whatsmeow_sessions WHERE our_jid=$1 AND their_id=$2`
+)
+
+func (s *SQLStore) GetSession(address string) (session []byte, err error) {
+ err = s.db.QueryRow(getSessionQuery, s.JID, address).Scan(&session)
+ if errors.Is(err, sql.ErrNoRows) {
+ err = nil
+ }
+ return
+}
+
+func (s *SQLStore) HasSession(address string) (has bool, err error) {
+ err = s.db.QueryRow(hasSessionQuery, s.JID, address).Scan(&has)
+ if errors.Is(err, sql.ErrNoRows) {
+ err = nil
+ }
+ return
+}
+
+func (s *SQLStore) PutSession(address string, session []byte) error {
+ _, err := s.db.Exec(putSessionQuery, s.JID, address, session)
+ return err
+}
+
+func (s *SQLStore) DeleteAllSessions(phone string) error {
+ _, err := s.db.Exec(deleteAllSessionsQuery, s.JID, phone+":%")
+ return err
+}
+
+func (s *SQLStore) DeleteSession(address string) error {
+ _, err := s.db.Exec(deleteSessionQuery, s.JID, address)
+ return err
+}
+
+const (
+ getLastPreKeyIDQuery = `SELECT MAX(key_id) FROM whatsmeow_pre_keys WHERE jid=$1`
+ insertPreKeyQuery = `INSERT INTO whatsmeow_pre_keys (jid, key_id, key, uploaded) VALUES ($1, $2, $3, $4)`
+ getUnuploadedPreKeysQuery = `SELECT key_id, key FROM whatsmeow_pre_keys WHERE jid=$1 AND uploaded=false ORDER BY key_id LIMIT $2`
+ getPreKeyQuery = `SELECT key_id, key FROM whatsmeow_pre_keys WHERE jid=$1 AND key_id=$2`
+ deletePreKeyQuery = `DELETE FROM whatsmeow_pre_keys WHERE jid=$1 AND key_id=$2`
+ markPreKeysAsUploadedQuery = `UPDATE whatsmeow_pre_keys SET uploaded=true WHERE jid=$1 AND key_id<=$2`
+ getUploadedPreKeyCountQuery = `SELECT COUNT(*) FROM whatsmeow_pre_keys WHERE jid=$1 AND uploaded=true`
+)
+
+func (s *SQLStore) genOnePreKey(id uint32, markUploaded bool) (*keys.PreKey, error) {
+ key := keys.NewPreKey(id)
+ _, err := s.db.Exec(insertPreKeyQuery, s.JID, key.KeyID, key.Priv[:], markUploaded)
+ return key, err
+}
+
+func (s *SQLStore) getNextPreKeyID() (uint32, error) {
+ var lastKeyID sql.NullInt32
+ err := s.db.QueryRow(getLastPreKeyIDQuery, s.JID).Scan(&lastKeyID)
+ if err != nil {
+ return 0, fmt.Errorf("failed to query next prekey ID: %w", err)
+ }
+ return uint32(lastKeyID.Int32) + 1, nil
+}
+
+func (s *SQLStore) GenOnePreKey() (*keys.PreKey, error) {
+ s.preKeyLock.Lock()
+ defer s.preKeyLock.Unlock()
+ nextKeyID, err := s.getNextPreKeyID()
+ if err != nil {
+ return nil, err
+ }
+ return s.genOnePreKey(nextKeyID, true)
+}
+
+func (s *SQLStore) GetOrGenPreKeys(count uint32) ([]*keys.PreKey, error) {
+ s.preKeyLock.Lock()
+ defer s.preKeyLock.Unlock()
+
+ res, err := s.db.Query(getUnuploadedPreKeysQuery, s.JID, count)
+ if err != nil {
+ return nil, fmt.Errorf("failed to query existing prekeys: %w", err)
+ }
+ newKeys := make([]*keys.PreKey, count)
+ var existingCount uint32
+ for res.Next() {
+ var key *keys.PreKey
+ key, err = scanPreKey(res)
+ if err != nil {
+ return nil, err
+ } else if key != nil {
+ newKeys[existingCount] = key
+ existingCount++
+ }
+ }
+
+ if existingCount < uint32(len(newKeys)) {
+ var nextKeyID uint32
+ nextKeyID, err = s.getNextPreKeyID()
+ if err != nil {
+ return nil, err
+ }
+ for i := existingCount; i < count; i++ {
+ newKeys[i], err = s.genOnePreKey(nextKeyID, false)
+ if err != nil {
+ return nil, fmt.Errorf("failed to generate prekey: %w", err)
+ }
+ nextKeyID++
+ }
+ }
+
+ return newKeys, nil
+}
+
+func scanPreKey(row scannable) (*keys.PreKey, error) {
+ var priv []byte
+ var id uint32
+ err := row.Scan(&id, &priv)
+ if errors.Is(err, sql.ErrNoRows) {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ } else if len(priv) != 32 {
+ return nil, ErrInvalidLength
+ }
+ return &keys.PreKey{
+ KeyPair: *keys.NewKeyPairFromPrivateKey(*(*[32]byte)(priv)),
+ KeyID: id,
+ }, nil
+}
+
+func (s *SQLStore) GetPreKey(id uint32) (*keys.PreKey, error) {
+ return scanPreKey(s.db.QueryRow(getPreKeyQuery, s.JID, id))
+}
+
+func (s *SQLStore) RemovePreKey(id uint32) error {
+ _, err := s.db.Exec(deletePreKeyQuery, s.JID, id)
+ return err
+}
+
+func (s *SQLStore) MarkPreKeysAsUploaded(upToID uint32) error {
+ _, err := s.db.Exec(markPreKeysAsUploadedQuery, s.JID, upToID)
+ return err
+}
+
+func (s *SQLStore) UploadedPreKeyCount() (count int, err error) {
+ err = s.db.QueryRow(getUploadedPreKeyCountQuery, s.JID).Scan(&count)
+ return
+}
+
+const (
+ getSenderKeyQuery = `SELECT sender_key FROM whatsmeow_sender_keys WHERE our_jid=$1 AND chat_id=$2 AND sender_id=$3`
+ putSenderKeyQuery = `
+ INSERT INTO whatsmeow_sender_keys (our_jid, chat_id, sender_id, sender_key) VALUES ($1, $2, $3, $4)
+ ON CONFLICT (our_jid, chat_id, sender_id) DO UPDATE SET sender_key=$4
+ `
+)
+
+func (s *SQLStore) PutSenderKey(group, user string, session []byte) error {
+ _, err := s.db.Exec(putSenderKeyQuery, s.JID, group, user, session)
+ return err
+}
+
+func (s *SQLStore) GetSenderKey(group, user string) (key []byte, err error) {
+ err = s.db.QueryRow(getSenderKeyQuery, s.JID, group, user).Scan(&key)
+ if errors.Is(err, sql.ErrNoRows) {
+ err = nil
+ }
+ return
+}
+
+const (
+ putAppStateSyncKeyQuery = `
+ INSERT INTO whatsmeow_app_state_sync_keys (jid, key_id, key_data, timestamp, fingerprint) VALUES ($1, $2, $3, $4, $5)
+ ON CONFLICT (jid, key_id) DO UPDATE SET key_data=$3, timestamp=$4, fingerprint=$5
+ `
+ getAppStateSyncKeyQuery = `SELECT key_data, timestamp, fingerprint FROM whatsmeow_app_state_sync_keys WHERE jid=$1 AND key_id=$2`
+)
+
+func (s *SQLStore) PutAppStateSyncKey(id []byte, key store.AppStateSyncKey) error {
+ _, err := s.db.Exec(putAppStateSyncKeyQuery, s.JID, id, key.Data, key.Timestamp, key.Fingerprint)
+ return err
+}
+
+func (s *SQLStore) GetAppStateSyncKey(id []byte) (*store.AppStateSyncKey, error) {
+ var key store.AppStateSyncKey
+ err := s.db.QueryRow(getAppStateSyncKeyQuery, s.JID, id).Scan(&key.Data, &key.Timestamp, &key.Fingerprint)
+ if errors.Is(err, sql.ErrNoRows) {
+ return nil, nil
+ }
+ return &key, err
+}
+
+const (
+ putAppStateVersionQuery = `
+ INSERT INTO whatsmeow_app_state_version (jid, name, version, hash) VALUES ($1, $2, $3, $4)
+ ON CONFLICT (jid, name) DO UPDATE SET version=$3, hash=$4
+ `
+ getAppStateVersionQuery = `SELECT version, hash FROM whatsmeow_app_state_version WHERE jid=$1 AND name=$2`
+ deleteAppStateVersionQuery = `DELETE FROM whatsmeow_app_state_version WHERE jid=$1 AND name=$2`
+ putAppStateMutationMACsQuery = `INSERT INTO whatsmeow_app_state_mutation_macs (jid, name, version, index_mac, value_mac) VALUES `
+ deleteAppStateMutationMACsQueryPostgres = `DELETE FROM whatsmeow_app_state_mutation_macs WHERE jid=$1 AND name=$2 AND index_mac=ANY($3::bytea[])`
+ deleteAppStateMutationMACsQueryGeneric = `DELETE FROM whatsmeow_app_state_mutation_macs WHERE jid=$1 AND name=$2 AND index_mac IN `
+ getAppStateMutationMACQuery = `SELECT value_mac FROM whatsmeow_app_state_mutation_macs WHERE jid=$1 AND name=$2 AND index_mac=$3 ORDER BY version DESC LIMIT 1`
+)
+
+func (s *SQLStore) PutAppStateVersion(name string, version uint64, hash [128]byte) error {
+ _, err := s.db.Exec(putAppStateVersionQuery, s.JID, name, version, hash[:])
+ return err
+}
+
+func (s *SQLStore) GetAppStateVersion(name string) (version uint64, hash [128]byte, err error) {
+ var uncheckedHash []byte
+ err = s.db.QueryRow(getAppStateVersionQuery, s.JID, name).Scan(&version, &uncheckedHash)
+ if errors.Is(err, sql.ErrNoRows) {
+ // version will be 0 and hash will be an empty array, which is the correct initial state
+ err = nil
+ } else if err != nil {
+ // There's an error, just return it
+ } else if len(uncheckedHash) != 128 {
+ // This shouldn't happen
+ err = ErrInvalidLength
+ } else {
+ // No errors, convert hash slice to array
+ hash = *(*[128]byte)(uncheckedHash)
+ }
+ return
+}
+
+func (s *SQLStore) DeleteAppStateVersion(name string) error {
+ _, err := s.db.Exec(deleteAppStateVersionQuery, s.JID, name)
+ return err
+}
+
+type execable interface {
+ Exec(query string, args ...interface{}) (sql.Result, error)
+}
+
+func (s *SQLStore) putAppStateMutationMACs(tx execable, name string, version uint64, mutations []store.AppStateMutationMAC) error {
+ values := make([]interface{}, 3+len(mutations)*2)
+ queryParts := make([]string, len(mutations))
+ values[0] = s.JID
+ values[1] = name
+ values[2] = version
+ for i, mutation := range mutations {
+ baseIndex := 3 + i*2
+ values[baseIndex] = mutation.IndexMAC
+ values[baseIndex+1] = mutation.ValueMAC
+ if s.dialect == "sqlite3" {
+ queryParts[i] = fmt.Sprintf("(?1, ?2, ?3, ?%d, ?%d)", baseIndex+1, baseIndex+2)
+ } else {
+ queryParts[i] = fmt.Sprintf("($1, $2, $3, $%d, $%d)", baseIndex+1, baseIndex+2)
+ }
+ }
+ _, err := tx.Exec(putAppStateMutationMACsQuery+strings.Join(queryParts, ","), values...)
+ return err
+}
+
+const mutationBatchSize = 400
+
+func (s *SQLStore) PutAppStateMutationMACs(name string, version uint64, mutations []store.AppStateMutationMAC) error {
+ if len(mutations) > mutationBatchSize {
+ tx, err := s.db.Begin()
+ if err != nil {
+ return fmt.Errorf("failed to start transaction: %w", err)
+ }
+ for i := 0; i < len(mutations); i += mutationBatchSize {
+ var mutationSlice []store.AppStateMutationMAC
+ if len(mutations) > i+mutationBatchSize {
+ mutationSlice = mutations[i : i+mutationBatchSize]
+ } else {
+ mutationSlice = mutations[i:]
+ }
+ err = s.putAppStateMutationMACs(tx, name, version, mutationSlice)
+ if err != nil {
+ _ = tx.Rollback()
+ return err
+ }
+ }
+ err = tx.Commit()
+ if err != nil {
+ return fmt.Errorf("failed to commit transaction: %w", err)
+ }
+ return nil
+ } else if len(mutations) > 0 {
+ return s.putAppStateMutationMACs(s.db, name, version, mutations)
+ }
+ return nil
+}
+
+func (s *SQLStore) DeleteAppStateMutationMACs(name string, indexMACs [][]byte) (err error) {
+ if len(indexMACs) == 0 {
+ return
+ }
+ if s.dialect == "postgres" && PostgresArrayWrapper != nil {
+ _, err = s.db.Exec(deleteAppStateMutationMACsQueryPostgres, s.JID, name, PostgresArrayWrapper(indexMACs))
+ } else {
+ args := make([]interface{}, 2+len(indexMACs))
+ args[0] = s.JID
+ args[1] = name
+ queryParts := make([]string, len(indexMACs))
+ for i, item := range indexMACs {
+ args[2+i] = item
+ queryParts[i] = fmt.Sprintf("$%d", i+3)
+ }
+ _, err = s.db.Exec(deleteAppStateMutationMACsQueryGeneric+"("+strings.Join(queryParts, ",")+")", args...)
+ }
+ return
+}
+
+func (s *SQLStore) GetAppStateMutationMAC(name string, indexMAC []byte) (valueMAC []byte, err error) {
+ err = s.db.QueryRow(getAppStateMutationMACQuery, s.JID, name, indexMAC).Scan(&valueMAC)
+ if errors.Is(err, sql.ErrNoRows) {
+ err = nil
+ }
+ return
+}
+
+const (
+ putContactNameQuery = `
+ INSERT INTO whatsmeow_contacts (our_jid, their_jid, first_name, full_name) VALUES ($1, $2, $3, $4)
+ ON CONFLICT (our_jid, their_jid) DO UPDATE SET first_name=$3, full_name=$4
+ `
+ putPushNameQuery = `
+ INSERT INTO whatsmeow_contacts (our_jid, their_jid, push_name) VALUES ($1, $2, $3)
+ ON CONFLICT (our_jid, their_jid) DO UPDATE SET push_name=$3
+ `
+ putBusinessNameQuery = `
+ INSERT INTO whatsmeow_contacts (our_jid, their_jid, business_name) VALUES ($1, $2, $3)
+ ON CONFLICT (our_jid, their_jid) DO UPDATE SET business_name=$3
+ `
+ getContactQuery = `
+ SELECT first_name, full_name, push_name, business_name FROM whatsmeow_contacts WHERE our_jid=$1 AND their_jid=$2
+ `
+ getAllContactsQuery = `
+ SELECT their_jid, first_name, full_name, push_name, business_name FROM whatsmeow_contacts WHERE our_jid=$1
+ `
+)
+
+func (s *SQLStore) PutPushName(user types.JID, pushName string) (bool, string, error) {
+ s.contactCacheLock.Lock()
+ defer s.contactCacheLock.Unlock()
+
+ cached, err := s.getContact(user)
+ if err != nil {
+ return false, "", err
+ }
+ if cached.PushName != pushName {
+ _, err = s.db.Exec(putPushNameQuery, s.JID, user, pushName)
+ if err != nil {
+ return false, "", err
+ }
+ previousName := cached.PushName
+ cached.PushName = pushName
+ cached.Found = true
+ return true, previousName, nil
+ }
+ return false, "", nil
+}
+
+func (s *SQLStore) PutBusinessName(user types.JID, businessName string) error {
+ s.contactCacheLock.Lock()
+ defer s.contactCacheLock.Unlock()
+
+ cached, err := s.getContact(user)
+ if err != nil {
+ return err
+ }
+ if cached.BusinessName != businessName {
+ _, err = s.db.Exec(putBusinessNameQuery, s.JID, user, businessName)
+ if err != nil {
+ return err
+ }
+ cached.BusinessName = businessName
+ cached.Found = true
+ }
+ return nil
+}
+
+func (s *SQLStore) PutContactName(user types.JID, firstName, fullName string) error {
+ s.contactCacheLock.Lock()
+ defer s.contactCacheLock.Unlock()
+
+ cached, err := s.getContact(user)
+ if err != nil {
+ return err
+ }
+ if cached.FirstName != firstName || cached.FullName != fullName {
+ _, err = s.db.Exec(putContactNameQuery, s.JID, user, firstName, fullName)
+ if err != nil {
+ return err
+ }
+ cached.FirstName = firstName
+ cached.FullName = fullName
+ cached.Found = true
+ }
+ return nil
+}
+
+func (s *SQLStore) getContact(user types.JID) (*types.ContactInfo, error) {
+ cached, ok := s.contactCache[user]
+ if ok {
+ return cached, nil
+ }
+
+ var first, full, push, business sql.NullString
+ err := s.db.QueryRow(getContactQuery, s.JID, user).Scan(&first, &full, &push, &business)
+ if err != nil && !errors.Is(err, sql.ErrNoRows) {
+ return nil, err
+ }
+ info := &types.ContactInfo{
+ Found: err == nil,
+ FirstName: first.String,
+ FullName: full.String,
+ PushName: push.String,
+ BusinessName: business.String,
+ }
+ s.contactCache[user] = info
+ return info, nil
+}
+
+func (s *SQLStore) GetContact(user types.JID) (types.ContactInfo, error) {
+ s.contactCacheLock.Lock()
+ info, err := s.getContact(user)
+ s.contactCacheLock.Unlock()
+ if err != nil {
+ return types.ContactInfo{}, err
+ }
+ return *info, nil
+}
+
+func (s *SQLStore) GetAllContacts() (map[types.JID]types.ContactInfo, error) {
+ s.contactCacheLock.Lock()
+ defer s.contactCacheLock.Unlock()
+ rows, err := s.db.Query(getAllContactsQuery, s.JID)
+ if err != nil {
+ return nil, err
+ }
+ output := make(map[types.JID]types.ContactInfo, len(s.contactCache))
+ for rows.Next() {
+ var jid types.JID
+ var first, full, push, business sql.NullString
+ err = rows.Scan(&jid, &first, &full, &push, &business)
+ if err != nil {
+ return nil, fmt.Errorf("error scanning row: %w", err)
+ }
+ info := types.ContactInfo{
+ Found: true,
+ FirstName: first.String,
+ FullName: full.String,
+ PushName: push.String,
+ BusinessName: business.String,
+ }
+ output[jid] = info
+ s.contactCache[jid] = &info
+ }
+ return output, nil
+}
+
+const (
+ putChatSettingQuery = `
+ INSERT INTO whatsmeow_chat_settings (our_jid, chat_jid, %[1]s) VALUES ($1, $2, $3)
+ ON CONFLICT (our_jid, chat_jid) DO UPDATE SET %[1]s=$3
+ `
+ getChatSettingsQuery = `
+ SELECT muted_until, pinned, archived FROM whatsmeow_chat_settings WHERE our_jid=$1 AND chat_jid=$2
+ `
+)
+
+func (s *SQLStore) PutMutedUntil(chat types.JID, mutedUntil time.Time) error {
+ var val int64
+ if !mutedUntil.IsZero() {
+ val = mutedUntil.Unix()
+ }
+ _, err := s.db.Exec(fmt.Sprintf(putChatSettingQuery, "muted_until"), s.JID, chat, val)
+ return err
+}
+
+func (s *SQLStore) PutPinned(chat types.JID, pinned bool) error {
+ _, err := s.db.Exec(fmt.Sprintf(putChatSettingQuery, "pinned"), s.JID, chat, pinned)
+ return err
+}
+
+func (s *SQLStore) PutArchived(chat types.JID, archived bool) error {
+ _, err := s.db.Exec(fmt.Sprintf(putChatSettingQuery, "archived"), s.JID, chat, archived)
+ return err
+}
+
+func (s *SQLStore) GetChatSettings(chat types.JID) (settings types.LocalChatSettings, err error) {
+ var mutedUntil int64
+ err = s.db.QueryRow(getChatSettingsQuery, s.JID, chat).Scan(&mutedUntil, &settings.Pinned, &settings.Archived)
+ if errors.Is(err, sql.ErrNoRows) {
+ err = nil
+ } else if err != nil {
+ return
+ } else {
+ settings.Found = true
+ }
+ if mutedUntil != 0 {
+ settings.MutedUntil = time.Unix(mutedUntil, 0)
+ }
+ return
+}
diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go
new file mode 100644
index 00000000..b98f2d61
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go
@@ -0,0 +1,214 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package sqlstore
+
+import (
+ "database/sql"
+)
+
+type upgradeFunc func(*sql.Tx, *Container) error
+
+// Upgrades is a list of functions that will upgrade a database to the latest version.
+//
+// This may be of use if you want to manage the database fully manually, but in most cases you
+// should just call Container.Upgrade to let the library handle everything.
+var Upgrades = [...]upgradeFunc{upgradeV1}
+
+func (c *Container) getVersion() (int, error) {
+ _, err := c.db.Exec("CREATE TABLE IF NOT EXISTS whatsmeow_version (version INTEGER)")
+ if err != nil {
+ return -1, err
+ }
+
+ version := 0
+ row := c.db.QueryRow("SELECT version FROM whatsmeow_version LIMIT 1")
+ if row != nil {
+ _ = row.Scan(&version)
+ }
+ return version, nil
+}
+
+func (c *Container) setVersion(tx *sql.Tx, version int) error {
+ _, err := tx.Exec("DELETE FROM whatsmeow_version")
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec("INSERT INTO whatsmeow_version (version) VALUES ($1)", version)
+ return err
+}
+
+// Upgrade upgrades the database from the current to the latest version available.
+func (c *Container) Upgrade() error {
+ version, err := c.getVersion()
+ if err != nil {
+ return err
+ }
+
+ for ; version < len(Upgrades); version++ {
+ var tx *sql.Tx
+ tx, err = c.db.Begin()
+ if err != nil {
+ return err
+ }
+
+ migrateFunc := Upgrades[version]
+ err = migrateFunc(tx, c)
+ if err != nil {
+ _ = tx.Rollback()
+ return err
+ }
+
+ if err = c.setVersion(tx, version+1); err != nil {
+ return err
+ }
+
+ if err = tx.Commit(); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func upgradeV1(tx *sql.Tx, _ *Container) error {
+ _, err := tx.Exec(`CREATE TABLE whatsmeow_device (
+ jid TEXT PRIMARY KEY,
+
+ registration_id BIGINT NOT NULL CHECK ( registration_id >= 0 AND registration_id < 4294967296 ),
+
+ noise_key bytea NOT NULL CHECK ( length(noise_key) = 32 ),
+ identity_key bytea NOT NULL CHECK ( length(identity_key) = 32 ),
+
+ signed_pre_key bytea NOT NULL CHECK ( length(signed_pre_key) = 32 ),
+ signed_pre_key_id INTEGER NOT NULL CHECK ( signed_pre_key_id >= 0 AND signed_pre_key_id < 16777216 ),
+ signed_pre_key_sig bytea NOT NULL CHECK ( length(signed_pre_key_sig) = 64 ),
+
+ adv_key bytea NOT NULL,
+ adv_details bytea NOT NULL,
+ adv_account_sig bytea NOT NULL CHECK ( length(adv_account_sig) = 64 ),
+ adv_device_sig bytea NOT NULL CHECK ( length(adv_device_sig) = 64 ),
+
+ platform TEXT NOT NULL DEFAULT '',
+ business_name TEXT NOT NULL DEFAULT '',
+ push_name TEXT NOT NULL DEFAULT ''
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_identity_keys (
+ our_jid TEXT,
+ their_id TEXT,
+ identity bytea NOT NULL CHECK ( length(identity) = 32 ),
+
+ PRIMARY KEY (our_jid, their_id),
+ FOREIGN KEY (our_jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_pre_keys (
+ jid TEXT,
+ key_id INTEGER CHECK ( key_id >= 0 AND key_id < 16777216 ),
+ key bytea NOT NULL CHECK ( length(key) = 32 ),
+ uploaded BOOLEAN NOT NULL,
+
+ PRIMARY KEY (jid, key_id),
+ FOREIGN KEY (jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_sessions (
+ our_jid TEXT,
+ their_id TEXT,
+ session bytea,
+
+ PRIMARY KEY (our_jid, their_id),
+ FOREIGN KEY (our_jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_sender_keys (
+ our_jid TEXT,
+ chat_id TEXT,
+ sender_id TEXT,
+ sender_key bytea NOT NULL,
+
+ PRIMARY KEY (our_jid, chat_id, sender_id),
+ FOREIGN KEY (our_jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_app_state_sync_keys (
+ jid TEXT,
+ key_id bytea,
+ key_data bytea NOT NULL,
+ timestamp BIGINT NOT NULL,
+ fingerprint bytea NOT NULL,
+
+ PRIMARY KEY (jid, key_id),
+ FOREIGN KEY (jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_app_state_version (
+ jid TEXT,
+ name TEXT,
+ version BIGINT NOT NULL,
+ hash bytea NOT NULL CHECK ( length(hash) = 128 ),
+
+ PRIMARY KEY (jid, name),
+ FOREIGN KEY (jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_app_state_mutation_macs (
+ jid TEXT,
+ name TEXT,
+ version BIGINT,
+ index_mac bytea CHECK ( length(index_mac) = 32 ),
+ value_mac bytea NOT NULL CHECK ( length(value_mac) = 32 ),
+
+ PRIMARY KEY (jid, name, version, index_mac),
+ FOREIGN KEY (jid, name) REFERENCES whatsmeow_app_state_version(jid, name) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_contacts (
+ our_jid TEXT,
+ their_jid TEXT,
+ first_name TEXT,
+ full_name TEXT,
+ push_name TEXT,
+ business_name TEXT,
+
+ PRIMARY KEY (our_jid, their_jid),
+ FOREIGN KEY (our_jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ _, err = tx.Exec(`CREATE TABLE whatsmeow_chat_settings (
+ our_jid TEXT,
+ chat_jid TEXT,
+ muted_until BIGINT NOT NULL DEFAULT 0,
+ pinned BOOLEAN NOT NULL DEFAULT false,
+ archived BOOLEAN NOT NULL DEFAULT false,
+
+ PRIMARY KEY (our_jid, chat_jid),
+ FOREIGN KEY (our_jid) REFERENCES whatsmeow_device(jid) ON DELETE CASCADE ON UPDATE CASCADE
+ )`)
+ if err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/store/store.go b/vendor/go.mau.fi/whatsmeow/store/store.go
new file mode 100644
index 00000000..65624b9f
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/store/store.go
@@ -0,0 +1,132 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package store contains interfaces for storing data needed for WhatsApp multidevice.
+package store
+
+import (
+ "time"
+
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/util/keys"
+ waLog "go.mau.fi/whatsmeow/util/log"
+)
+
+type IdentityStore interface {
+ PutIdentity(address string, key [32]byte) error
+ DeleteAllIdentities(phone string) error
+ DeleteIdentity(address string) error
+ IsTrustedIdentity(address string, key [32]byte) (bool, error)
+}
+
+type SessionStore interface {
+ GetSession(address string) ([]byte, error)
+ HasSession(address string) (bool, error)
+ PutSession(address string, session []byte) error
+ DeleteAllSessions(phone string) error
+ DeleteSession(address string) error
+}
+
+type PreKeyStore interface {
+ GetOrGenPreKeys(count uint32) ([]*keys.PreKey, error)
+ GenOnePreKey() (*keys.PreKey, error)
+ GetPreKey(id uint32) (*keys.PreKey, error)
+ RemovePreKey(id uint32) error
+ MarkPreKeysAsUploaded(upToID uint32) error
+ UploadedPreKeyCount() (int, error)
+}
+
+type SenderKeyStore interface {
+ PutSenderKey(group, user string, session []byte) error
+ GetSenderKey(group, user string) ([]byte, error)
+}
+
+type AppStateSyncKey struct {
+ Data []byte
+ Fingerprint []byte
+ Timestamp int64
+}
+
+type AppStateSyncKeyStore interface {
+ PutAppStateSyncKey(id []byte, key AppStateSyncKey) error
+ GetAppStateSyncKey(id []byte) (*AppStateSyncKey, error)
+}
+
+type AppStateMutationMAC struct {
+ IndexMAC []byte
+ ValueMAC []byte
+}
+
+type AppStateStore interface {
+ PutAppStateVersion(name string, version uint64, hash [128]byte) error
+ GetAppStateVersion(name string) (uint64, [128]byte, error)
+ DeleteAppStateVersion(name string) error
+
+ PutAppStateMutationMACs(name string, version uint64, mutations []AppStateMutationMAC) error
+ DeleteAppStateMutationMACs(name string, indexMACs [][]byte) error
+ GetAppStateMutationMAC(name string, indexMAC []byte) (valueMAC []byte, err error)
+}
+
+type ContactStore interface {
+ PutPushName(user types.JID, pushName string) (bool, string, error)
+ PutBusinessName(user types.JID, businessName string) error
+ PutContactName(user types.JID, fullName, firstName string) error
+ GetContact(user types.JID) (types.ContactInfo, error)
+ GetAllContacts() (map[types.JID]types.ContactInfo, error)
+}
+
+type ChatSettingsStore interface {
+ PutMutedUntil(chat types.JID, mutedUntil time.Time) error
+ PutPinned(chat types.JID, pinned bool) error
+ PutArchived(chat types.JID, archived bool) error
+ GetChatSettings(chat types.JID) (types.LocalChatSettings, error)
+}
+
+type DeviceContainer interface {
+ PutDevice(store *Device) error
+ DeleteDevice(store *Device) error
+}
+
+type Device struct {
+ Log waLog.Logger
+
+ NoiseKey *keys.KeyPair
+ IdentityKey *keys.KeyPair
+ SignedPreKey *keys.PreKey
+ RegistrationID uint32
+ AdvSecretKey []byte
+
+ ID *types.JID
+ Account *waProto.ADVSignedDeviceIdentity
+ Platform string
+ BusinessName string
+ PushName string
+
+ Initialized bool
+ Identities IdentityStore
+ Sessions SessionStore
+ PreKeys PreKeyStore
+ SenderKeys SenderKeyStore
+ AppStateKeys AppStateSyncKeyStore
+ AppState AppStateStore
+ Contacts ContactStore
+ ChatSettings ChatSettingsStore
+ Container DeviceContainer
+}
+
+func (device *Device) Save() error {
+ return device.Container.PutDevice(device)
+}
+
+func (device *Device) Delete() error {
+ err := device.Container.DeleteDevice(device)
+ if err != nil {
+ return err
+ }
+ device.ID = nil
+ return nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/call.go b/vendor/go.mau.fi/whatsmeow/types/call.go
new file mode 100644
index 00000000..cd69f24b
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/call.go
@@ -0,0 +1,21 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package types
+
+import "time"
+
+type BasicCallMeta struct {
+ From JID
+ Timestamp time.Time
+ CallCreator JID
+ CallID string
+}
+
+type CallRemoteMeta struct {
+ RemotePlatform string // The platform of the caller's WhatsApp client
+ RemoteVersion string // Version of the caller's WhatsApp client
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/events/appstate.go b/vendor/go.mau.fi/whatsmeow/types/events/appstate.go
new file mode 100644
index 00000000..720a940c
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/events/appstate.go
@@ -0,0 +1,103 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package events
+
+import (
+ "time"
+
+ "go.mau.fi/whatsmeow/appstate"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+)
+
+// Contact is emitted when an entry in the user's contact list is modified from another device.
+type Contact struct {
+ JID types.JID // The contact who was modified.
+ Timestamp time.Time // The time when the modification happened.'
+
+ Action *waProto.ContactAction // The new contact info.
+}
+
+// PushName is emitted when a message is received with a different push name than the previous value cached for the same user.
+type PushName struct {
+ JID types.JID // The user whose push name changed.
+ Message *types.MessageInfo // The message where this change was first noticed.
+ OldPushName string // The previous push name from the local cache.
+ NewPushName string // The new push name that was included in the message.
+}
+
+// Pin is emitted when a chat is pinned or unpinned from another device.
+type Pin struct {
+ JID types.JID // The chat which was pinned or unpinned.
+ Timestamp time.Time // The time when the (un)pinning happened.
+
+ Action *waProto.PinAction // Whether the chat is now pinned or not.
+}
+
+// Star is emitted when a message is starred or unstarred from another device.
+type Star struct {
+ ChatJID types.JID // The chat where the message was pinned.
+ SenderJID types.JID // In group chats, the user who sent the message (except if the message was sent by the user).
+ IsFromMe bool // Whether the message was sent by the user.
+ MessageID string // The message which was starred or unstarred.
+ Timestamp time.Time // The time when the (un)starring happened.
+
+ Action *waProto.StarAction // Whether the message is now starred or not.
+}
+
+// DeleteForMe is emitted when a message is deleted (for the current user only) from another device.
+type DeleteForMe struct {
+ ChatJID types.JID // The chat where the message was deleted.
+ SenderJID types.JID // In group chats, the user who sent the message (except if the message was sent by the user).
+ IsFromMe bool // Whether the message was sent by the user.
+ MessageID string // The message which was deleted.
+ Timestamp time.Time // The time when the deletion happened.
+
+ Action *waProto.DeleteMessageForMeAction // Additional information for the deletion.
+}
+
+// Mute is emitted when a chat is muted or unmuted from another device.
+type Mute struct {
+ JID types.JID // The chat which was muted or unmuted.
+ Timestamp time.Time // The time when the (un)muting happened.
+
+ Action *waProto.MuteAction // The current mute status of the chat.
+}
+
+// Archive is emitted when a chat is archived or unarchived from another device.
+type Archive struct {
+ JID types.JID // The chat which was archived or unarchived.
+ Timestamp time.Time // The time when the (un)archiving happened.
+
+ Action *waProto.ArchiveChatAction // The current archival status of the chat.
+}
+
+// PushNameSetting is emitted when the user's push name is changed from another device.
+type PushNameSetting struct {
+ Timestamp time.Time // The time when the push name was changed.
+
+ Action *waProto.PushNameSetting // The new push name for the user.
+}
+
+// UnarchiveChatsSetting is emitted when the user changes the "Keep chats archived" setting from another device.
+type UnarchiveChatsSetting struct {
+ Timestamp time.Time // The time when the setting was changed.
+
+ Action *waProto.UnarchiveChatsSetting // The new settings.
+}
+
+// AppState is emitted directly for new data received from app state syncing.
+// You should generally use the higher-level events like events.Contact and events.Mute.
+type AppState struct {
+ Index []string
+ *waProto.SyncActionValue
+}
+
+// AppStateSyncComplete is emitted when app state is resynced.
+type AppStateSyncComplete struct {
+ Name appstate.WAPatchName
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/events/call.go b/vendor/go.mau.fi/whatsmeow/types/events/call.go
new file mode 100644
index 00000000..3622cb53
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/events/call.go
@@ -0,0 +1,57 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package events
+
+import (
+ waBinary "go.mau.fi/whatsmeow/binary"
+ "go.mau.fi/whatsmeow/types"
+)
+
+// CallOffer is emitted when the user receives a call on WhatsApp.
+type CallOffer struct {
+ types.BasicCallMeta
+ types.CallRemoteMeta
+
+ Data *waBinary.Node // The call offer data
+}
+
+// CallAccept is emitted when a call is accepted on WhatsApp.
+type CallAccept struct {
+ types.BasicCallMeta
+ types.CallRemoteMeta
+
+ Data *waBinary.Node
+}
+
+// CallOfferNotice is emitted when the user receives a notice of a call on WhatsApp.
+// This seems to be primarily for group calls (whereas CallOffer is for 1:1 calls).
+type CallOfferNotice struct {
+ types.BasicCallMeta
+
+ Media string // "audio" or "video" depending on call type
+ Type string // "group" when it's a group call
+
+ Data *waBinary.Node
+}
+
+// CallRelayLatency is emitted slightly after the user receives a call on WhatsApp.
+type CallRelayLatency struct {
+ types.BasicCallMeta
+ Data *waBinary.Node
+}
+
+// CallTerminate is emitted when the other party terminates a call on WhatsApp.
+type CallTerminate struct {
+ types.BasicCallMeta
+ Reason string
+ Data *waBinary.Node
+}
+
+// UnknownCallEvent is emitted when a call element with unknown content is received.
+type UnknownCallEvent struct {
+ Node *waBinary.Node
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/events/events.go b/vendor/go.mau.fi/whatsmeow/types/events/events.go
new file mode 100644
index 00000000..7a43082c
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/events/events.go
@@ -0,0 +1,263 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package events contains all the events that whatsmeow.Client emits to functions registered with AddEventHandler.
+package events
+
+import (
+ "fmt"
+ "time"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+)
+
+// QR is emitted after connecting when there's no session data in the device store.
+//
+// The QR codes are available in the Codes slice. You should render the strings as QR codes one by
+// one, switching to the next one whenever enough time has passed. WhatsApp web seems to show the
+// first code for 60 seconds and all other codes for 20 seconds.
+//
+// When the QR code has been scanned and pairing is complete, PairSuccess will be emitted. If you
+// run out of codes before scanning, the server will close the websocket, and you will have to
+// reconnect to get more codes.
+type QR struct {
+ Codes []string
+}
+
+// PairSuccess is emitted after the QR code has been scanned with the phone and the handshake has
+// been completed. Note that this is generally followed by a websocket reconnection, so you should
+// wait for the Connected before trying to send anything.
+type PairSuccess struct {
+ ID types.JID
+ BusinessName string
+ Platform string
+}
+
+// PairError is emitted when a pair-success event is received from the server, but finishing the pairing locally fails.
+type PairError struct {
+ ID types.JID
+ BusinessName string
+ Platform string
+ Error error
+}
+
+// QRScannedWithoutMultidevice is emitted when the pairing QR code is scanned, but the phone didn't have multidevice enabled.
+// The same QR code can still be scanned after this event, which means the user can just be told to enable multidevice and re-scan the code.
+type QRScannedWithoutMultidevice struct{}
+
+// Connected is emitted when the client has successfully connected to the WhatsApp servers
+// and is authenticated. The user who the client is authenticated as will be in the device store
+// at this point, which is why this event doesn't contain any data.
+type Connected struct{}
+
+// LoggedOut is emitted when the client has been unpaired from the phone.
+//
+// This can happen while connected (stream:error messages) or right after connecting (connect failure messages).
+type LoggedOut struct {
+ // OnConnect is true if the event was triggered by a connect failure message.
+ // If it's false, the event was triggered by a stream:error message.
+ OnConnect bool
+}
+
+// StreamReplaced is emitted when the client is disconnected by another client connecting with the same keys.
+//
+// This can happen if you accidentally start another process with the same session
+// or otherwise try to connect twice with the same session.
+type StreamReplaced struct{}
+
+// ConnectFailure is emitted when the WhatsApp server sends a <failure> node with an unknown reason.
+//
+// Known reasons are handled internally and emitted as different events (e.g. LoggedOut).
+type ConnectFailure struct {
+ Reason string
+ Raw *waBinary.Node
+}
+
+// StreamError is emitted when the WhatsApp server sends a <stream:error> node with an unknown code.
+//
+// Known codes are handled internally and emitted as different events (e.g. LoggedOut).
+type StreamError struct {
+ Code string
+ Raw *waBinary.Node
+}
+
+// Disconnected is emitted when the websocket is closed by the server.
+type Disconnected struct{}
+
+// HistorySync is emitted when the phone has sent a blob of historical messages.
+type HistorySync struct {
+ Data *waProto.HistorySync
+}
+
+// UndecryptableMessage is emitted when receiving a new message that failed to decrypt.
+//
+// The library will automatically ask the sender to retry. If the sender resends the message,
+// and it's decryptable, then it will be emitted as a normal Message event.
+//
+// The UndecryptableMessage event may also be repeated if the resent message is also undecryptable.
+type UndecryptableMessage struct {
+ Info types.MessageInfo
+
+ // IsUnavailable is true if the recipient device didn't send a ciphertext to this device at all
+ // (as opposed to sending a ciphertext, but the ciphertext not being decryptable).
+ IsUnavailable bool
+}
+
+// Message is emitted when receiving a new message.
+type Message struct {
+ Info types.MessageInfo // Information about the message like the chat and sender IDs
+ Message *waProto.Message // The actual message struct
+
+ IsEphemeral bool // True if the message was unwrapped from an EphemeralMessage
+ IsViewOnce bool // True if the message was unwrapped from a ViewOnceMessage
+
+ // The raw message struct. This is the raw unmodified data, which means the actual message might
+ // be wrapped in DeviceSentMessage, EphemeralMessage or ViewOnceMessage.
+ RawMessage *waProto.Message
+}
+
+// ReceiptType represents the type of a Receipt event.
+type ReceiptType string
+
+const (
+ // ReceiptTypeDelivered means the message was delivered to the device (but the user might not have noticed).
+ ReceiptTypeDelivered ReceiptType = ""
+ // ReceiptTypeRetry means the message was delivered to the device, but decrypting the message failed.
+ ReceiptTypeRetry ReceiptType = "retry"
+ // ReceiptTypeRead means the user opened the chat and saw the message.
+ ReceiptTypeRead ReceiptType = "read"
+ // ReceiptTypeReadSelf means the current user read a message from a different device, and has read receipts disabled in privacy settings.
+ ReceiptTypeReadSelf ReceiptType = "read-self"
+)
+
+// GoString returns the name of the Go constant for the ReceiptType value.
+func (rt ReceiptType) GoString() string {
+ switch rt {
+ case ReceiptTypeRead:
+ return "events.ReceiptTypeRead"
+ case ReceiptTypeReadSelf:
+ return "events.ReceiptTypeReadSelf"
+ case ReceiptTypeDelivered:
+ return "events.ReceiptTypeDelivered"
+ default:
+ return fmt.Sprintf("events.ReceiptType(%#v)", string(rt))
+ }
+}
+
+// Receipt is emitted when an outgoing message is delivered to or read by another user, or when another device reads an incoming message.
+//
+// N.B. WhatsApp on Android sends message IDs from newest message to oldest, but WhatsApp on iOS sends them in the opposite order (oldest first).
+type Receipt struct {
+ types.MessageSource
+ MessageIDs []types.MessageID
+ Timestamp time.Time
+ Type ReceiptType
+}
+
+// ChatPresence is emitted when a chat state update (also known as typing notification) is received.
+//
+// Note that WhatsApp won't send you these updates unless you mark yourself as online:
+// client.SendPresence(types.PresenceAvailable)
+type ChatPresence struct {
+ types.MessageSource
+ State types.ChatPresence
+}
+
+// Presence is emitted when a presence update is received.
+//
+// Note that WhatsApp only sends you presence updates for individual users after you subscribe to them:
+// client.SubscribePresence(user JID)
+type Presence struct {
+ // The user whose presence event this is
+ From types.JID
+ // True if the user is now offline
+ Unavailable bool
+ // The time when the user was last online. This may be the zero value if the user has hid their last seen time.
+ LastSeen time.Time
+}
+
+// JoinedGroup is emitted when you join or are added to a group.
+type JoinedGroup struct {
+ Reason string // If the event was triggered by you using an invite link, this will be "invite"
+ types.GroupInfo
+}
+
+// GroupInfo is emitted when the metadata of a group changes.
+type GroupInfo struct {
+ JID types.JID // The group ID in question
+ Notify string // Seems like a top-level type for the invite
+ Sender *types.JID // The user who made the change. Doesn't seem to be present when notify=invite
+ Timestamp time.Time // The time when the change occurred
+
+ Name *types.GroupName // Group name change
+ Topic *types.GroupTopic // Group topic (description) change
+ Locked *types.GroupLocked // Group locked status change (can only admins edit group info?)
+ Announce *types.GroupAnnounce // Group announce status change (can only admins send messages?)
+ Ephemeral *types.GroupEphemeral // Disappearing messages change
+
+ NewInviteLink *string // Group invite link change
+
+ PrevParticipantVersionID string
+ ParticipantVersionID string
+
+ JoinReason string // This will be "invite" if the user joined via invite link
+
+ Join []types.JID // Users who joined or were added the group
+ Leave []types.JID // Users who left or were removed from the group
+
+ Promote []types.JID // Users who were promoted to admins
+ Demote []types.JID // Users who were demoted to normal users
+
+ UnknownChanges []*waBinary.Node
+}
+
+// Picture is emitted when a user's profile picture or group's photo is changed.
+//
+// You can use Client.GetProfilePictureInfo to get the actual image URL after this event.
+type Picture struct {
+ JID types.JID // The user or group ID where the picture was changed.
+ Author types.JID // The user who changed the picture.
+ Timestamp time.Time // The timestamp when the picture was changed.
+ Remove bool // True if the picture was removed.
+ PictureID string // The new picture ID if it was not removed.
+}
+
+// IdentityChange is emitted when another user changes their primary device.
+type IdentityChange struct {
+ JID types.JID
+ Timestamp time.Time
+
+ // Implicit will be set to true if the event was triggered by an untrusted identity error,
+ // rather than an identity change notification from the server.
+ Implicit bool
+}
+
+// PrivacySettings is emitted when the user changes their privacy settings.
+type PrivacySettings struct {
+ NewSettings types.PrivacySettings
+ GroupAddChanged bool
+ LastSeenChanged bool
+ StatusChanged bool
+ ProfileChanged bool
+ ReadReceiptsChanged bool
+}
+
+// OfflineSyncPreview is emitted right after connecting if the server is going to send events that the client missed during downtime.
+type OfflineSyncPreview struct {
+ Total int
+
+ AppDataChanges int
+ Messages int
+ Notifications int
+ Receipts int
+}
+
+// OfflineSyncCompleted is emitted after the server has finished sending missed events.
+type OfflineSyncCompleted struct {
+ Count int
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/group.go b/vendor/go.mau.fi/whatsmeow/types/group.go
new file mode 100644
index 00000000..ed798815
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/group.go
@@ -0,0 +1,67 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package types
+
+import (
+ "time"
+)
+
+// GroupInfo contains basic information about a group chat on WhatsApp.
+type GroupInfo struct {
+ JID JID
+ OwnerJID JID
+
+ GroupName
+ GroupTopic
+ GroupLocked
+ GroupAnnounce
+ GroupEphemeral
+
+ GroupCreated time.Time
+
+ ParticipantVersionID string
+ Participants []GroupParticipant
+}
+
+// GroupName contains the name of a group along with metadata of who set it and when.
+type GroupName struct {
+ Name string
+ NameSetAt time.Time
+ NameSetBy JID
+}
+
+// GroupTopic contains the topic (description) of a group along with metadata of who set it and when.
+type GroupTopic struct {
+ Topic string
+ TopicID string
+ TopicSetAt time.Time
+ TopicSetBy JID
+}
+
+// GroupLocked specifies whether the group info can only be edited by admins.
+type GroupLocked struct {
+ IsLocked bool
+}
+
+// GroupAnnounce specifies whether only admins can send messages in the group.
+type GroupAnnounce struct {
+ IsAnnounce bool
+ AnnounceVersionID string
+}
+
+// GroupParticipant contains info about a participant of a WhatsApp group chat.
+type GroupParticipant struct {
+ JID JID
+ IsAdmin bool
+ IsSuperAdmin bool
+}
+
+// GroupEphemeral contains the group's disappearing messages settings.
+type GroupEphemeral struct {
+ IsEphemeral bool
+ DisappearingTimer uint32
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/jid.go b/vendor/go.mau.fi/whatsmeow/types/jid.go
new file mode 100644
index 00000000..d203c224
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/jid.go
@@ -0,0 +1,193 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package types contains various structs and other types used by whatsmeow.
+package types
+
+import (
+ "database/sql"
+ "database/sql/driver"
+ "fmt"
+ "strconv"
+ "strings"
+
+ signalProtocol "go.mau.fi/libsignal/protocol"
+)
+
+// Known JID servers on WhatsApp
+const (
+ DefaultUserServer = "s.whatsapp.net"
+ GroupServer = "g.us"
+ LegacyUserServer = "c.us"
+ BroadcastServer = "broadcast"
+)
+
+// Some JIDs that are contacted often.
+var (
+ EmptyJID = JID{}
+ GroupServerJID = NewJID("", GroupServer)
+ ServerJID = NewJID("", DefaultUserServer)
+ BroadcastServerJID = NewJID("", BroadcastServer)
+ StatusBroadcastJID = NewJID("status", BroadcastServer)
+ PSAJID = NewJID("0", LegacyUserServer)
+ OfficialBusinessJID = NewJID("16505361212", LegacyUserServer)
+)
+
+// MessageID is the internal ID of a WhatsApp message.
+type MessageID = string
+
+// JID represents a WhatsApp user ID.
+//
+// There are two types of JIDs: regular JID pairs (user and server) and AD-JIDs (user, agent and device).
+// AD JIDs are only used to refer to specific devices of users, so the server is always s.whatsapp.net (DefaultUserServer).
+// Regular JIDs can be used for entities on any servers (users, groups, broadcasts).
+type JID struct {
+ User string
+ Agent uint8
+ Device uint8
+ Server string
+ AD bool
+}
+
+// UserInt returns the user as an integer. This is only safe to run on normal users, not on groups or broadcast lists.
+func (jid JID) UserInt() uint64 {
+ number, _ := strconv.ParseUint(jid.User, 10, 64)
+ return number
+}
+
+// ToNonAD returns a version of the JID struct that doesn't have the agent and device set.
+func (jid JID) ToNonAD() JID {
+ if jid.AD {
+ return JID{
+ User: jid.User,
+ Server: DefaultUserServer,
+ }
+ } else {
+ return jid
+ }
+}
+
+// SignalAddress returns the Signal protocol address for the user.
+func (jid JID) SignalAddress() *signalProtocol.SignalAddress {
+ user := jid.User
+ if jid.Agent != 0 {
+ user = fmt.Sprintf("%s_%d", jid.User, jid.Agent)
+ }
+ return signalProtocol.NewSignalAddress(user, uint32(jid.Device))
+}
+
+// IsBroadcastList returns true if the JID is a broadcast list, but not the status broadcast.
+func (jid JID) IsBroadcastList() bool {
+ return jid.Server == BroadcastServer && jid.User != StatusBroadcastJID.User
+}
+
+// NewADJID creates a new AD JID.
+func NewADJID(user string, agent, device uint8) JID {
+ return JID{
+ User: user,
+ Agent: agent,
+ Device: device,
+ Server: DefaultUserServer,
+ AD: true,
+ }
+}
+
+func parseADJID(user string) (JID, error) {
+ var fullJID JID
+ fullJID.AD = true
+ fullJID.Server = DefaultUserServer
+
+ dotIndex := strings.IndexRune(user, '.')
+ colonIndex := strings.IndexRune(user, ':')
+ if dotIndex < 0 || colonIndex < 0 || colonIndex+1 <= dotIndex {
+ return fullJID, fmt.Errorf("failed to parse ADJID: missing separators")
+ }
+
+ fullJID.User = user[:dotIndex]
+ agent, err := strconv.Atoi(user[dotIndex+1 : colonIndex])
+ if err != nil {
+ return fullJID, fmt.Errorf("failed to parse agent from JID: %w", err)
+ } else if agent < 0 || agent > 255 {
+ return fullJID, fmt.Errorf("failed to parse agent from JID: invalid value (%d)", agent)
+ }
+ device, err := strconv.Atoi(user[colonIndex+1:])
+ if err != nil {
+ return fullJID, fmt.Errorf("failed to parse device from JID: %w", err)
+ } else if device < 0 || device > 255 {
+ return fullJID, fmt.Errorf("failed to parse device from JID: invalid value (%d)", device)
+ }
+ fullJID.Agent = uint8(agent)
+ fullJID.Device = uint8(device)
+ return fullJID, nil
+}
+
+// ParseJID parses a JID out of the given string. It supports both regular and AD JIDs.
+func ParseJID(jid string) (JID, error) {
+ parts := strings.Split(jid, "@")
+ if len(parts) == 1 {
+ return NewJID("", parts[0]), nil
+ } else if strings.ContainsRune(parts[0], ':') && strings.ContainsRune(parts[0], '.') && parts[1] == DefaultUserServer {
+ return parseADJID(parts[0])
+ }
+ return NewJID(parts[0], parts[1]), nil
+}
+
+// NewJID creates a new regular JID.
+func NewJID(user, server string) JID {
+ return JID{
+ User: user,
+ Server: server,
+ }
+}
+
+// String converts the JID to a string representation.
+// The output string can be parsed with ParseJID, except for JIDs with no User part specified.
+func (jid JID) String() string {
+ if jid.AD {
+ return fmt.Sprintf("%s.%d:%d@%s", jid.User, jid.Agent, jid.Device, jid.Server)
+ } else if len(jid.User) > 0 {
+ return fmt.Sprintf("%s@%s", jid.User, jid.Server)
+ } else {
+ return jid.Server
+ }
+}
+
+// IsEmpty returns true if the JID has no server (which is required for all JIDs).
+func (jid JID) IsEmpty() bool {
+ return len(jid.Server) == 0
+}
+
+var _ sql.Scanner = (*JID)(nil)
+
+// Scan scans the given SQL value into this JID.
+func (jid *JID) Scan(src interface{}) error {
+ if src == nil {
+ return nil
+ }
+ var out JID
+ var err error
+ switch val := src.(type) {
+ case string:
+ out, err = ParseJID(val)
+ case []byte:
+ out, err = ParseJID(string(val))
+ default:
+ err = fmt.Errorf("unsupported type %T for scanning JID", val)
+ }
+ if err != nil {
+ return err
+ }
+ *jid = out
+ return nil
+}
+
+// Value returns the string representation of the JID as a value that the SQL package can use.
+func (jid JID) Value() (driver.Value, error) {
+ if len(jid.Server) == 0 {
+ return nil, nil
+ }
+ return jid.String(), nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/message.go b/vendor/go.mau.fi/whatsmeow/types/message.go
new file mode 100644
index 00000000..b1ebaa52
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/message.go
@@ -0,0 +1,58 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package types
+
+import (
+ "fmt"
+ "time"
+)
+
+// MessageSource contains basic sender and chat information about a message.
+type MessageSource struct {
+ Chat JID // The chat where the message was sent.
+ Sender JID // The user who sent the message.
+ IsFromMe bool // Whether the message was sent by the current user instead of someone else.
+ IsGroup bool // Whether the chat is a group chat or broadcast list.
+
+ // When sending a read receipt to a broadcast list message, the Chat is the broadcast list
+ // and Sender is you, so this field contains the recipient of the read receipt.
+ BroadcastListOwner JID
+}
+
+// IsIncomingBroadcast returns true if the message was sent to a broadcast list instead of directly to the user.
+//
+// If this is true, it means the message shows up in the direct chat with the Sender.
+func (ms *MessageSource) IsIncomingBroadcast() bool {
+ return (!ms.IsFromMe || !ms.BroadcastListOwner.IsEmpty()) && ms.Chat.IsBroadcastList()
+}
+
+// DeviceSentMeta contains metadata from messages sent by another one of the user's own devices.
+type DeviceSentMeta struct {
+ DestinationJID string // The destination user. This should match the MessageInfo.Recipient field.
+ Phash string
+}
+
+// MessageInfo contains metadata about an incoming message.
+type MessageInfo struct {
+ MessageSource
+ ID string
+ Type string
+ PushName string
+ Timestamp time.Time
+ Category string
+
+ DeviceSentMeta *DeviceSentMeta // Metadata for direct messages sent from another one of the user's own devices.
+}
+
+// SourceString returns a log-friendly representation of who sent the message and where.
+func (ms *MessageSource) SourceString() string {
+ if ms.Sender != ms.Chat {
+ return fmt.Sprintf("%s in %s", ms.Sender, ms.Chat)
+ } else {
+ return ms.Chat.String()
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/types/presence.go b/vendor/go.mau.fi/whatsmeow/types/presence.go
new file mode 100644
index 00000000..190f5eeb
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/presence.go
@@ -0,0 +1,22 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package types
+
+type Presence string
+
+const (
+ PresenceAvailable Presence = "available"
+ PresenceUnavailable Presence = "unavailable"
+)
+
+type ChatPresence string
+
+const (
+ ChatPresenceComposing ChatPresence = "composing"
+ ChatPresenceRecording ChatPresence = "recording"
+ ChatPresencePaused ChatPresence = "paused"
+)
diff --git a/vendor/go.mau.fi/whatsmeow/types/user.go b/vendor/go.mau.fi/whatsmeow/types/user.go
new file mode 100644
index 00000000..523d70d1
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/types/user.go
@@ -0,0 +1,96 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package types
+
+import (
+ "time"
+
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+)
+
+// VerifiedName contains verified WhatsApp business details.
+type VerifiedName struct {
+ Certificate *waProto.VerifiedNameCertificate
+ Details *waProto.VerifiedNameDetails
+}
+
+// UserInfo contains info about a WhatsApp user.
+type UserInfo struct {
+ VerifiedName *VerifiedName
+ Status string
+ PictureID string
+ Devices []JID
+}
+
+// ProfilePictureInfo contains the ID and URL for a WhatsApp user's profile picture or group's photo.
+type ProfilePictureInfo struct {
+ URL string // The full URL for the image, can be downloaded with a simple HTTP request.
+ ID string // The ID of the image. This is the same as UserInfo.PictureID.
+ Type string // The type of image. Known types include "image" (full res) and "preview" (thumbnail).
+
+ DirectPath string // The path to the image, probably not very useful
+}
+
+// ContactInfo contains the cached names of a WhatsApp user.
+type ContactInfo struct {
+ Found bool
+
+ FirstName string
+ FullName string
+ PushName string
+ BusinessName string
+}
+
+// LocalChatSettings contains the cached local settings for a chat.
+type LocalChatSettings struct {
+ Found bool
+
+ MutedUntil time.Time
+ Pinned bool
+ Archived bool
+}
+
+// IsOnWhatsAppResponse contains information received in response to checking if a phone number is on WhatsApp.
+type IsOnWhatsAppResponse struct {
+ Query string // The query string used
+ JID JID // The canonical user ID
+ IsIn bool // Whether the phone is registered or not.
+
+ VerifiedName *VerifiedName // If the phone is a business, the verified business details.
+}
+
+// BusinessMessageLinkTarget contains the info that is found using a business message link (see Client.ResolveBusinessMessageLink)
+type BusinessMessageLinkTarget struct {
+ JID JID // The JID of the business.
+
+ PushName string // The notify / push name of the business.
+ VerifiedName string // The verified business name.
+ IsSigned bool // Some boolean, seems to be true?
+ VerifiedLevel string // I guess the level of verification, starting from "unknown".
+
+ Message string // The message that WhatsApp clients will pre-fill in the input box when clicking the link.
+}
+
+// PrivacySetting is an individual setting value in the user's privacy settings.
+type PrivacySetting string
+
+// Possible privacy setting values.
+const (
+ PrivacySettingUndefined PrivacySetting = ""
+ PrivacySettingAll PrivacySetting = "all"
+ PrivacySettingContacts PrivacySetting = "contacts"
+ PrivacySettingNone PrivacySetting = "none"
+)
+
+// PrivacySettings contains the user's privacy settings.
+type PrivacySettings struct {
+ GroupAdd PrivacySetting
+ LastSeen PrivacySetting
+ Status PrivacySetting
+ Profile PrivacySetting
+ ReadReceipts PrivacySetting
+}
diff --git a/vendor/go.mau.fi/whatsmeow/upload.go b/vendor/go.mau.fi/whatsmeow/upload.go
new file mode 100644
index 00000000..5f3605ab
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/upload.go
@@ -0,0 +1,107 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "bytes"
+ "context"
+ "crypto/hmac"
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "net/url"
+
+ "go.mau.fi/whatsmeow/socket"
+ "go.mau.fi/whatsmeow/util/cbcutil"
+)
+
+// UploadResponse contains the data from the attachment upload, which can be put into a message to send the attachment.
+type UploadResponse struct {
+ URL string
+ DirectPath string
+
+ MediaKey []byte
+ FileEncSHA256 []byte
+ FileSHA256 []byte
+ FileLength uint64
+}
+
+// Upload uploads the given attachment to WhatsApp servers.
+func (cli *Client) Upload(ctx context.Context, plaintext []byte, appInfo MediaType) (resp UploadResponse, err error) {
+ resp.FileLength = uint64(len(plaintext))
+ resp.MediaKey = make([]byte, 32)
+ _, err = rand.Read(resp.MediaKey)
+ if err != nil {
+ return
+ }
+
+ plaintextSHA256 := sha256.Sum256(plaintext)
+ resp.FileSHA256 = plaintextSHA256[:]
+
+ iv, cipherKey, macKey, _ := getMediaKeys(resp.MediaKey, appInfo)
+
+ var ciphertext []byte
+ ciphertext, err = cbcutil.Encrypt(cipherKey, iv, plaintext)
+ if err != nil {
+ err = fmt.Errorf("failed to encrypt file: %w", err)
+ return
+ }
+
+ h := hmac.New(sha256.New, macKey)
+ h.Write(iv)
+ h.Write(ciphertext)
+ dataToUpload := append(ciphertext, h.Sum(nil)[:10]...)
+
+ fileEncSHA256 := sha256.Sum256(dataToUpload)
+ resp.FileEncSHA256 = fileEncSHA256[:]
+
+ err = cli.refreshMediaConn(false)
+ if err != nil {
+ err = fmt.Errorf("failed to refresh media connections: %w", err)
+ return
+ }
+
+ token := base64.URLEncoding.EncodeToString(resp.FileEncSHA256)
+ q := url.Values{
+ "auth": []string{cli.mediaConn.Auth},
+ "token": []string{token},
+ }
+ mmsType := mediaTypeToMMSType[appInfo]
+ uploadURL := url.URL{
+ Scheme: "https",
+ Host: cli.mediaConn.Hosts[0].Hostname,
+ Path: fmt.Sprintf("/mms/%s/%s", mmsType, token),
+ RawQuery: q.Encode(),
+ }
+
+ var req *http.Request
+ req, err = http.NewRequestWithContext(ctx, http.MethodPost, uploadURL.String(), bytes.NewReader(dataToUpload))
+ if err != nil {
+ err = fmt.Errorf("failed to prepare request: %w", err)
+ return
+ }
+
+ req.Header.Set("Origin", socket.Origin)
+ req.Header.Set("Referer", socket.Origin+"/")
+
+ var httpResp *http.Response
+ httpResp, err = http.DefaultClient.Do(req)
+ if err != nil {
+ err = fmt.Errorf("failed to execute request: %w", err)
+ } else if httpResp.StatusCode != http.StatusOK {
+ err = fmt.Errorf("upload failed with status code %d", httpResp.StatusCode)
+ } else if err = json.NewDecoder(httpResp.Body).Decode(&resp); err != nil {
+ err = fmt.Errorf("failed to parse upload response: %w", err)
+ }
+ if httpResp != nil {
+ _ = httpResp.Body.Close()
+ }
+ return
+}
diff --git a/vendor/go.mau.fi/whatsmeow/user.go b/vendor/go.mau.fi/whatsmeow/user.go
new file mode 100644
index 00000000..1855abaf
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/user.go
@@ -0,0 +1,368 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+package whatsmeow
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+
+ "google.golang.org/protobuf/proto"
+
+ waBinary "go.mau.fi/whatsmeow/binary"
+ waProto "go.mau.fi/whatsmeow/binary/proto"
+ "go.mau.fi/whatsmeow/types"
+ "go.mau.fi/whatsmeow/types/events"
+)
+
+const BusinessMessageLinkPrefix = "https://wa.me/message/"
+const BusinessMessageLinkDirectPrefix = "https://api.whatsapp.com/message/"
+
+// ResolveBusinessMessageLink resolves a business message short link and returns the target JID, business name and
+// text to prefill in the input field (if any).
+//
+// The links look like https://wa.me/message/<code> or https://api.whatsapp.com/message/<code>. You can either provide
+// the full link, or just the <code> part.
+func (cli *Client) ResolveBusinessMessageLink(code string) (*types.BusinessMessageLinkTarget, error) {
+ code = strings.TrimPrefix(code, BusinessMessageLinkPrefix)
+ code = strings.TrimPrefix(code, BusinessMessageLinkDirectPrefix)
+
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "w:qr",
+ Type: "get",
+ // WhatsApp android doesn't seem to have a "to" field for this one at all, not sure why but it works
+ Content: []waBinary.Node{{
+ Tag: "qr",
+ Attrs: waBinary.Attrs{
+ "code": code,
+ },
+ }},
+ })
+ if errors.Is(err, ErrIQNotFound) {
+ return nil, wrapIQError(ErrBusinessMessageLinkNotFound, err)
+ } else if err != nil {
+ return nil, err
+ }
+ qrChild, ok := resp.GetOptionalChildByTag("qr")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "qr", In: "response to business message link query"}
+ }
+ var target types.BusinessMessageLinkTarget
+ ag := qrChild.AttrGetter()
+ target.JID = ag.JID("jid")
+ target.PushName = ag.String("notify")
+ messageChild, ok := qrChild.GetOptionalChildByTag("message")
+ if ok {
+ messageBytes, _ := messageChild.Content.([]byte)
+ target.Message = string(messageBytes)
+ }
+ businessChild, ok := qrChild.GetOptionalChildByTag("business")
+ if ok {
+ bag := businessChild.AttrGetter()
+ target.IsSigned = bag.OptionalBool("is_signed")
+ target.VerifiedName = bag.OptionalString("verified_name")
+ target.VerifiedLevel = bag.OptionalString("verified_level")
+ }
+ return &target, ag.Error()
+}
+
+// IsOnWhatsApp checks if the given phone numbers are registered on WhatsApp.
+// The phone numbers should be in international format, including the `+` prefix.
+func (cli *Client) IsOnWhatsApp(phones []string) ([]types.IsOnWhatsAppResponse, error) {
+ jids := make([]types.JID, len(phones))
+ for i := range jids {
+ jids[i] = types.NewJID(phones[i], types.LegacyUserServer)
+ }
+ list, err := cli.usync(jids, "query", "interactive", []waBinary.Node{
+ {Tag: "business", Content: []waBinary.Node{{Tag: "verified_name"}}},
+ {Tag: "contact"},
+ })
+ if err != nil {
+ return nil, err
+ }
+ output := make([]types.IsOnWhatsAppResponse, 0, len(jids))
+ querySuffix := "@" + types.LegacyUserServer
+ for _, child := range list.GetChildren() {
+ jid, jidOK := child.Attrs["jid"].(types.JID)
+ if child.Tag != "user" || !jidOK {
+ continue
+ }
+ var info types.IsOnWhatsAppResponse
+ info.JID = jid
+ info.VerifiedName, err = parseVerifiedName(child.GetChildByTag("business"))
+ if err != nil {
+ cli.Log.Warnf("Failed to parse %s's verified name details: %v", jid, err)
+ }
+ contactNode := child.GetChildByTag("contact")
+ info.IsIn = contactNode.AttrGetter().String("type") == "in"
+ contactQuery, _ := contactNode.Content.([]byte)
+ info.Query = strings.TrimSuffix(string(contactQuery), querySuffix)
+ output = append(output, info)
+ }
+ return output, nil
+}
+
+// GetUserInfo gets basic user info (avatar, status, verified business name, device list).
+func (cli *Client) GetUserInfo(jids []types.JID) (map[types.JID]types.UserInfo, error) {
+ list, err := cli.usync(jids, "full", "background", []waBinary.Node{
+ {Tag: "business", Content: []waBinary.Node{{Tag: "verified_name"}}},
+ {Tag: "status"},
+ {Tag: "picture"},
+ {Tag: "devices", Attrs: waBinary.Attrs{"version": "2"}},
+ })
+ if err != nil {
+ return nil, err
+ }
+ respData := make(map[types.JID]types.UserInfo, len(jids))
+ for _, child := range list.GetChildren() {
+ jid, jidOK := child.Attrs["jid"].(types.JID)
+ if child.Tag != "user" || !jidOK {
+ continue
+ }
+ verifiedName, err := parseVerifiedName(child.GetChildByTag("business"))
+ if err != nil {
+ cli.Log.Warnf("Failed to parse %s's verified name details: %v", jid, err)
+ }
+ status, _ := child.GetChildByTag("status").Content.([]byte)
+ pictureID, _ := child.GetChildByTag("picture").Attrs["id"].(string)
+ devices := parseDeviceList(jid.User, child.GetChildByTag("devices"))
+ respData[jid] = types.UserInfo{
+ VerifiedName: verifiedName,
+ Status: string(status),
+ PictureID: pictureID,
+ Devices: devices,
+ }
+ if verifiedName != nil {
+ cli.updateBusinessName(jid, verifiedName.Details.GetVerifiedName())
+ }
+ }
+ return respData, nil
+}
+
+// GetUserDevices gets the list of devices that the given user has. The input should be a list of
+// regular JIDs, and the output will be a list of AD JIDs. The local device will not be included in
+// the output even if the user's JID is included in the input. All other devices will be included.
+func (cli *Client) GetUserDevices(jids []types.JID) ([]types.JID, error) {
+ cli.userDevicesCacheLock.Lock()
+ defer cli.userDevicesCacheLock.Unlock()
+
+ var devices, jidsToSync []types.JID
+ for _, jid := range jids {
+ cached, ok := cli.userDevicesCache[jid]
+ if ok && len(cached) > 0 {
+ devices = append(devices, cached...)
+ } else {
+ jidsToSync = append(jidsToSync, jid)
+ }
+ }
+ if len(jidsToSync) == 0 {
+ return devices, nil
+ }
+
+ list, err := cli.usync(jidsToSync, "query", "message", []waBinary.Node{
+ {Tag: "devices", Attrs: waBinary.Attrs{"version": "2"}},
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ for _, user := range list.GetChildren() {
+ jid, jidOK := user.Attrs["jid"].(types.JID)
+ if user.Tag != "user" || !jidOK {
+ continue
+ }
+ userDevices := parseDeviceList(jid.User, user.GetChildByTag("devices"))
+ cli.userDevicesCache[jid] = userDevices
+ devices = append(devices, userDevices...)
+ }
+
+ return devices, nil
+}
+
+// GetProfilePictureInfo gets the URL where you can download a WhatsApp user's profile picture or group's photo.
+// If the user or group doesn't have a profile picture, this returns nil with no error.
+func (cli *Client) GetProfilePictureInfo(jid types.JID, preview bool) (*types.ProfilePictureInfo, error) {
+ attrs := waBinary.Attrs{
+ "query": "url",
+ }
+ if preview {
+ attrs["type"] = "preview"
+ } else {
+ attrs["type"] = "image"
+ }
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "w:profile:picture",
+ Type: "get",
+ To: jid,
+ Content: []waBinary.Node{{
+ Tag: "picture",
+ Attrs: attrs,
+ }},
+ })
+ if errors.Is(err, ErrIQNotAuthorized) {
+ return nil, wrapIQError(ErrProfilePictureUnauthorized, err)
+ } else if errors.Is(err, ErrIQNotFound) {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ picture, ok := resp.GetOptionalChildByTag("picture")
+ if !ok {
+ return nil, &ElementMissingError{Tag: "picture", In: "response to profile picture query"}
+ }
+ var info types.ProfilePictureInfo
+ ag := picture.AttrGetter()
+ info.ID = ag.String("id")
+ info.URL = ag.String("url")
+ info.Type = ag.String("type")
+ info.DirectPath = ag.String("direct_path")
+ if !ag.OK() {
+ return &info, ag.Error()
+ }
+ return &info, nil
+}
+
+func (cli *Client) handleHistoricalPushNames(names []*waProto.Pushname) {
+ if cli.Store.Contacts == nil {
+ return
+ }
+ for _, user := range names {
+ if user.GetPushname() == "-" {
+ continue
+ }
+ var changed bool
+ if jid, err := types.ParseJID(user.GetId()); err != nil {
+ cli.Log.Warnf("Failed to parse user ID '%s' in push name history sync: %v", user.GetId(), err)
+ } else if changed, _, err = cli.Store.Contacts.PutPushName(jid, user.GetPushname()); err != nil {
+ cli.Log.Warnf("Failed to store push name of %s from history sync: %v", err)
+ } else if changed {
+ cli.Log.Debugf("Got push name %s for %s in history sync", user.GetPushname(), jid)
+ }
+ }
+}
+
+func (cli *Client) updatePushName(user types.JID, messageInfo *types.MessageInfo, name string) {
+ if cli.Store.Contacts == nil {
+ return
+ }
+ user = user.ToNonAD()
+ changed, previousName, err := cli.Store.Contacts.PutPushName(user, name)
+ if err != nil {
+ cli.Log.Errorf("Failed to save push name of %s in device store: %v", user, err)
+ } else if changed {
+ cli.Log.Debugf("Push name of %s changed from %s to %s, dispatching event", user, previousName, name)
+ cli.dispatchEvent(&events.PushName{
+ JID: user,
+ Message: messageInfo,
+ OldPushName: previousName,
+ NewPushName: name,
+ })
+ }
+}
+
+func (cli *Client) updateBusinessName(user types.JID, name string) {
+ if cli.Store.Contacts == nil {
+ return
+ }
+ err := cli.Store.Contacts.PutBusinessName(user, name)
+ if err != nil {
+ cli.Log.Errorf("Failed to save business name of %s in device store: %v", user, err)
+ }
+}
+
+func parseVerifiedName(businessNode waBinary.Node) (*types.VerifiedName, error) {
+ if businessNode.Tag != "business" {
+ return nil, nil
+ }
+ verifiedNameNode, ok := businessNode.GetOptionalChildByTag("verified_name")
+ if !ok {
+ return nil, nil
+ }
+ rawCert, ok := verifiedNameNode.Content.([]byte)
+ if !ok {
+ return nil, nil
+ }
+
+ var cert waProto.VerifiedNameCertificate
+ err := proto.Unmarshal(rawCert, &cert)
+ if err != nil {
+ return nil, err
+ }
+ var certDetails waProto.VerifiedNameDetails
+ err = proto.Unmarshal(cert.GetDetails(), &certDetails)
+ if err != nil {
+ return nil, err
+ }
+ return &types.VerifiedName{
+ Certificate: &cert,
+ Details: &certDetails,
+ }, nil
+}
+
+func parseDeviceList(user string, deviceNode waBinary.Node) []types.JID {
+ deviceList := deviceNode.GetChildByTag("device-list")
+ if deviceNode.Tag != "devices" || deviceList.Tag != "device-list" {
+ return nil
+ }
+ children := deviceList.GetChildren()
+ devices := make([]types.JID, 0, len(children))
+ for _, device := range children {
+ deviceID, ok := device.AttrGetter().GetInt64("id", true)
+ if device.Tag != "device" || !ok {
+ continue
+ }
+ devices = append(devices, types.NewADJID(user, 0, byte(deviceID)))
+ }
+ return devices
+}
+
+func (cli *Client) usync(jids []types.JID, mode, context string, query []waBinary.Node) (*waBinary.Node, error) {
+ userList := make([]waBinary.Node, len(jids))
+ for i, jid := range jids {
+ userList[i].Tag = "user"
+ if jid.AD {
+ jid.AD = false
+ }
+ switch jid.Server {
+ case types.LegacyUserServer:
+ userList[i].Content = []waBinary.Node{{
+ Tag: "contact",
+ Content: jid.String(),
+ }}
+ case types.DefaultUserServer:
+ userList[i].Attrs = waBinary.Attrs{"jid": jid}
+ default:
+ return nil, fmt.Errorf("unknown user server '%s'", jid.Server)
+ }
+ }
+ resp, err := cli.sendIQ(infoQuery{
+ Namespace: "usync",
+ Type: "get",
+ To: types.ServerJID,
+ Content: []waBinary.Node{{
+ Tag: "usync",
+ Attrs: waBinary.Attrs{
+ "sid": cli.generateRequestID(),
+ "mode": mode,
+ "last": "true",
+ "index": "0",
+ "context": context,
+ },
+ Content: []waBinary.Node{
+ {Tag: "query", Content: query},
+ {Tag: "list", Content: userList},
+ },
+ }},
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to send usync query: %w", err)
+ } else if list, ok := resp.GetOptionalChildByTag("usync", "list"); !ok {
+ return nil, &ElementMissingError{Tag: "list", In: "response to usync query"}
+ } else {
+ return &list, err
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/util/cbcutil/cbc.go b/vendor/go.mau.fi/whatsmeow/util/cbcutil/cbc.go
new file mode 100644
index 00000000..05fa8577
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/util/cbcutil/cbc.go
@@ -0,0 +1,101 @@
+/*
+CBC describes a block cipher mode. In cryptography, a block cipher mode of operation is an algorithm that uses a
+block cipher to provide an information service such as confidentiality or authenticity. A block cipher by itself
+is only suitable for the secure cryptographic transformation (encryption or decryption) of one fixed-length group of
+bits called a block. A mode of operation describes how to repeatedly apply a cipher's single-block operation to
+securely transform amounts of data larger than a block.
+
+This package simplifies the usage of AES-256-CBC.
+*/
+package cbcutil
+
+/*
+Some code is provided by the GitHub user locked (github.com/locked):
+https://gist.github.com/locked/b066aa1ddeb2b28e855e
+Thanks!
+*/
+import (
+ "bytes"
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/rand"
+ "fmt"
+ "io"
+)
+
+/*
+Decrypt is a function that decrypts a given cipher text with a provided key and initialization vector(iv).
+*/
+func Decrypt(key, iv, ciphertext []byte) ([]byte, error) {
+ block, err := aes.NewCipher(key)
+
+ if err != nil {
+ return nil, err
+ }
+
+ if len(ciphertext) < aes.BlockSize {
+ return nil, fmt.Errorf("ciphertext is shorter then block size: %d / %d", len(ciphertext), aes.BlockSize)
+ }
+
+ if iv == nil {
+ iv = ciphertext[:aes.BlockSize]
+ ciphertext = ciphertext[aes.BlockSize:]
+ }
+
+ cbc := cipher.NewCBCDecrypter(block, iv)
+ cbc.CryptBlocks(ciphertext, ciphertext)
+
+ return unpad(ciphertext)
+}
+
+/*
+Encrypt is a function that encrypts plaintext with a given key and an optional initialization vector(iv).
+*/
+func Encrypt(key, iv, plaintext []byte) ([]byte, error) {
+ plaintext = pad(plaintext, aes.BlockSize)
+
+ if len(plaintext)%aes.BlockSize != 0 {
+ return nil, fmt.Errorf("plaintext is not a multiple of the block size: %d / %d", len(plaintext), aes.BlockSize)
+ }
+
+ block, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+
+ var ciphertext []byte
+ if iv == nil {
+ ciphertext = make([]byte, aes.BlockSize+len(plaintext))
+ iv := ciphertext[:aes.BlockSize]
+ if _, err := io.ReadFull(rand.Reader, iv); err != nil {
+ return nil, err
+ }
+
+ cbc := cipher.NewCBCEncrypter(block, iv)
+ cbc.CryptBlocks(ciphertext[aes.BlockSize:], plaintext)
+ } else {
+ ciphertext = make([]byte, len(plaintext))
+
+ cbc := cipher.NewCBCEncrypter(block, iv)
+ cbc.CryptBlocks(ciphertext, plaintext)
+ }
+
+ return ciphertext, nil
+}
+
+func pad(ciphertext []byte, blockSize int) []byte {
+ padding := blockSize - len(ciphertext)%blockSize
+ padtext := bytes.Repeat([]byte{byte(padding)}, padding)
+ return append(ciphertext, padtext...)
+}
+
+func unpad(src []byte) ([]byte, error) {
+ length := len(src)
+ padLen := int(src[length-1])
+
+ if padLen > length {
+ return nil, fmt.Errorf("padding is greater then the length: %d / %d", padLen, length)
+ }
+
+ return src[:(length - padLen)], nil
+}
diff --git a/vendor/go.mau.fi/whatsmeow/util/hkdfutil/hkdf.go b/vendor/go.mau.fi/whatsmeow/util/hkdfutil/hkdf.go
new file mode 100644
index 00000000..fbc97124
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/util/hkdfutil/hkdf.go
@@ -0,0 +1,28 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package hkdfutil contains a simple wrapper for golang.org/x/crypto/hkdf that reads a specified number of bytes.
+package hkdfutil
+
+import (
+ "crypto/sha256"
+ "fmt"
+
+ "golang.org/x/crypto/hkdf"
+)
+
+func SHA256(key, salt, info []byte, length uint8) []byte {
+ data := make([]byte, length)
+ h := hkdf.New(sha256.New, key, salt, info)
+ n, err := h.Read(data)
+ if err != nil {
+ // Length is limited to 255 by being uint8, so these errors can't actually happen
+ panic(fmt.Errorf("failed to expand key: %w", err))
+ } else if uint8(n) != length {
+ panic(fmt.Errorf("didn't read enough bytes (got %d, wanted %d)", n, length))
+ }
+ return data
+}
diff --git a/vendor/go.mau.fi/whatsmeow/util/keys/keypair.go b/vendor/go.mau.fi/whatsmeow/util/keys/keypair.go
new file mode 100644
index 00000000..55679ff2
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/util/keys/keypair.go
@@ -0,0 +1,75 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package keys contains a utility struct for elliptic curve keypairs.
+package keys
+
+import (
+ "crypto/rand"
+ "fmt"
+
+ "go.mau.fi/libsignal/ecc"
+ "golang.org/x/crypto/curve25519"
+)
+
+type KeyPair struct {
+ Pub *[32]byte
+ Priv *[32]byte
+}
+
+var _ ecc.ECPublicKeyable
+
+func NewKeyPairFromPrivateKey(priv [32]byte) *KeyPair {
+ var kp KeyPair
+ kp.Priv = &priv
+ var pub [32]byte
+ curve25519.ScalarBaseMult(&pub, kp.Priv)
+ kp.Pub = &pub
+ return &kp
+}
+
+func NewKeyPair() *KeyPair {
+ var priv [32]byte
+
+ _, err := rand.Read(priv[:])
+ if err != nil {
+ panic(fmt.Errorf("failed to generate curve25519 private key: %w", err))
+ }
+
+ priv[0] &= 248
+ priv[31] &= 127
+ priv[31] |= 64
+
+ return NewKeyPairFromPrivateKey(priv)
+}
+
+func (kp *KeyPair) CreateSignedPreKey(keyID uint32) *PreKey {
+ newKey := NewPreKey(keyID)
+ newKey.Signature = kp.Sign(&newKey.KeyPair)
+ return newKey
+}
+
+func (kp *KeyPair) Sign(keyToSign *KeyPair) *[64]byte {
+ pubKeyForSignature := make([]byte, 33)
+ pubKeyForSignature[0] = ecc.DjbType
+ copy(pubKeyForSignature[1:], keyToSign.Pub[:])
+
+ signature := ecc.CalculateSignature(ecc.NewDjbECPrivateKey(*kp.Priv), pubKeyForSignature)
+ return &signature
+}
+
+type PreKey struct {
+ KeyPair
+ KeyID uint32
+ Signature *[64]byte
+}
+
+func NewPreKey(keyID uint32) *PreKey {
+ return &PreKey{
+ KeyPair: *NewKeyPair(),
+ KeyID: keyID,
+ }
+}
diff --git a/vendor/go.mau.fi/whatsmeow/util/log/log.go b/vendor/go.mau.fi/whatsmeow/util/log/log.go
new file mode 100644
index 00000000..2662cdea
--- /dev/null
+++ b/vendor/go.mau.fi/whatsmeow/util/log/log.go
@@ -0,0 +1,83 @@
+// Copyright (c) 2021 Tulir Asokan
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Package waLog contains a simple logger interface used by the other whatsmeow packages.
+package waLog
+
+import (
+ "fmt"
+ "strings"
+ "time"
+)
+
+// Logger is a simple logger interface that can have subloggers for specific areas.
+type Logger interface {
+ Warnf(msg string, args ...interface{})
+ Errorf(msg string, args ...interface{})
+ Infof(msg string, args ...interface{})
+ Debugf(msg string, args ...interface{})
+ Sub(module string) Logger
+}
+
+type noopLogger struct{}
+
+func (n *noopLogger) Errorf(_ string, _ ...interface{}) {}
+func (n *noopLogger) Warnf(_ string, _ ...interface{}) {}
+func (n *noopLogger) Infof(_ string, _ ...interface{}) {}
+func (n *noopLogger) Debugf(_ string, _ ...interface{}) {}
+func (n *noopLogger) Sub(_ string) Logger { return n }
+
+// Noop is a no-op Logger implementation that silently drops everything.
+var Noop Logger = &noopLogger{}
+
+type stdoutLogger struct {
+ mod string
+ color bool
+ min int
+}
+
+var colors = map[string]string{
+ "INFO": "\033[36m",
+ "WARN": "\033[33m",
+ "ERROR": "\033[31m",
+}
+
+var levelToInt = map[string]int{
+ "": -1,
+ "DEBUG": 0,
+ "INFO": 1,
+ "WARN": 2,
+ "ERROR": 3,
+}
+
+func (s *stdoutLogger) outputf(level, msg string, args ...interface{}) {
+ if levelToInt[level] < s.min {
+ return
+ }
+ var colorStart, colorReset string
+ if s.color {
+ colorStart = colors[level]
+ colorReset = "\033[0m"
+ }
+ fmt.Printf("%s%s [%s %s] %s%s\n", time.Now().Format("15:04:05.000"), colorStart, s.mod, level, fmt.Sprintf(msg, args...), colorReset)
+}
+
+func (s *stdoutLogger) Errorf(msg string, args ...interface{}) { s.outputf("ERROR", msg, args...) }
+func (s *stdoutLogger) Warnf(msg string, args ...interface{}) { s.outputf("WARN", msg, args...) }
+func (s *stdoutLogger) Infof(msg string, args ...interface{}) { s.outputf("INFO", msg, args...) }
+func (s *stdoutLogger) Debugf(msg string, args ...interface{}) { s.outputf("DEBUG", msg, args...) }
+func (s *stdoutLogger) Sub(mod string) Logger {
+ return &stdoutLogger{mod: fmt.Sprintf("%s/%s", s.mod, mod), color: s.color, min: s.min}
+}
+
+// Stdout is a simple Logger implementation that outputs to stdout. The module name given is included in log lines.
+//
+// minLevel specifies the minimum log level to output. An empty string will output all logs.
+//
+// If color is true, then info, warn and error logs will be colored cyan, yellow and red respectively using ANSI color escape codes.
+func Stdout(module string, minLevel string, color bool) Logger {
+ return &stdoutLogger{mod: module, color: color, min: levelToInt[strings.ToUpper(minLevel)]}
+}