slidge-whatsapp 0.2.5__cp311-cp311-manylinux_2_36_aarch64.whl → 0.3.0b0__cp311-cp311-manylinux_2_36_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slidge-whatsapp might be problematic. Click here for more details.
- slidge_whatsapp/config.py +3 -0
- slidge_whatsapp/contact.py +13 -3
- slidge_whatsapp/event.go +135 -60
- slidge_whatsapp/gateway.go +16 -68
- slidge_whatsapp/gateway.py +4 -5
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.h +198 -181
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +166 -152
- slidge_whatsapp/generated/whatsapp.c +1804 -1532
- slidge_whatsapp/generated/whatsapp.go +1150 -1039
- slidge_whatsapp/generated/whatsapp.py +1243 -1118
- slidge_whatsapp/generated/whatsapp_go.h +198 -181
- slidge_whatsapp/go.mod +21 -15
- slidge_whatsapp/go.sum +49 -31
- slidge_whatsapp/group.py +34 -30
- slidge_whatsapp/media/media.go +22 -12
- slidge_whatsapp/session.go +105 -81
- slidge_whatsapp/session.py +46 -14
- slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +4 -4
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +0 -5
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +3 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +40 -20
- slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
- slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
- slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +44 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +53 -15
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_unix.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_windows.go +1 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +4 -7
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +11545 -6680
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +527 -273
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3.go +57 -23
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c +4 -0
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +4 -0
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/.gitignore +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/LICENSE +202 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/README.md +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid.go +35 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_gccgo.go +26 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.c +23 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.go +22 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.go +35 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.s +18 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.go +28 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.s +44 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_slow.go +24 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go +17 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +38 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.5.go +57 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.6.go +43 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.9.go +37 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/CONTRIBUTING.md +43 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/README.md +31 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/console.go +20 -5
- slidge_whatsapp/vendor/github.com/rs/zerolog/log/log.go +131 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/log.go +1 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/sampler.go +4 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/writer.go +9 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupCipher.go +17 -6
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go +17 -7
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go +4 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go +2 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/Session.go +41 -17
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +64 -30
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SessionStore.go +8 -6
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go +7 -5
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/connlog.go +257 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/database.go +309 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/iter.go +233 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/json.go +47 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +129 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/massinsert.go +164 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/queryhelper.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/reflectscan.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/transaction.go +180 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgrades.go +250 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +331 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exerrors/dualerror.go +33 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exerrors/must.go +23 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/cors.go +32 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +98 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +36 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +38 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +104 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +104 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/returnonce.go +25 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/ringbuffer.go +139 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +94 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +136 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/callermarshal.go +28 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/defaults.go +32 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/generics.go +45 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/writer.go +81 -0
- slidge_whatsapp/vendor/go.mau.fi/util/ptr/ptr.go +43 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +27 -26
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +4 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/keys.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +32 -26
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +42 -8
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +134 -55
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +34 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +63 -30
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +78 -34
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +157 -55
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +202 -154
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaconn.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaretry.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +448 -138
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +106 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +83 -43
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +9 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +42 -18
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +9 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +17 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go +39 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.go +354 -175
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.proto +5 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +170 -15
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go +29 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go +13 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.go +344 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto +26 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.pb.go → WACompanionReg.pb.go} +211 -89
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +5 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.go +173 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +78 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +7463 -5180
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +366 -343
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +485 -135
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +17 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.go +162 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.go +32 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.go +192 -52
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.proto +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.go +60 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.go +39 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.go +61 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +952 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +88 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1802 -453
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +92 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.go +27 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.go +59 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +435 -109
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +11 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +563 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +32 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +39 -21
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +267 -79
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +28 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +87 -44
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +86 -65
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +314 -170
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +155 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/03-message-secrets.sql +11 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/04-privacy-tokens.sql +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/05-account-jid-format.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/06-facebook-uuid.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/07-account-lid.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/08-lid-mapping.sql +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/09-decryption-buffer.sql +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/upgrades.go +22 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +109 -56
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +21 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +9 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +18 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/update.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/upload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +59 -37
- slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/exp/LICENSE +27 -0
- slidge_whatsapp/vendor/golang.org/x/exp/PATENTS +22 -0
- slidge_whatsapp/vendor/golang.org/x/exp/constraints/constraints.go +54 -0
- slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/guts.go +50 -0
- slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/httplex.go +347 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/.gitignore +2 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/ascii.go +53 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/ciphers.go +641 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/client_conn_pool.go +311 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +164 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/databuffer.go +149 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/errors.go +145 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/flow.go +120 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +1702 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +181 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/encode.go +245 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/hpack.go +523 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/huffman.go +226 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/static_table.go +188 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/tables.go +403 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +410 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3332 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3233 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/unencrypted.go +32 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/write.go +381 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +251 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority.go +451 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_random.go +77 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +119 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/go118.go +13 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/idna10.0.0.go +769 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/idna9.0.0.go +717 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/pre_go118.go +11 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/punycode.go +217 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables10.0.0.go +4559 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables11.0.0.go +4653 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables12.0.0.go +4733 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables13.0.0.go +4959 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables15.0.0.go +5144 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables9.0.0.go +4486 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie.go +51 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie12.0.0.go +30 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie13.0.0.go +30 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trieval.go +119 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +467 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
- slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +93 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +84 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +20 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +84 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +20 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/security_windows.go +44 -5
- slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +4 -2
- slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +245 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +491 -482
- slidge_whatsapp/vendor/golang.org/x/text/LICENSE +27 -0
- slidge_whatsapp/vendor/golang.org/x/text/PATENTS +22 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule.go +336 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +11 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +14 -0
- slidge_whatsapp/vendor/golang.org/x/text/transform/transform.go +709 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bidi.go +359 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +1071 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +1815 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +1887 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +1923 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +1955 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +2042 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +1781 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/trieval.go +48 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/composition.go +512 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/forminfo.go +279 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/iter.go +458 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/normalize.go +610 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +7657 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +7693 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +7710 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go +7760 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +7907 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +7637 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +13 -5
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +81 -19
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe_go121.go → strings_unsafe.go} +0 -2
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/proto/merge.go +6 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +10 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
- slidge_whatsapp/vendor/modules.txt +80 -21
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/METADATA +2 -2
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/RECORD +456 -263
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/WHEEL +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
- slidge_whatsapp/vendor/github.com/rs/zerolog/CNAME +0 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/_config.yml +0 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw +0 -23
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw +0 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +0 -296
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +0 -94
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +0 -98
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/LICENSE +0 -0
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/entry_points.txt +0 -0
slidge_whatsapp/session.go
CHANGED
|
@@ -4,10 +4,12 @@ import (
|
|
|
4
4
|
// Standard library.
|
|
5
5
|
"bytes"
|
|
6
6
|
"context"
|
|
7
|
+
"encoding/json"
|
|
7
8
|
"errors"
|
|
8
9
|
"fmt"
|
|
9
10
|
"image/jpeg"
|
|
10
11
|
"math/rand"
|
|
12
|
+
"slices"
|
|
11
13
|
"time"
|
|
12
14
|
|
|
13
15
|
// Internal packages.
|
|
@@ -68,10 +70,11 @@ type Session struct {
|
|
|
68
70
|
func (s *Session) Login() error {
|
|
69
71
|
var err error
|
|
70
72
|
var store *store.Device
|
|
73
|
+
var ctx = context.Background()
|
|
71
74
|
|
|
72
75
|
// Try to fetch existing device from given device JID.
|
|
73
76
|
if s.device.ID != "" {
|
|
74
|
-
store, err = s.gateway.container.GetDevice(s.device.JID())
|
|
77
|
+
store, err = s.gateway.container.GetDevice(ctx, s.device.JID())
|
|
75
78
|
if err != nil {
|
|
76
79
|
return err
|
|
77
80
|
}
|
|
@@ -153,7 +156,7 @@ func (s *Session) Logout() error {
|
|
|
153
156
|
return nil
|
|
154
157
|
}
|
|
155
158
|
|
|
156
|
-
err := s.client.Logout()
|
|
159
|
+
err := s.client.Logout(context.Background())
|
|
157
160
|
s.client = nil
|
|
158
161
|
close(s.presenceChan)
|
|
159
162
|
|
|
@@ -176,16 +179,17 @@ func (s *Session) Disconnect() error {
|
|
|
176
179
|
// [Session] is already paired, or if the phone number given is empty or invalid.
|
|
177
180
|
func (s *Session) PairPhone(phone string) (string, error) {
|
|
178
181
|
if s.client == nil {
|
|
179
|
-
return "", fmt.Errorf("
|
|
182
|
+
return "", fmt.Errorf("cannot pair for uninitialized session")
|
|
180
183
|
} else if s.client.Store.ID != nil {
|
|
181
|
-
return "", fmt.Errorf("
|
|
184
|
+
return "", fmt.Errorf("refusing to pair for connected session")
|
|
182
185
|
} else if phone == "" {
|
|
183
|
-
return "", fmt.Errorf("
|
|
186
|
+
return "", fmt.Errorf("cannot pair for empty phone number")
|
|
184
187
|
}
|
|
185
188
|
|
|
186
|
-
|
|
189
|
+
var ctx = context.Background()
|
|
190
|
+
code, err := s.client.PairPhone(ctx, phone, true, whatsmeow.PairClientChrome, "Chrome (Linux)")
|
|
187
191
|
if err != nil {
|
|
188
|
-
return "", fmt.Errorf("
|
|
192
|
+
return "", fmt.Errorf("failed to pair with phone number: %s", err)
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
return code, nil
|
|
@@ -196,14 +200,15 @@ func (s *Session) PairPhone(phone string) (string, error) {
|
|
|
196
200
|
// documentation for the [Message] type for more information.
|
|
197
201
|
func (s *Session) SendMessage(message Message) error {
|
|
198
202
|
if s.client == nil || s.client.Store.ID == nil {
|
|
199
|
-
return fmt.Errorf("
|
|
203
|
+
return fmt.Errorf("cannot send message for unauthenticated session")
|
|
200
204
|
}
|
|
201
205
|
|
|
202
206
|
jid, err := types.ParseJID(message.JID)
|
|
203
207
|
if err != nil {
|
|
204
|
-
return fmt.Errorf("
|
|
208
|
+
return fmt.Errorf("could not parse sender JID for message: %s", err)
|
|
205
209
|
}
|
|
206
210
|
|
|
211
|
+
var ctx = context.Background()
|
|
207
212
|
var payload *waE2E.Message
|
|
208
213
|
var extra whatsmeow.SendRequestExtra
|
|
209
214
|
|
|
@@ -215,13 +220,13 @@ func (s *Session) SendMessage(message Message) error {
|
|
|
215
220
|
}
|
|
216
221
|
|
|
217
222
|
// Upload attachment into WhatsApp before sending message.
|
|
218
|
-
if payload, err = uploadAttachment(s.client, &message.Attachments[0]); err != nil {
|
|
219
|
-
return fmt.Errorf("
|
|
223
|
+
if payload, err = uploadAttachment(ctx, s.client, &message.Attachments[0]); err != nil {
|
|
224
|
+
return fmt.Errorf("failed uploading attachment: %s", err)
|
|
220
225
|
}
|
|
221
226
|
extra.ID = message.ID
|
|
222
227
|
case MessageEdit:
|
|
223
228
|
// Edit existing message by ID.
|
|
224
|
-
payload = s.client.BuildEdit(s.device.JID().ToNonAD(), message.ID, s.getMessagePayload(message))
|
|
229
|
+
payload = s.client.BuildEdit(s.device.JID().ToNonAD(), message.ID, s.getMessagePayload(ctx, message))
|
|
225
230
|
case MessageRevoke:
|
|
226
231
|
// Don't send message, but revoke existing message by ID.
|
|
227
232
|
var originJID types.JID
|
|
@@ -232,7 +237,7 @@ func (s *Session) SendMessage(message Message) error {
|
|
|
232
237
|
// A message moderation
|
|
233
238
|
originJID, err = types.ParseJID(message.OriginJID)
|
|
234
239
|
if err != nil {
|
|
235
|
-
return fmt.Errorf("
|
|
240
|
+
return fmt.Errorf("could not parse sender JID for message: %s", err)
|
|
236
241
|
}
|
|
237
242
|
}
|
|
238
243
|
payload = s.client.BuildRevoke(jid, originJID, message.ID)
|
|
@@ -251,12 +256,12 @@ func (s *Session) SendMessage(message Message) error {
|
|
|
251
256
|
},
|
|
252
257
|
}
|
|
253
258
|
default:
|
|
254
|
-
payload = s.getMessagePayload(message)
|
|
259
|
+
payload = s.getMessagePayload(ctx, message)
|
|
255
260
|
extra.ID = message.ID
|
|
256
261
|
}
|
|
257
262
|
|
|
258
263
|
s.gateway.logger.Debugf("Sending message to JID '%s': %+v", jid, payload)
|
|
259
|
-
_, err = s.client.SendMessage(
|
|
264
|
+
_, err = s.client.SendMessage(ctx, jid, payload, extra)
|
|
260
265
|
return err
|
|
261
266
|
}
|
|
262
267
|
|
|
@@ -268,11 +273,9 @@ const (
|
|
|
268
273
|
// GetMessagePayload returns a concrete WhatsApp protocol message for the given Message representation.
|
|
269
274
|
// The specific fields set within the protocol message, as well as its type, can depend on specific
|
|
270
275
|
// fields set in the Message type, and may be nested recursively (e.g. when replying to a reply).
|
|
271
|
-
func (s *Session) getMessagePayload(message Message) *waE2E.Message {
|
|
272
|
-
var payload *waE2E.Message
|
|
273
|
-
var ctx = context.Background()
|
|
274
|
-
|
|
276
|
+
func (s *Session) getMessagePayload(ctx context.Context, message Message) *waE2E.Message {
|
|
275
277
|
// Compose extended message when made as a reply to a different message.
|
|
278
|
+
var payload *waE2E.Message
|
|
276
279
|
if message.ReplyID != "" {
|
|
277
280
|
// Fall back to our own JID if no origin JID has been specified, in which case we assume
|
|
278
281
|
// we're replying to our own messages.
|
|
@@ -357,12 +360,12 @@ func (s *Session) GenerateMessageID() string {
|
|
|
357
360
|
// contact specified within.
|
|
358
361
|
func (s *Session) SendChatState(state ChatState) error {
|
|
359
362
|
if s.client == nil || s.client.Store.ID == nil {
|
|
360
|
-
return fmt.Errorf("
|
|
363
|
+
return fmt.Errorf("cannot send chat state for unauthenticated session")
|
|
361
364
|
}
|
|
362
365
|
|
|
363
366
|
jid, err := types.ParseJID(state.JID)
|
|
364
367
|
if err != nil {
|
|
365
|
-
return fmt.Errorf("
|
|
368
|
+
return fmt.Errorf("could not parse sender JID for chat state: %s", err)
|
|
366
369
|
}
|
|
367
370
|
|
|
368
371
|
var presence types.ChatPresence
|
|
@@ -379,7 +382,7 @@ func (s *Session) SendChatState(state ChatState) error {
|
|
|
379
382
|
// SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
|
|
380
383
|
func (s *Session) SendReceipt(receipt Receipt) error {
|
|
381
384
|
if s.client == nil || s.client.Store.ID == nil {
|
|
382
|
-
return fmt.Errorf("
|
|
385
|
+
return fmt.Errorf("cannot send receipt for unauthenticated session")
|
|
383
386
|
}
|
|
384
387
|
|
|
385
388
|
var jid, senderJID types.JID
|
|
@@ -387,17 +390,17 @@ func (s *Session) SendReceipt(receipt Receipt) error {
|
|
|
387
390
|
|
|
388
391
|
if receipt.GroupJID != "" {
|
|
389
392
|
if senderJID, err = types.ParseJID(receipt.JID); err != nil {
|
|
390
|
-
return fmt.Errorf("
|
|
393
|
+
return fmt.Errorf("could not parse sender JID for receipt: %s", err)
|
|
391
394
|
} else if jid, err = types.ParseJID(receipt.GroupJID); err != nil {
|
|
392
|
-
return fmt.Errorf("
|
|
395
|
+
return fmt.Errorf("could not parse group JID for receipt: %s", err)
|
|
393
396
|
}
|
|
394
397
|
} else {
|
|
395
398
|
if jid, err = types.ParseJID(receipt.JID); err != nil {
|
|
396
|
-
return fmt.Errorf("
|
|
399
|
+
return fmt.Errorf("could not parse sender JID for receipt: %s", err)
|
|
397
400
|
}
|
|
398
401
|
}
|
|
399
402
|
|
|
400
|
-
ids :=
|
|
403
|
+
ids := slices.Clone(receipt.MessageIDs)
|
|
401
404
|
return s.client.MarkRead(ids, time.Unix(receipt.Timestamp, 0), jid, senderJID)
|
|
402
405
|
}
|
|
403
406
|
|
|
@@ -405,7 +408,7 @@ func (s *Session) SendReceipt(receipt Receipt) error {
|
|
|
405
408
|
// user. An error is returned if setting availability fails for any reason.
|
|
406
409
|
func (s *Session) SendPresence(presence PresenceKind, statusMessage string) error {
|
|
407
410
|
if s.client == nil || s.client.Store.ID == nil {
|
|
408
|
-
return fmt.Errorf("
|
|
411
|
+
return fmt.Errorf("cannot send presence for unauthenticated session")
|
|
409
412
|
}
|
|
410
413
|
|
|
411
414
|
var err error
|
|
@@ -429,32 +432,37 @@ func (s *Session) SendPresence(presence PresenceKind, statusMessage string) erro
|
|
|
429
432
|
// If `refresh` is `true`, FetchRoster will pull application state from the remote service and
|
|
430
433
|
// synchronize any contacts found with the adapter.
|
|
431
434
|
func (s *Session) GetContacts(refresh bool) ([]Contact, error) {
|
|
435
|
+
var ctx = context.Background()
|
|
432
436
|
if s.client == nil || s.client.Store.ID == nil {
|
|
433
|
-
return nil, fmt.Errorf("
|
|
437
|
+
return nil, fmt.Errorf("cannot get contacts for unauthenticated session")
|
|
434
438
|
}
|
|
435
439
|
|
|
436
440
|
// Synchronize remote application state with local state if requested.
|
|
437
441
|
if refresh {
|
|
438
|
-
err := s.client.FetchAppState(appstate.WAPatchCriticalUnblockLow, false, false)
|
|
442
|
+
err := s.client.FetchAppState(ctx, appstate.WAPatchCriticalUnblockLow, false, false)
|
|
439
443
|
if err != nil {
|
|
440
444
|
s.gateway.logger.Warnf("Could not get app state from server: %s", err)
|
|
441
445
|
}
|
|
442
446
|
}
|
|
443
447
|
|
|
444
448
|
// Synchronize local contact state with overarching gateway for all local contacts.
|
|
445
|
-
data, err := s.client.Store.Contacts.GetAllContacts()
|
|
449
|
+
data, err := s.client.Store.Contacts.GetAllContacts(ctx)
|
|
446
450
|
if err != nil {
|
|
447
|
-
return nil, fmt.Errorf("
|
|
451
|
+
return nil, fmt.Errorf("failed getting local contacts: %s", err)
|
|
448
452
|
}
|
|
449
453
|
|
|
450
454
|
var contacts []Contact
|
|
451
455
|
for jid, info := range data {
|
|
456
|
+
c := newContact(jid, info)
|
|
457
|
+
if c.JID == "" {
|
|
458
|
+
continue
|
|
459
|
+
}
|
|
460
|
+
|
|
452
461
|
if err = s.client.SubscribePresence(jid); err != nil {
|
|
453
462
|
s.gateway.logger.Warnf("Failed to subscribe to presence for %s", jid)
|
|
454
463
|
}
|
|
455
464
|
|
|
456
|
-
|
|
457
|
-
contacts = append(contacts, c.Contact)
|
|
465
|
+
contacts = append(contacts, c)
|
|
458
466
|
}
|
|
459
467
|
|
|
460
468
|
return contacts, nil
|
|
@@ -463,18 +471,19 @@ func (s *Session) GetContacts(refresh bool) ([]Contact, error) {
|
|
|
463
471
|
// GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
|
|
464
472
|
// information on present participants.
|
|
465
473
|
func (s *Session) GetGroups() ([]Group, error) {
|
|
474
|
+
var ctx = context.Background()
|
|
466
475
|
if s.client == nil || s.client.Store.ID == nil {
|
|
467
|
-
return nil, fmt.Errorf("
|
|
476
|
+
return nil, fmt.Errorf("cannot get groups for unauthenticated session")
|
|
468
477
|
}
|
|
469
478
|
|
|
470
479
|
data, err := s.client.GetJoinedGroups()
|
|
471
480
|
if err != nil {
|
|
472
|
-
return nil, fmt.Errorf("
|
|
481
|
+
return nil, fmt.Errorf("failed getting groups: %s", err)
|
|
473
482
|
}
|
|
474
483
|
|
|
475
484
|
var groups []Group
|
|
476
485
|
for _, info := range data {
|
|
477
|
-
groups = append(groups, newGroup(s.client, info))
|
|
486
|
+
groups = append(groups, newGroup(ctx, s.client, info))
|
|
478
487
|
}
|
|
479
488
|
|
|
480
489
|
return groups, nil
|
|
@@ -483,38 +492,39 @@ func (s *Session) GetGroups() ([]Group, error) {
|
|
|
483
492
|
// CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
|
|
484
493
|
// participant JIDs given.
|
|
485
494
|
func (s *Session) CreateGroup(name string, participants []string) (Group, error) {
|
|
495
|
+
var ctx = context.Background()
|
|
486
496
|
if s.client == nil || s.client.Store.ID == nil {
|
|
487
|
-
return Group{}, fmt.Errorf("
|
|
497
|
+
return Group{}, fmt.Errorf("cannot create group for unauthenticated session")
|
|
488
498
|
}
|
|
489
499
|
|
|
490
500
|
var jids []types.JID
|
|
491
501
|
for _, p := range participants {
|
|
492
502
|
jid, err := types.ParseJID(p)
|
|
493
503
|
if err != nil {
|
|
494
|
-
return Group{}, fmt.Errorf("
|
|
504
|
+
return Group{}, fmt.Errorf("could not parse participant JID: %s", err)
|
|
495
505
|
}
|
|
496
506
|
|
|
497
507
|
jids = append(jids, jid)
|
|
498
508
|
}
|
|
499
509
|
|
|
500
510
|
req := whatsmeow.ReqCreateGroup{Name: name, Participants: jids}
|
|
501
|
-
info, err := s.client.CreateGroup(req)
|
|
511
|
+
info, err := s.client.CreateGroup(ctx, req)
|
|
502
512
|
if err != nil {
|
|
503
|
-
return Group{}, fmt.Errorf("
|
|
513
|
+
return Group{}, fmt.Errorf("could not create group: %s", err)
|
|
504
514
|
}
|
|
505
515
|
|
|
506
|
-
return newGroup(s.client, info), nil
|
|
516
|
+
return newGroup(ctx, s.client, info), nil
|
|
507
517
|
}
|
|
508
518
|
|
|
509
519
|
// LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
|
|
510
520
|
func (s *Session) LeaveGroup(resourceID string) error {
|
|
511
521
|
if s.client == nil || s.client.Store.ID == nil {
|
|
512
|
-
return fmt.Errorf("
|
|
522
|
+
return fmt.Errorf("cannot leave group for unauthenticated session")
|
|
513
523
|
}
|
|
514
524
|
|
|
515
525
|
jid, err := types.ParseJID(resourceID)
|
|
516
526
|
if err != nil {
|
|
517
|
-
return fmt.Errorf("
|
|
527
|
+
return fmt.Errorf("could not parse JID for leaving group: %s", err)
|
|
518
528
|
}
|
|
519
529
|
|
|
520
530
|
return s.client.LeaveGroup(jid)
|
|
@@ -525,19 +535,19 @@ func (s *Session) LeaveGroup(resourceID string) error {
|
|
|
525
535
|
// for the given ID has not changed.
|
|
526
536
|
func (s *Session) GetAvatar(resourceID, avatarID string) (Avatar, error) {
|
|
527
537
|
if s.client == nil || s.client.Store.ID == nil {
|
|
528
|
-
return Avatar{}, fmt.Errorf("
|
|
538
|
+
return Avatar{}, fmt.Errorf("cannot get avatar for unauthenticated session")
|
|
529
539
|
}
|
|
530
540
|
|
|
531
541
|
jid, err := types.ParseJID(resourceID)
|
|
532
542
|
if err != nil {
|
|
533
|
-
return Avatar{}, fmt.Errorf("
|
|
543
|
+
return Avatar{}, fmt.Errorf("could not parse JID for avatar: %s", err)
|
|
534
544
|
}
|
|
535
545
|
|
|
536
546
|
p, err := s.client.GetProfilePictureInfo(jid, &whatsmeow.GetProfilePictureParams{ExistingID: avatarID})
|
|
537
547
|
if errors.Is(err, whatsmeow.ErrProfilePictureNotSet) || errors.Is(err, whatsmeow.ErrProfilePictureUnauthorized) {
|
|
538
548
|
return Avatar{}, nil
|
|
539
549
|
} else if err != nil {
|
|
540
|
-
return Avatar{}, fmt.Errorf("
|
|
550
|
+
return Avatar{}, fmt.Errorf("could not get avatar: %s", err)
|
|
541
551
|
} else if p != nil {
|
|
542
552
|
return Avatar{ID: p.ID, URL: p.URL}, nil
|
|
543
553
|
}
|
|
@@ -550,7 +560,7 @@ func (s *Session) GetAvatar(resourceID, avatarID string) (Avatar, error) {
|
|
|
550
560
|
// typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
|
|
551
561
|
func (s *Session) SetAvatar(resourceID string, avatar []byte) (string, error) {
|
|
552
562
|
if s.client == nil || s.client.Store.ID == nil {
|
|
553
|
-
return "", fmt.Errorf("
|
|
563
|
+
return "", fmt.Errorf("cannot set avatar for unauthenticated session")
|
|
554
564
|
}
|
|
555
565
|
|
|
556
566
|
var ctx = context.Background()
|
|
@@ -561,7 +571,7 @@ func (s *Session) SetAvatar(resourceID string, avatar []byte) (string, error) {
|
|
|
561
571
|
if resourceID == "" {
|
|
562
572
|
jid = types.EmptyJID
|
|
563
573
|
} else if jid, err = types.ParseJID(resourceID); err != nil {
|
|
564
|
-
return "", fmt.Errorf("
|
|
574
|
+
return "", fmt.Errorf("could not parse JID for avatar: %s", err)
|
|
565
575
|
}
|
|
566
576
|
|
|
567
577
|
if len(avatar) == 0 {
|
|
@@ -570,7 +580,7 @@ func (s *Session) SetAvatar(resourceID string, avatar []byte) (string, error) {
|
|
|
570
580
|
// Ensure avatar is in JPEG format, and convert before setting if needed.
|
|
571
581
|
data, err := media.Convert(ctx, avatar, &media.Spec{MIME: media.TypeJPEG})
|
|
572
582
|
if err != nil {
|
|
573
|
-
return "", fmt.Errorf("
|
|
583
|
+
return "", fmt.Errorf("failed converting avatar to JPEG: %s", err)
|
|
574
584
|
}
|
|
575
585
|
|
|
576
586
|
return s.client.SetGroupPhoto(jid, data)
|
|
@@ -580,12 +590,12 @@ func (s *Session) SetAvatar(resourceID string, avatar []byte) (string, error) {
|
|
|
580
590
|
// SetGroupName updates the name of a WhatsApp group for the Group JID given.
|
|
581
591
|
func (s *Session) SetGroupName(resourceID, name string) error {
|
|
582
592
|
if s.client == nil || s.client.Store.ID == nil {
|
|
583
|
-
return fmt.Errorf("
|
|
593
|
+
return fmt.Errorf("cannot set group name for unauthenticated session")
|
|
584
594
|
}
|
|
585
595
|
|
|
586
596
|
jid, err := types.ParseJID(resourceID)
|
|
587
597
|
if err != nil {
|
|
588
|
-
return fmt.Errorf("
|
|
598
|
+
return fmt.Errorf("could not parse JID for group name change: %s", err)
|
|
589
599
|
}
|
|
590
600
|
|
|
591
601
|
return s.client.SetGroupName(jid, name)
|
|
@@ -594,12 +604,12 @@ func (s *Session) SetGroupName(resourceID, name string) error {
|
|
|
594
604
|
// SetGroupName updates the topic of a WhatsApp group for the Group JID given.
|
|
595
605
|
func (s *Session) SetGroupTopic(resourceID, topic string) error {
|
|
596
606
|
if s.client == nil || s.client.Store.ID == nil {
|
|
597
|
-
return fmt.Errorf("
|
|
607
|
+
return fmt.Errorf("cannot set group topic for unauthenticated session")
|
|
598
608
|
}
|
|
599
609
|
|
|
600
610
|
jid, err := types.ParseJID(resourceID)
|
|
601
611
|
if err != nil {
|
|
602
|
-
return fmt.Errorf("
|
|
612
|
+
return fmt.Errorf("could not parse JID for group topic change: %s", err)
|
|
603
613
|
}
|
|
604
614
|
|
|
605
615
|
return s.client.SetGroupTopic(jid, "", "", topic)
|
|
@@ -610,26 +620,27 @@ func (s *Session) SetGroupTopic(resourceID, topic string) error {
|
|
|
610
620
|
// removals, and changes to privileges. Participant JIDs given must be part of the authenticated
|
|
611
621
|
// session's roster at least, and must also be active group participants for other types of changes.
|
|
612
622
|
func (s *Session) UpdateGroupParticipants(resourceID string, participants []GroupParticipant) ([]GroupParticipant, error) {
|
|
623
|
+
var ctx = context.Background()
|
|
613
624
|
if s.client == nil || s.client.Store.ID == nil {
|
|
614
|
-
return nil, fmt.Errorf("
|
|
625
|
+
return nil, fmt.Errorf("cannot update group participants for unauthenticated session")
|
|
615
626
|
}
|
|
616
627
|
|
|
617
628
|
jid, err := types.ParseJID(resourceID)
|
|
618
629
|
if err != nil {
|
|
619
|
-
return nil, fmt.Errorf("
|
|
630
|
+
return nil, fmt.Errorf("could not parse JID for group participant update: %s", err)
|
|
620
631
|
}
|
|
621
632
|
|
|
622
633
|
var changes = make(map[whatsmeow.ParticipantChange][]types.JID)
|
|
623
634
|
for _, p := range participants {
|
|
624
635
|
participantJID, err := types.ParseJID(p.JID)
|
|
625
636
|
if err != nil {
|
|
626
|
-
return nil, fmt.Errorf("
|
|
637
|
+
return nil, fmt.Errorf("could not parse participant JID for update: %s", err)
|
|
627
638
|
}
|
|
628
639
|
|
|
629
|
-
if c, err := s.client.Store.Contacts.GetContact(participantJID); err != nil {
|
|
630
|
-
return nil, fmt.Errorf("
|
|
640
|
+
if c, err := s.client.Store.Contacts.GetContact(ctx, participantJID); err != nil {
|
|
641
|
+
return nil, fmt.Errorf("could not fetch contact for participant: %s", err)
|
|
631
642
|
} else if !c.Found {
|
|
632
|
-
return nil, fmt.Errorf("
|
|
643
|
+
return nil, fmt.Errorf("cannot update group participant for contact '%s' not in roster", participantJID)
|
|
633
644
|
}
|
|
634
645
|
|
|
635
646
|
c := p.Action.toParticipantChange()
|
|
@@ -640,10 +651,10 @@ func (s *Session) UpdateGroupParticipants(resourceID string, participants []Grou
|
|
|
640
651
|
for change, participantJIDs := range changes {
|
|
641
652
|
participants, err := s.client.UpdateGroupParticipants(jid, participantJIDs, change)
|
|
642
653
|
if err != nil {
|
|
643
|
-
return nil, fmt.Errorf("
|
|
654
|
+
return nil, fmt.Errorf("failed setting group affiliation: %s", err)
|
|
644
655
|
}
|
|
645
656
|
for i := range participants {
|
|
646
|
-
p := newGroupParticipant(participants[i])
|
|
657
|
+
p := newGroupParticipant(ctx, s.client, participants[i])
|
|
647
658
|
if p.JID == "" {
|
|
648
659
|
continue
|
|
649
660
|
}
|
|
@@ -659,22 +670,23 @@ func (s *Session) UpdateGroupParticipants(resourceID string, participants []Grou
|
|
|
659
670
|
// error is returned if no contact was found, but any unexpected errors will otherwise be returned
|
|
660
671
|
// directly.
|
|
661
672
|
func (s *Session) FindContact(phone string) (Contact, error) {
|
|
673
|
+
var ctx = context.Background()
|
|
662
674
|
if s.client == nil || s.client.Store.ID == nil {
|
|
663
|
-
return Contact{}, fmt.Errorf("
|
|
675
|
+
return Contact{}, fmt.Errorf("cannot find contact for unauthenticated session")
|
|
664
676
|
}
|
|
665
677
|
|
|
666
678
|
jid := types.NewJID(phone, DefaultUserServer)
|
|
667
|
-
if
|
|
668
|
-
if
|
|
669
|
-
return
|
|
679
|
+
if info, err := s.client.Store.Contacts.GetContact(ctx, jid); err == nil && info.Found {
|
|
680
|
+
if c := newContact(jid, info); c.JID != "" {
|
|
681
|
+
return c, nil
|
|
670
682
|
}
|
|
671
683
|
}
|
|
672
684
|
|
|
673
685
|
resp, err := s.client.IsOnWhatsApp([]string{phone})
|
|
674
686
|
if err != nil {
|
|
675
|
-
return Contact{}, fmt.Errorf("
|
|
687
|
+
return Contact{}, fmt.Errorf("failed looking up contact '%s': %s", phone, err)
|
|
676
688
|
} else if len(resp) != 1 {
|
|
677
|
-
return Contact{}, fmt.Errorf("
|
|
689
|
+
return Contact{}, fmt.Errorf("failed looking up contact '%s': invalid response", phone)
|
|
678
690
|
} else if !resp[0].IsIn || resp[0].JID.IsEmpty() {
|
|
679
691
|
return Contact{}, nil
|
|
680
692
|
}
|
|
@@ -687,13 +699,14 @@ func (s *Session) FindContact(phone string) (Contact, error) {
|
|
|
687
699
|
// history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
|
|
688
700
|
// event handler. An error will be returned if requesting history fails for any reason.
|
|
689
701
|
func (s *Session) RequestMessageHistory(resourceID string, oldestMessage Message) error {
|
|
702
|
+
var ctx = context.Background()
|
|
690
703
|
if s.client == nil || s.client.Store.ID == nil {
|
|
691
|
-
return fmt.Errorf("
|
|
704
|
+
return fmt.Errorf("cannot request history for unauthenticated session")
|
|
692
705
|
}
|
|
693
706
|
|
|
694
707
|
jid, err := types.ParseJID(resourceID)
|
|
695
708
|
if err != nil {
|
|
696
|
-
return fmt.Errorf("
|
|
709
|
+
return fmt.Errorf("could not parse JID for history request: %s", err)
|
|
697
710
|
}
|
|
698
711
|
|
|
699
712
|
info := &types.MessageInfo{
|
|
@@ -703,9 +716,9 @@ func (s *Session) RequestMessageHistory(resourceID string, oldestMessage Message
|
|
|
703
716
|
}
|
|
704
717
|
|
|
705
718
|
req := s.client.BuildHistorySyncRequest(info, maxHistorySyncMessages)
|
|
706
|
-
_, err = s.client.SendMessage(
|
|
719
|
+
_, err = s.client.SendMessage(ctx, s.device.JID().ToNonAD(), req, whatsmeow.SendRequestExtra{Peer: true})
|
|
707
720
|
if err != nil {
|
|
708
|
-
return fmt.Errorf("
|
|
721
|
+
return fmt.Errorf("failed to request history for %s: %s", resourceID, err)
|
|
709
722
|
}
|
|
710
723
|
|
|
711
724
|
return nil
|
|
@@ -739,8 +752,9 @@ func (s *Session) propagateEvent(kind EventKind, payload *EventPayload) {
|
|
|
739
752
|
// HandleEvent processes the given incoming WhatsApp event, checking its concrete type and
|
|
740
753
|
// propagating it to the adapter event handler. Unknown or unhandled events are ignored, and any
|
|
741
754
|
// errors that occur during processing are logged.
|
|
742
|
-
func (s *Session) handleEvent(evt
|
|
743
|
-
|
|
755
|
+
func (s *Session) handleEvent(evt any) {
|
|
756
|
+
var ctx = context.Background()
|
|
757
|
+
s.gateway.logger.Debugf("Handling event '%T': %+v", evt, jsonStringer{evt})
|
|
744
758
|
|
|
745
759
|
switch evt := evt.(type) {
|
|
746
760
|
case *events.AppStateSyncComplete:
|
|
@@ -755,7 +769,7 @@ func (s *Session) handleEvent(evt interface{}) {
|
|
|
755
769
|
case events.ConnectFailureLoggedOut:
|
|
756
770
|
// These events are handled separately.
|
|
757
771
|
default:
|
|
758
|
-
s.gateway.logger.Errorf("
|
|
772
|
+
s.gateway.logger.Errorf("failed to connect: %s", evt.Message)
|
|
759
773
|
s.propagateEvent(EventConnect, &EventPayload{Connect: Connect{Error: evt.Message}})
|
|
760
774
|
}
|
|
761
775
|
case *events.Connected, *events.PushNameSetting:
|
|
@@ -782,22 +796,22 @@ func (s *Session) handleEvent(evt interface{}) {
|
|
|
782
796
|
case waHistorySync.HistorySync_INITIAL_BOOTSTRAP, waHistorySync.HistorySync_RECENT, waHistorySync.HistorySync_ON_DEMAND:
|
|
783
797
|
for _, c := range evt.Data.GetConversations() {
|
|
784
798
|
for _, msg := range c.GetMessages() {
|
|
785
|
-
s.propagateEvent(newEventFromHistory(s.client, msg.GetMessage()))
|
|
799
|
+
s.propagateEvent(newEventFromHistory(ctx, s.client, msg.GetMessage()))
|
|
786
800
|
}
|
|
787
801
|
}
|
|
788
802
|
}
|
|
789
803
|
case *events.Message:
|
|
790
|
-
s.propagateEvent(newMessageEvent(s.client, evt))
|
|
804
|
+
s.propagateEvent(newMessageEvent(ctx, s.client, evt))
|
|
791
805
|
case *events.Receipt:
|
|
792
|
-
s.propagateEvent(newReceiptEvent(evt))
|
|
806
|
+
s.propagateEvent(newReceiptEvent(ctx, s.client, evt))
|
|
793
807
|
case *events.Presence:
|
|
794
808
|
s.propagateEvent(newPresenceEvent(evt))
|
|
795
809
|
case *events.PushName:
|
|
796
810
|
s.propagateEvent(newContactEvent(evt.JID, types.ContactInfo{FullName: evt.NewPushName}))
|
|
797
811
|
case *events.JoinedGroup:
|
|
798
|
-
s.propagateEvent(EventGroup, &EventPayload{Group: newGroup(s.client, &evt.GroupInfo)})
|
|
812
|
+
s.propagateEvent(EventGroup, &EventPayload{Group: newGroup(ctx, s.client, &evt.GroupInfo)})
|
|
799
813
|
case *events.GroupInfo:
|
|
800
|
-
s.propagateEvent(newGroupEvent(evt))
|
|
814
|
+
s.propagateEvent(newGroupEvent(ctx, s.client, evt))
|
|
801
815
|
case *events.ChatPresence:
|
|
802
816
|
s.propagateEvent(newChatStateEvent(evt))
|
|
803
817
|
case *events.CallOffer:
|
|
@@ -806,11 +820,11 @@ func (s *Session) handleEvent(evt interface{}) {
|
|
|
806
820
|
s.propagateEvent(newCallEvent(callStateFromReason(evt.Reason), evt.BasicCallMeta))
|
|
807
821
|
case *events.LoggedOut:
|
|
808
822
|
s.client.Disconnect()
|
|
809
|
-
if err := s.client.Store.Delete(); err != nil {
|
|
823
|
+
if err := s.client.Store.Delete(ctx); err != nil {
|
|
810
824
|
s.gateway.logger.Warnf("Unable to delete local device state on logout: %s", err)
|
|
811
825
|
}
|
|
812
826
|
s.client = nil
|
|
813
|
-
s.propagateEvent(EventLoggedOut,
|
|
827
|
+
s.propagateEvent(EventLoggedOut, &EventPayload{LoggedOut: LoggedOut{Reason: evt.Reason.String()}})
|
|
814
828
|
case *events.PairSuccess:
|
|
815
829
|
if s.client.Store.ID == nil {
|
|
816
830
|
s.gateway.logger.Errorf("Pairing succeeded, but device ID is missing")
|
|
@@ -847,6 +861,16 @@ func (s *Session) handleEvent(evt interface{}) {
|
|
|
847
861
|
}
|
|
848
862
|
}
|
|
849
863
|
|
|
864
|
+
// a JSONStringer is a value that returns a JSON-encoded, multi-line version of itself in calls to
|
|
865
|
+
// [String].
|
|
866
|
+
type jsonStringer struct{ v any }
|
|
867
|
+
|
|
868
|
+
// String returns a multi-line, indented, JSON representation of the [jsonStringer] value.
|
|
869
|
+
func (j jsonStringer) String() string {
|
|
870
|
+
buf, _ := json.MarshalIndent(j.v, "", " ")
|
|
871
|
+
return string(buf)
|
|
872
|
+
}
|
|
873
|
+
|
|
850
874
|
// PtrTo returns a pointer to the given value, and is used for convenience when converting between
|
|
851
875
|
// concrete and pointer values without assigning to a variable.
|
|
852
876
|
func ptrTo[T any](t T) *T {
|
slidge_whatsapp/session.py
CHANGED
|
@@ -6,10 +6,12 @@ from pathlib import Path
|
|
|
6
6
|
from re import search
|
|
7
7
|
from typing import Any, Optional, Union, cast
|
|
8
8
|
|
|
9
|
+
import sqlalchemy
|
|
9
10
|
from aiohttp import ClientSession
|
|
10
11
|
from linkpreview import Link, LinkPreview
|
|
11
12
|
from slidge import BaseSession, FormField, GatewayUser, SearchResult, global_config
|
|
12
13
|
from slidge.contact.roster import ContactIsUser
|
|
14
|
+
from slidge.db.models import ArchivedMessage
|
|
13
15
|
from slidge.util import is_valid_phone_number
|
|
14
16
|
from slidge.util.types import (
|
|
15
17
|
LegacyAttachment,
|
|
@@ -157,17 +159,24 @@ class Session(BaseSession[str, Recipient]):
|
|
|
157
159
|
)
|
|
158
160
|
elif event == whatsapp.EventLoggedOut:
|
|
159
161
|
self.logged = False
|
|
160
|
-
|
|
162
|
+
message = MESSAGE_LOGGED_OUT
|
|
163
|
+
if data.LoggedOut.Reason:
|
|
164
|
+
message += f"\nReason: {data.LoggedOut.Reason}"
|
|
165
|
+
self.send_gateway_message(message)
|
|
161
166
|
self.send_gateway_status("Logged out", show="away")
|
|
162
167
|
elif event == whatsapp.EventContact:
|
|
163
168
|
contact = await self.contacts.add_whatsapp_contact(data.Contact)
|
|
164
|
-
if contact is not None:
|
|
169
|
+
if contact is not None and contact.is_friend:
|
|
165
170
|
await contact.add_to_roster()
|
|
166
171
|
elif event == whatsapp.EventGroup:
|
|
167
172
|
await self.bookmarks.add_whatsapp_group(data.Group)
|
|
168
173
|
elif event == whatsapp.EventPresence:
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
if not whatsapp.IsAnonymousJID(data.Presence.JID):
|
|
175
|
+
contact = await self.contacts.by_legacy_id(data.Presence.JID)
|
|
176
|
+
if contact is not None:
|
|
177
|
+
await contact.update_presence(
|
|
178
|
+
data.Presence.Kind, data.Presence.LastSeen
|
|
179
|
+
)
|
|
171
180
|
elif event == whatsapp.EventChatState:
|
|
172
181
|
await self.handle_chat_state(data.ChatState)
|
|
173
182
|
elif event == whatsapp.EventReceipt:
|
|
@@ -217,12 +226,22 @@ class Session(BaseSession[str, Recipient]):
|
|
|
217
226
|
"""
|
|
218
227
|
contact = await self.__get_contact_or_participant(message.JID, message.GroupJID)
|
|
219
228
|
muc = getattr(contact, "muc", None)
|
|
229
|
+
# Skip handing message that's already in our message archive.
|
|
230
|
+
if (
|
|
231
|
+
muc is not None
|
|
232
|
+
and message.IsHistory
|
|
233
|
+
and await self.__is_message_in_archive(message.ID)
|
|
234
|
+
):
|
|
235
|
+
return
|
|
220
236
|
reply_to = await self.__get_reply_to(message, muc)
|
|
221
237
|
message_timestamp = (
|
|
222
238
|
datetime.fromtimestamp(message.Timestamp, tz=timezone.utc)
|
|
223
239
|
if message.Timestamp > 0
|
|
224
240
|
else None
|
|
225
241
|
)
|
|
242
|
+
if message.GroupInvite.JID:
|
|
243
|
+
text = f"Received group invite for xmpp:{message.GroupInvite.JID} from {contact.name}, auto-joining..."
|
|
244
|
+
self.send_gateway_message(text)
|
|
226
245
|
if message.Kind == whatsapp.MessagePlain:
|
|
227
246
|
body = await self.__get_body(message, muc)
|
|
228
247
|
contact.send_text(
|
|
@@ -543,15 +562,13 @@ class Session(BaseSession[str, Recipient]):
|
|
|
543
562
|
items=[{"phone": cast(str, phone), "jid": contact.jid.bare}],
|
|
544
563
|
)
|
|
545
564
|
|
|
546
|
-
def message_is_carbon(self, c: Recipient, legacy_msg_id: str):
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
stored = self.xmpp.store.sent.get_xmpp_id(self.user_pk, legacy_msg_id)
|
|
554
|
-
return stored is not None
|
|
565
|
+
def message_is_carbon(self, c: Recipient, legacy_msg_id: str) -> bool:
|
|
566
|
+
with self.xmpp.store.session() as orm:
|
|
567
|
+
return bool(
|
|
568
|
+
self.xmpp.store.id_map.get_xmpp(
|
|
569
|
+
orm, c.stored.id, legacy_msg_id, c.is_group
|
|
570
|
+
)
|
|
571
|
+
)
|
|
555
572
|
|
|
556
573
|
def __reset_connected(self):
|
|
557
574
|
if hasattr(self, "_connected") and not self.__connected.done():
|
|
@@ -675,6 +692,16 @@ class Session(BaseSession[str, Recipient]):
|
|
|
675
692
|
Accuracy=int(match.group("acc") or 0),
|
|
676
693
|
)
|
|
677
694
|
|
|
695
|
+
async def __is_message_in_archive(self, legacy_msg_id: str) -> bool:
|
|
696
|
+
with self.xmpp.store.session() as orm:
|
|
697
|
+
return bool(
|
|
698
|
+
orm.scalar(
|
|
699
|
+
sqlalchemy.exists()
|
|
700
|
+
.where(ArchivedMessage.legacy_id == legacy_msg_id)
|
|
701
|
+
.select()
|
|
702
|
+
)
|
|
703
|
+
)
|
|
704
|
+
|
|
678
705
|
async def __get_contact_or_participant(
|
|
679
706
|
self, legacy_contact_id: str, legacy_group_jid: str
|
|
680
707
|
):
|
|
@@ -683,7 +710,12 @@ class Session(BaseSession[str, Recipient]):
|
|
|
683
710
|
"""
|
|
684
711
|
if legacy_group_jid:
|
|
685
712
|
muc = await self.bookmarks.by_legacy_id(legacy_group_jid)
|
|
686
|
-
|
|
713
|
+
if whatsapp.IsAnonymousJID(legacy_contact_id):
|
|
714
|
+
return await muc.get_participant(legacy_contact_id)
|
|
715
|
+
else:
|
|
716
|
+
return await muc.get_participant_by_legacy_id(legacy_contact_id)
|
|
717
|
+
elif whatsapp.IsAnonymousJID(legacy_contact_id):
|
|
718
|
+
raise ValueError("Contact for anonymous JID")
|
|
687
719
|
else:
|
|
688
720
|
return await self.contacts.by_legacy_id(legacy_contact_id)
|
|
689
721
|
|