slidge-whatsapp 0.2.5__cp313-cp313-manylinux_2_36_aarch64.whl → 0.2.6__cp313-cp313-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/event.go +23 -24
- slidge_whatsapp/gateway.go +13 -9
- slidge_whatsapp/gateway.py +2 -2
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +181 -181
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +155 -155
- slidge_whatsapp/generated/whatsapp.c +1507 -1507
- slidge_whatsapp/generated/whatsapp.go +907 -907
- slidge_whatsapp/generated/whatsapp.py +1318 -1318
- slidge_whatsapp/generated/whatsapp_go.h +181 -181
- slidge_whatsapp/go.mod +15 -12
- slidge_whatsapp/go.sum +41 -29
- slidge_whatsapp/media/media.go +16 -10
- slidge_whatsapp/session.go +73 -66
- 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/jupiterrider/ffi/CHANGELOG.md +14 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +2 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
- 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 +2 -7
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +8510 -5090
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +344 -150
- 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/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.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/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 +64 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +41 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +37 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +88 -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/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/keys.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +27 -25
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +60 -15
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +25 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +45 -19
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +52 -28
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +59 -29
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +166 -146
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +2 -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 +270 -111
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +118 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +67 -36
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +7 -4
- 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 +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
- 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 +158 -15
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +1 -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} +170 -84
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +1 -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 +6747 -2230
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +294 -43
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +456 -135
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.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/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/waSyncAction/WASyncAction.pb.go +1051 -382
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +32 -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 +382 -78
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +555 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +13 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +29 -19
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +244 -73
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +27 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +85 -43
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +79 -61
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +291 -167
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +153 -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/upgrades.go +22 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +105 -56
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +7 -8
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +17 -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 +45 -29
- 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 +122 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +61 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +16 -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 +170 -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 +432 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3350 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +20 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3287 -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/syscall_darwin.go +148 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
- 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/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 +239 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +9 -0
- 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/internal/editiondefaults/editions_defaults.binpb +0 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +3 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +16 -0
- 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 +2 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
- slidge_whatsapp/vendor/modules.txt +38 -13
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/METADATA +1 -1
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/RECORD +293 -180
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/WHEEL +1 -1
- 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.2.6.dist-info}/LICENSE +0 -0
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/entry_points.txt +0 -0
|
@@ -25,6 +25,7 @@ import (
|
|
|
25
25
|
"go.mau.fi/libsignal/protocol"
|
|
26
26
|
"go.mau.fi/libsignal/session"
|
|
27
27
|
"go.mau.fi/libsignal/signalerror"
|
|
28
|
+
"go.mau.fi/util/ptr"
|
|
28
29
|
"go.mau.fi/util/random"
|
|
29
30
|
"google.golang.org/protobuf/proto"
|
|
30
31
|
|
|
@@ -35,6 +36,8 @@ import (
|
|
|
35
36
|
"go.mau.fi/whatsmeow/types/events"
|
|
36
37
|
)
|
|
37
38
|
|
|
39
|
+
const WebMessageIDPrefix = "3EB0"
|
|
40
|
+
|
|
38
41
|
// GenerateMessageID generates a random string that can be used as a message ID on WhatsApp.
|
|
39
42
|
//
|
|
40
43
|
// msgID := cli.GenerateMessageID()
|
|
@@ -52,7 +55,7 @@ func (cli *Client) GenerateMessageID() types.MessageID {
|
|
|
52
55
|
}
|
|
53
56
|
data = append(data, random.Bytes(16)...)
|
|
54
57
|
hash := sha256.Sum256(data)
|
|
55
|
-
return
|
|
58
|
+
return WebMessageIDPrefix + strings.ToUpper(hex.EncodeToString(hash[:9]))
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
func GenerateFacebookMessageID() int64 {
|
|
@@ -67,7 +70,7 @@ func GenerateFacebookMessageID() int64 {
|
|
|
67
70
|
//
|
|
68
71
|
// Deprecated: WhatsApp web has switched to using a hash of the current timestamp, user id and random bytes. Use Client.GenerateMessageID instead.
|
|
69
72
|
func GenerateMessageID() types.MessageID {
|
|
70
|
-
return
|
|
73
|
+
return WebMessageIDPrefix + strings.ToUpper(hex.EncodeToString(random.Bytes(8)))
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
type MessageDebugTimings struct {
|
|
@@ -114,6 +117,10 @@ type SendResponse struct {
|
|
|
114
117
|
|
|
115
118
|
// Message handling duration, used for debugging
|
|
116
119
|
DebugTimings MessageDebugTimings
|
|
120
|
+
|
|
121
|
+
// The identity the message was sent with (LID or PN)
|
|
122
|
+
// This is currently not reliable in all cases.
|
|
123
|
+
Sender types.JID
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// SendRequestExtra contains the optional parameters for SendMessage.
|
|
@@ -140,6 +147,8 @@ type SendRequestExtra struct {
|
|
|
140
147
|
Timeout time.Duration
|
|
141
148
|
// When sending media to newsletters, the Handle field returned by the file upload.
|
|
142
149
|
MediaHandle string
|
|
150
|
+
|
|
151
|
+
Meta *types.MsgMetaInfo
|
|
143
152
|
}
|
|
144
153
|
|
|
145
154
|
// SendMessage sends the given message.
|
|
@@ -215,17 +224,19 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
215
224
|
}
|
|
216
225
|
|
|
217
226
|
isBotMode := isInlineBotMode || to.IsBot()
|
|
218
|
-
|
|
227
|
+
needsMessageSecret := isBotMode
|
|
228
|
+
var extraParams nodeExtraParams
|
|
219
229
|
|
|
220
|
-
if
|
|
230
|
+
if needsMessageSecret {
|
|
221
231
|
if message.MessageContextInfo == nil {
|
|
222
232
|
message.MessageContextInfo = &waE2E.MessageContextInfo{}
|
|
223
233
|
}
|
|
224
|
-
|
|
225
234
|
if message.MessageContextInfo.MessageSecret == nil {
|
|
226
235
|
message.MessageContextInfo.MessageSecret = random.Bytes(32)
|
|
227
236
|
}
|
|
237
|
+
}
|
|
228
238
|
|
|
239
|
+
if isBotMode {
|
|
229
240
|
if message.MessageContextInfo.BotMetadata == nil {
|
|
230
241
|
message.MessageContextInfo.BotMetadata = &waE2E.BotMetadata{
|
|
231
242
|
PersonaID: proto.String("867051314767696$760019659443059"),
|
|
@@ -261,8 +272,8 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
261
272
|
return
|
|
262
273
|
}
|
|
263
274
|
|
|
264
|
-
participantNodes, _ := cli.encryptMessageForDevices(ctx, []types.JID{req.InlineBotJID},
|
|
265
|
-
botNode = &waBinary.Node{
|
|
275
|
+
participantNodes, _ := cli.encryptMessageForDevices(ctx, []types.JID{req.InlineBotJID}, resp.ID, messagePlaintext, nil, waBinary.Attrs{})
|
|
276
|
+
extraParams.botNode = &waBinary.Node{
|
|
266
277
|
Tag: "bot",
|
|
267
278
|
Attrs: nil,
|
|
268
279
|
Content: participantNodes,
|
|
@@ -270,6 +281,62 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
270
281
|
}
|
|
271
282
|
}
|
|
272
283
|
|
|
284
|
+
var groupParticipants []types.JID
|
|
285
|
+
if to.Server == types.GroupServer || to.Server == types.BroadcastServer {
|
|
286
|
+
start := time.Now()
|
|
287
|
+
if to.Server == types.GroupServer {
|
|
288
|
+
var cachedData *groupMetaCache
|
|
289
|
+
cachedData, err = cli.getCachedGroupData(ctx, to)
|
|
290
|
+
if err != nil {
|
|
291
|
+
err = fmt.Errorf("failed to get group members: %w", err)
|
|
292
|
+
return
|
|
293
|
+
}
|
|
294
|
+
groupParticipants = cachedData.Members
|
|
295
|
+
// TODO this is fairly hacky, is there a proper way to determine which identity the message is sent with?
|
|
296
|
+
if cachedData.AddressingMode == types.AddressingModeLID {
|
|
297
|
+
ownID = cli.getOwnLID()
|
|
298
|
+
extraParams.addressingMode = types.AddressingModeLID
|
|
299
|
+
if req.Meta == nil {
|
|
300
|
+
req.Meta = &types.MsgMetaInfo{}
|
|
301
|
+
}
|
|
302
|
+
req.Meta.DeprecatedLIDSession = ptr.Ptr(false)
|
|
303
|
+
} else if cachedData.CommunityAnnouncementGroup && req.Meta != nil {
|
|
304
|
+
ownID = cli.getOwnLID()
|
|
305
|
+
// Why is this set to PN?
|
|
306
|
+
extraParams.addressingMode = types.AddressingModePN
|
|
307
|
+
}
|
|
308
|
+
} else {
|
|
309
|
+
groupParticipants, err = cli.getBroadcastListParticipants(ctx, to)
|
|
310
|
+
if err != nil {
|
|
311
|
+
err = fmt.Errorf("failed to get broadcast list members: %w", err)
|
|
312
|
+
return
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
resp.DebugTimings.GetParticipants = time.Since(start)
|
|
316
|
+
} else if to.Server == types.HiddenUserServer {
|
|
317
|
+
ownID = cli.getOwnLID()
|
|
318
|
+
extraParams.addressingMode = types.AddressingModeLID
|
|
319
|
+
// if req.Meta == nil {
|
|
320
|
+
// req.Meta = &types.MsgMetaInfo{}
|
|
321
|
+
// }
|
|
322
|
+
// req.Meta.DeprecatedLIDSession = ptr.Ptr(false)
|
|
323
|
+
}
|
|
324
|
+
if req.Meta != nil {
|
|
325
|
+
extraParams.metaNode = &waBinary.Node{
|
|
326
|
+
Tag: "meta",
|
|
327
|
+
Attrs: waBinary.Attrs{},
|
|
328
|
+
}
|
|
329
|
+
if req.Meta.DeprecatedLIDSession != nil {
|
|
330
|
+
extraParams.metaNode.Attrs["deprecated_lid_session"] = *req.Meta.DeprecatedLIDSession
|
|
331
|
+
}
|
|
332
|
+
if req.Meta.ThreadMessageID != "" {
|
|
333
|
+
extraParams.metaNode.Attrs["thread_msg_id"] = req.Meta.ThreadMessageID
|
|
334
|
+
extraParams.metaNode.Attrs["thread_msg_sender_jid"] = req.Meta.ThreadMessageSenderJID
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
resp.Sender = ownID
|
|
339
|
+
|
|
273
340
|
start := time.Now()
|
|
274
341
|
// Sending multiple messages at a time can cause weird issues and makes it harder to retry safely
|
|
275
342
|
cli.messageSendLock.Lock()
|
|
@@ -283,7 +350,7 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
283
350
|
}
|
|
284
351
|
|
|
285
352
|
if message.GetMessageContextInfo().GetMessageSecret() != nil {
|
|
286
|
-
err = cli.Store.MsgSecrets.PutMessageSecret(to, ownID, req.ID, message.GetMessageContextInfo().GetMessageSecret())
|
|
353
|
+
err = cli.Store.MsgSecrets.PutMessageSecret(ctx, to, ownID, req.ID, message.GetMessageContextInfo().GetMessageSecret())
|
|
287
354
|
if err != nil {
|
|
288
355
|
cli.Log.Warnf("Failed to store message secret key for outgoing message %s: %v", req.ID, err)
|
|
289
356
|
} else {
|
|
@@ -294,12 +361,12 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
294
361
|
var data []byte
|
|
295
362
|
switch to.Server {
|
|
296
363
|
case types.GroupServer, types.BroadcastServer:
|
|
297
|
-
phash, data, err = cli.sendGroup(ctx, to,
|
|
298
|
-
case types.DefaultUserServer:
|
|
364
|
+
phash, data, err = cli.sendGroup(ctx, to, groupParticipants, req.ID, message, &resp.DebugTimings, extraParams)
|
|
365
|
+
case types.DefaultUserServer, types.BotServer:
|
|
299
366
|
if req.Peer {
|
|
300
|
-
data, err = cli.sendPeerMessage(to, req.ID, message, &resp.DebugTimings)
|
|
367
|
+
data, err = cli.sendPeerMessage(ctx, to, req.ID, message, &resp.DebugTimings)
|
|
301
368
|
} else {
|
|
302
|
-
data, err = cli.sendDM(ctx,
|
|
369
|
+
data, err = cli.sendDM(ctx, ownID, to, req.ID, message, &resp.DebugTimings, extraParams)
|
|
303
370
|
}
|
|
304
371
|
case types.NewsletterServer:
|
|
305
372
|
data, err = cli.sendNewsletter(to, req.ID, message, req.MediaHandle, &resp.DebugTimings)
|
|
@@ -348,9 +415,9 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
348
415
|
if len(expectedPHash) > 0 && phash != expectedPHash {
|
|
349
416
|
cli.Log.Warnf("Server returned different participant list hash when sending to %s. Some devices may not have received the message.", to)
|
|
350
417
|
// TODO also invalidate device list caches
|
|
351
|
-
cli.
|
|
352
|
-
delete(cli.
|
|
353
|
-
cli.
|
|
418
|
+
cli.groupCacheLock.Lock()
|
|
419
|
+
delete(cli.groupCache, to)
|
|
420
|
+
cli.groupCacheLock.Unlock()
|
|
354
421
|
}
|
|
355
422
|
return
|
|
356
423
|
}
|
|
@@ -373,9 +440,9 @@ func (cli *Client) BuildMessageKey(chat, sender types.JID, id types.MessageID) *
|
|
|
373
440
|
ID: proto.String(id),
|
|
374
441
|
RemoteJID: proto.String(chat.String()),
|
|
375
442
|
}
|
|
376
|
-
if !sender.IsEmpty() && sender.User != cli.getOwnID().User {
|
|
443
|
+
if !sender.IsEmpty() && sender.User != cli.getOwnID().User && sender.User != cli.getOwnLID().User {
|
|
377
444
|
key.FromMe = proto.Bool(false)
|
|
378
|
-
if chat.Server != types.DefaultUserServer && chat.Server != types.MessengerServer {
|
|
445
|
+
if chat.Server != types.DefaultUserServer && chat.Server != types.HiddenUserServer && chat.Server != types.MessengerServer {
|
|
379
446
|
key.Participant = proto.String(sender.ToNonAD().String())
|
|
380
447
|
}
|
|
381
448
|
}
|
|
@@ -561,7 +628,13 @@ func participantListHashV2(participants []types.JID) string {
|
|
|
561
628
|
return fmt.Sprintf("2:%s", base64.RawStdEncoding.EncodeToString(hash[:6]))
|
|
562
629
|
}
|
|
563
630
|
|
|
564
|
-
func (cli *Client) sendNewsletter(
|
|
631
|
+
func (cli *Client) sendNewsletter(
|
|
632
|
+
to types.JID,
|
|
633
|
+
id types.MessageID,
|
|
634
|
+
message *waE2E.Message,
|
|
635
|
+
mediaID string,
|
|
636
|
+
timings *MessageDebugTimings,
|
|
637
|
+
) ([]byte, error) {
|
|
565
638
|
attrs := waBinary.Attrs{
|
|
566
639
|
"to": to,
|
|
567
640
|
"id": id,
|
|
@@ -588,8 +661,10 @@ func (cli *Client) sendNewsletter(to types.JID, id types.MessageID, message *waE
|
|
|
588
661
|
Content: plaintext,
|
|
589
662
|
Attrs: waBinary.Attrs{},
|
|
590
663
|
}
|
|
591
|
-
if
|
|
592
|
-
|
|
664
|
+
if message != nil {
|
|
665
|
+
if mediaType := getMediaTypeFromMessage(message); mediaType != "" {
|
|
666
|
+
plaintextNode.Attrs["mediatype"] = mediaType
|
|
667
|
+
}
|
|
593
668
|
}
|
|
594
669
|
node := waBinary.Node{
|
|
595
670
|
Tag: "message",
|
|
@@ -605,24 +680,22 @@ func (cli *Client) sendNewsletter(to types.JID, id types.MessageID, message *waE
|
|
|
605
680
|
return data, nil
|
|
606
681
|
}
|
|
607
682
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
683
|
+
type nodeExtraParams struct {
|
|
684
|
+
botNode *waBinary.Node
|
|
685
|
+
metaNode *waBinary.Node
|
|
686
|
+
addressingMode types.AddressingMode
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
func (cli *Client) sendGroup(
|
|
690
|
+
ctx context.Context,
|
|
691
|
+
to types.JID,
|
|
692
|
+
participants []types.JID,
|
|
693
|
+
id types.MessageID,
|
|
694
|
+
message *waE2E.Message,
|
|
695
|
+
timings *MessageDebugTimings,
|
|
696
|
+
extraParams nodeExtraParams,
|
|
697
|
+
) (string, []byte, error) {
|
|
611
698
|
start := time.Now()
|
|
612
|
-
if to.Server == types.GroupServer {
|
|
613
|
-
participants, err = cli.getGroupMembers(ctx, to)
|
|
614
|
-
if err != nil {
|
|
615
|
-
return "", nil, fmt.Errorf("failed to get group members: %w", err)
|
|
616
|
-
}
|
|
617
|
-
} else {
|
|
618
|
-
// TODO use context
|
|
619
|
-
participants, err = cli.getBroadcastListParticipants(to)
|
|
620
|
-
if err != nil {
|
|
621
|
-
return "", nil, fmt.Errorf("failed to get broadcast list members: %w", err)
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
timings.GetParticipants = time.Since(start)
|
|
625
|
-
start = time.Now()
|
|
626
699
|
plaintext, _, err := marshalMessage(to, message)
|
|
627
700
|
timings.Marshal = time.Since(start)
|
|
628
701
|
if err != nil {
|
|
@@ -631,8 +704,8 @@ func (cli *Client) sendGroup(ctx context.Context, to, ownID types.JID, id types.
|
|
|
631
704
|
|
|
632
705
|
start = time.Now()
|
|
633
706
|
builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer)
|
|
634
|
-
senderKeyName := protocol.NewSenderKeyName(to.String(),
|
|
635
|
-
signalSKDMessage, err := builder.Create(senderKeyName)
|
|
707
|
+
senderKeyName := protocol.NewSenderKeyName(to.String(), cli.getOwnLID().SignalAddress())
|
|
708
|
+
signalSKDMessage, err := builder.Create(ctx, senderKeyName)
|
|
636
709
|
if err != nil {
|
|
637
710
|
return "", nil, fmt.Errorf("failed to create sender key distribution message to send %s to %s: %w", id, to, err)
|
|
638
711
|
}
|
|
@@ -648,14 +721,16 @@ func (cli *Client) sendGroup(ctx context.Context, to, ownID types.JID, id types.
|
|
|
648
721
|
}
|
|
649
722
|
|
|
650
723
|
cipher := groups.NewGroupCipher(builder, senderKeyName, cli.Store)
|
|
651
|
-
encrypted, err := cipher.Encrypt(padMessage(plaintext))
|
|
724
|
+
encrypted, err := cipher.Encrypt(ctx, padMessage(plaintext))
|
|
652
725
|
if err != nil {
|
|
653
726
|
return "", nil, fmt.Errorf("failed to encrypt group message to send %s to %s: %w", id, to, err)
|
|
654
727
|
}
|
|
655
728
|
ciphertext := encrypted.SignedSerialize()
|
|
656
729
|
timings.GroupEncrypt = time.Since(start)
|
|
657
730
|
|
|
658
|
-
node, allDevices, err := cli.prepareMessageNode(
|
|
731
|
+
node, allDevices, err := cli.prepareMessageNode(
|
|
732
|
+
ctx, to, id, message, participants, skdPlaintext, nil, timings, extraParams,
|
|
733
|
+
)
|
|
659
734
|
if err != nil {
|
|
660
735
|
return "", nil, err
|
|
661
736
|
}
|
|
@@ -681,8 +756,14 @@ func (cli *Client) sendGroup(ctx context.Context, to, ownID types.JID, id types.
|
|
|
681
756
|
return phash, data, nil
|
|
682
757
|
}
|
|
683
758
|
|
|
684
|
-
func (cli *Client) sendPeerMessage(
|
|
685
|
-
|
|
759
|
+
func (cli *Client) sendPeerMessage(
|
|
760
|
+
ctx context.Context,
|
|
761
|
+
to types.JID,
|
|
762
|
+
id types.MessageID,
|
|
763
|
+
message *waE2E.Message,
|
|
764
|
+
timings *MessageDebugTimings,
|
|
765
|
+
) ([]byte, error) {
|
|
766
|
+
node, err := cli.preparePeerMessageNode(ctx, to, id, message, timings)
|
|
686
767
|
if err != nil {
|
|
687
768
|
return nil, err
|
|
688
769
|
}
|
|
@@ -695,7 +776,15 @@ func (cli *Client) sendPeerMessage(to types.JID, id types.MessageID, message *wa
|
|
|
695
776
|
return data, nil
|
|
696
777
|
}
|
|
697
778
|
|
|
698
|
-
func (cli *Client) sendDM(
|
|
779
|
+
func (cli *Client) sendDM(
|
|
780
|
+
ctx context.Context,
|
|
781
|
+
ownID,
|
|
782
|
+
to types.JID,
|
|
783
|
+
id types.MessageID,
|
|
784
|
+
message *waE2E.Message,
|
|
785
|
+
timings *MessageDebugTimings,
|
|
786
|
+
extraParams nodeExtraParams,
|
|
787
|
+
) ([]byte, error) {
|
|
699
788
|
start := time.Now()
|
|
700
789
|
messagePlaintext, deviceSentMessagePlaintext, err := marshalMessage(to, message)
|
|
701
790
|
timings.Marshal = time.Since(start)
|
|
@@ -703,7 +792,10 @@ func (cli *Client) sendDM(ctx context.Context, to, ownID types.JID, id types.Mes
|
|
|
703
792
|
return nil, err
|
|
704
793
|
}
|
|
705
794
|
|
|
706
|
-
node, _, err := cli.prepareMessageNode(
|
|
795
|
+
node, _, err := cli.prepareMessageNode(
|
|
796
|
+
ctx, to, id, message, []types.JID{to, ownID.ToNonAD()},
|
|
797
|
+
messagePlaintext, deviceSentMessagePlaintext, timings, extraParams,
|
|
798
|
+
)
|
|
707
799
|
if err != nil {
|
|
708
800
|
return nil, err
|
|
709
801
|
}
|
|
@@ -730,7 +822,7 @@ func getTypeFromMessage(msg *waE2E.Message) string {
|
|
|
730
822
|
return getTypeFromMessage(msg.EphemeralMessage.Message)
|
|
731
823
|
case msg.DocumentWithCaptionMessage != nil:
|
|
732
824
|
return getTypeFromMessage(msg.DocumentWithCaptionMessage.Message)
|
|
733
|
-
case msg.ReactionMessage != nil:
|
|
825
|
+
case msg.ReactionMessage != nil, msg.EncReactionMessage != nil:
|
|
734
826
|
return "reaction"
|
|
735
827
|
case msg.PollCreationMessage != nil, msg.PollUpdateMessage != nil:
|
|
736
828
|
return "poll"
|
|
@@ -868,7 +960,13 @@ func getEditAttribute(msg *waE2E.Message) types.EditAttribute {
|
|
|
868
960
|
return types.EditAttributeEmpty
|
|
869
961
|
}
|
|
870
962
|
|
|
871
|
-
func (cli *Client) preparePeerMessageNode(
|
|
963
|
+
func (cli *Client) preparePeerMessageNode(
|
|
964
|
+
ctx context.Context,
|
|
965
|
+
to types.JID,
|
|
966
|
+
id types.MessageID,
|
|
967
|
+
message *waE2E.Message,
|
|
968
|
+
timings *MessageDebugTimings,
|
|
969
|
+
) (*waBinary.Node, error) {
|
|
872
970
|
attrs := waBinary.Attrs{
|
|
873
971
|
"id": id,
|
|
874
972
|
"type": "text",
|
|
@@ -886,7 +984,7 @@ func (cli *Client) preparePeerMessageNode(to types.JID, id types.MessageID, mess
|
|
|
886
984
|
return nil, err
|
|
887
985
|
}
|
|
888
986
|
start = time.Now()
|
|
889
|
-
encrypted, isPreKey, err := cli.encryptMessageForDevice(plaintext, to, nil, nil)
|
|
987
|
+
encrypted, isPreKey, err := cli.encryptMessageForDevice(ctx, plaintext, to, nil, nil)
|
|
890
988
|
timings.PeerEncrypt = time.Since(start)
|
|
891
989
|
if err != nil {
|
|
892
990
|
return nil, fmt.Errorf("failed to encrypt peer message for %s: %v", to, err)
|
|
@@ -902,7 +1000,13 @@ func (cli *Client) preparePeerMessageNode(to types.JID, id types.MessageID, mess
|
|
|
902
1000
|
}, nil
|
|
903
1001
|
}
|
|
904
1002
|
|
|
905
|
-
func (cli *Client) getMessageContent(
|
|
1003
|
+
func (cli *Client) getMessageContent(
|
|
1004
|
+
baseNode waBinary.Node,
|
|
1005
|
+
message *waE2E.Message,
|
|
1006
|
+
msgAttrs waBinary.Attrs,
|
|
1007
|
+
includeIdentity bool,
|
|
1008
|
+
extraParams nodeExtraParams,
|
|
1009
|
+
) []waBinary.Node {
|
|
906
1010
|
content := []waBinary.Node{baseNode}
|
|
907
1011
|
if includeIdentity {
|
|
908
1012
|
content = append(content, cli.makeDeviceIdentityNode())
|
|
@@ -920,8 +1024,11 @@ func (cli *Client) getMessageContent(baseNode waBinary.Node, message *waE2E.Mess
|
|
|
920
1024
|
})
|
|
921
1025
|
}
|
|
922
1026
|
|
|
923
|
-
if botNode != nil {
|
|
924
|
-
content = append(content, *botNode)
|
|
1027
|
+
if extraParams.botNode != nil {
|
|
1028
|
+
content = append(content, *extraParams.botNode)
|
|
1029
|
+
}
|
|
1030
|
+
if extraParams.metaNode != nil {
|
|
1031
|
+
content = append(content, *extraParams.metaNode)
|
|
925
1032
|
}
|
|
926
1033
|
|
|
927
1034
|
if buttonType := getButtonTypeFromMessage(message); buttonType != "" {
|
|
@@ -936,7 +1043,16 @@ func (cli *Client) getMessageContent(baseNode waBinary.Node, message *waE2E.Mess
|
|
|
936
1043
|
return content
|
|
937
1044
|
}
|
|
938
1045
|
|
|
939
|
-
func (cli *Client) prepareMessageNode(
|
|
1046
|
+
func (cli *Client) prepareMessageNode(
|
|
1047
|
+
ctx context.Context,
|
|
1048
|
+
to types.JID,
|
|
1049
|
+
id types.MessageID,
|
|
1050
|
+
message *waE2E.Message,
|
|
1051
|
+
participants []types.JID,
|
|
1052
|
+
plaintext, dsmPlaintext []byte,
|
|
1053
|
+
timings *MessageDebugTimings,
|
|
1054
|
+
extraParams nodeExtraParams,
|
|
1055
|
+
) (*waBinary.Node, []types.JID, error) {
|
|
940
1056
|
start := time.Now()
|
|
941
1057
|
allDevices, err := cli.GetUserDevicesContext(ctx, participants)
|
|
942
1058
|
timings.GetDevices = time.Since(start)
|
|
@@ -955,6 +1071,10 @@ func (cli *Client) prepareMessageNode(ctx context.Context, to, ownID types.JID,
|
|
|
955
1071
|
"type": msgType,
|
|
956
1072
|
"to": to,
|
|
957
1073
|
}
|
|
1074
|
+
// TODO this is a very hacky hack for announcement group messages, why is it pn anyway?
|
|
1075
|
+
if extraParams.addressingMode != "" {
|
|
1076
|
+
attrs["addressing_mode"] = string(extraParams.addressingMode)
|
|
1077
|
+
}
|
|
958
1078
|
if editAttr := getEditAttribute(message); editAttr != "" {
|
|
959
1079
|
attrs["edit"] = string(editAttr)
|
|
960
1080
|
encAttrs["decrypt-fail"] = string(events.DecryptFailHide)
|
|
@@ -964,16 +1084,20 @@ func (cli *Client) prepareMessageNode(ctx context.Context, to, ownID types.JID,
|
|
|
964
1084
|
}
|
|
965
1085
|
|
|
966
1086
|
start = time.Now()
|
|
967
|
-
participantNodes, includeIdentity := cli.encryptMessageForDevices(
|
|
1087
|
+
participantNodes, includeIdentity := cli.encryptMessageForDevices(
|
|
1088
|
+
ctx, allDevices, id, plaintext, dsmPlaintext, encAttrs,
|
|
1089
|
+
)
|
|
968
1090
|
timings.PeerEncrypt = time.Since(start)
|
|
969
1091
|
participantNode := waBinary.Node{
|
|
970
1092
|
Tag: "participants",
|
|
971
1093
|
Content: participantNodes,
|
|
972
1094
|
}
|
|
973
1095
|
return &waBinary.Node{
|
|
974
|
-
Tag:
|
|
975
|
-
Attrs:
|
|
976
|
-
Content: cli.getMessageContent(
|
|
1096
|
+
Tag: "message",
|
|
1097
|
+
Attrs: attrs,
|
|
1098
|
+
Content: cli.getMessageContent(
|
|
1099
|
+
participantNode, message, attrs, includeIdentity, extraParams,
|
|
1100
|
+
),
|
|
977
1101
|
}, allDevices, nil
|
|
978
1102
|
}
|
|
979
1103
|
|
|
@@ -993,6 +1117,7 @@ func marshalMessage(to types.JID, message *waE2E.Message) (plaintext, dsmPlainte
|
|
|
993
1117
|
DestinationJID: proto.String(to.String()),
|
|
994
1118
|
Message: message,
|
|
995
1119
|
},
|
|
1120
|
+
MessageContextInfo: message.MessageContextInfo,
|
|
996
1121
|
})
|
|
997
1122
|
if err != nil {
|
|
998
1123
|
err = fmt.Errorf("failed to marshal message (for own devices): %w", err)
|
|
@@ -1014,23 +1139,46 @@ func (cli *Client) makeDeviceIdentityNode() waBinary.Node {
|
|
|
1014
1139
|
}
|
|
1015
1140
|
}
|
|
1016
1141
|
|
|
1017
|
-
func (cli *Client) encryptMessageForDevices(
|
|
1142
|
+
func (cli *Client) encryptMessageForDevices(
|
|
1143
|
+
ctx context.Context,
|
|
1144
|
+
allDevices []types.JID,
|
|
1145
|
+
id string,
|
|
1146
|
+
msgPlaintext, dsmPlaintext []byte,
|
|
1147
|
+
encAttrs waBinary.Attrs,
|
|
1148
|
+
) ([]waBinary.Node, bool) {
|
|
1149
|
+
ownJID := cli.getOwnID()
|
|
1150
|
+
ownLID := cli.getOwnLID()
|
|
1018
1151
|
includeIdentity := false
|
|
1019
1152
|
participantNodes := make([]waBinary.Node, 0, len(allDevices))
|
|
1020
|
-
var retryDevices []types.JID
|
|
1153
|
+
var retryDevices, retryEncryptionIdentities []types.JID
|
|
1021
1154
|
for _, jid := range allDevices {
|
|
1022
1155
|
plaintext := msgPlaintext
|
|
1023
|
-
if jid.User ==
|
|
1024
|
-
if jid ==
|
|
1156
|
+
if (jid.User == ownJID.User || jid.User == ownLID.User) && dsmPlaintext != nil {
|
|
1157
|
+
if jid == ownJID {
|
|
1025
1158
|
continue
|
|
1026
1159
|
}
|
|
1027
1160
|
plaintext = dsmPlaintext
|
|
1028
1161
|
}
|
|
1029
|
-
|
|
1162
|
+
encryptionIdentity := jid
|
|
1163
|
+
if jid.Server == types.DefaultUserServer {
|
|
1164
|
+
lidForPN, err := cli.Store.LIDs.GetLIDForPN(ctx, jid)
|
|
1165
|
+
if err != nil {
|
|
1166
|
+
cli.Log.Warnf("Failed to get LID for %s: %v", jid, err)
|
|
1167
|
+
} else if !lidForPN.IsEmpty() {
|
|
1168
|
+
cli.migrateSessionStore(ctx, jid, lidForPN)
|
|
1169
|
+
encryptionIdentity = lidForPN
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
encrypted, isPreKey, err := cli.encryptMessageForDeviceAndWrap(
|
|
1174
|
+
ctx, plaintext, jid, encryptionIdentity, nil, encAttrs,
|
|
1175
|
+
)
|
|
1030
1176
|
if errors.Is(err, ErrNoSession) {
|
|
1031
1177
|
retryDevices = append(retryDevices, jid)
|
|
1178
|
+
retryEncryptionIdentities = append(retryEncryptionIdentities, encryptionIdentity)
|
|
1032
1179
|
continue
|
|
1033
1180
|
} else if err != nil {
|
|
1181
|
+
// TODO return these errors if it's a fatal one (like context cancellation or database)
|
|
1034
1182
|
cli.Log.Warnf("Failed to encrypt %s for %s: %v", id, jid, err)
|
|
1035
1183
|
continue
|
|
1036
1184
|
}
|
|
@@ -1045,18 +1193,21 @@ func (cli *Client) encryptMessageForDevices(ctx context.Context, allDevices []ty
|
|
|
1045
1193
|
if err != nil {
|
|
1046
1194
|
cli.Log.Warnf("Failed to fetch prekeys for %v to retry encryption: %v", retryDevices, err)
|
|
1047
1195
|
} else {
|
|
1048
|
-
for
|
|
1196
|
+
for i, jid := range retryDevices {
|
|
1049
1197
|
resp := bundles[jid]
|
|
1050
1198
|
if resp.err != nil {
|
|
1051
1199
|
cli.Log.Warnf("Failed to fetch prekey for %s: %v", jid, resp.err)
|
|
1052
1200
|
continue
|
|
1053
1201
|
}
|
|
1054
1202
|
plaintext := msgPlaintext
|
|
1055
|
-
if jid.User ==
|
|
1203
|
+
if (jid.User == ownJID.User || jid.User == ownLID.User) && dsmPlaintext != nil {
|
|
1056
1204
|
plaintext = dsmPlaintext
|
|
1057
1205
|
}
|
|
1058
|
-
encrypted, isPreKey, err := cli.encryptMessageForDeviceAndWrap(
|
|
1206
|
+
encrypted, isPreKey, err := cli.encryptMessageForDeviceAndWrap(
|
|
1207
|
+
ctx, plaintext, jid, retryEncryptionIdentities[i], resp.bundle, encAttrs,
|
|
1208
|
+
)
|
|
1059
1209
|
if err != nil {
|
|
1210
|
+
// TODO return these errors if it's a fatal one (like context cancellation or database)
|
|
1060
1211
|
cli.Log.Warnf("Failed to encrypt %s for %s (retry): %v", id, jid, err)
|
|
1061
1212
|
continue
|
|
1062
1213
|
}
|
|
@@ -1070,14 +1221,23 @@ func (cli *Client) encryptMessageForDevices(ctx context.Context, allDevices []ty
|
|
|
1070
1221
|
return participantNodes, includeIdentity
|
|
1071
1222
|
}
|
|
1072
1223
|
|
|
1073
|
-
func (cli *Client) encryptMessageForDeviceAndWrap(
|
|
1074
|
-
|
|
1224
|
+
func (cli *Client) encryptMessageForDeviceAndWrap(
|
|
1225
|
+
ctx context.Context,
|
|
1226
|
+
plaintext []byte,
|
|
1227
|
+
wireIdentity,
|
|
1228
|
+
encryptionIdentity types.JID,
|
|
1229
|
+
bundle *prekey.Bundle,
|
|
1230
|
+
encAttrs waBinary.Attrs,
|
|
1231
|
+
) (*waBinary.Node, bool, error) {
|
|
1232
|
+
node, includeDeviceIdentity, err := cli.encryptMessageForDevice(
|
|
1233
|
+
ctx, plaintext, encryptionIdentity, bundle, encAttrs,
|
|
1234
|
+
)
|
|
1075
1235
|
if err != nil {
|
|
1076
1236
|
return nil, false, err
|
|
1077
1237
|
}
|
|
1078
1238
|
return &waBinary.Node{
|
|
1079
1239
|
Tag: "to",
|
|
1080
|
-
Attrs: waBinary.Attrs{"jid":
|
|
1240
|
+
Attrs: waBinary.Attrs{"jid": wireIdentity},
|
|
1081
1241
|
Content: []waBinary.Node{*node},
|
|
1082
1242
|
}, includeDeviceIdentity, nil
|
|
1083
1243
|
}
|
|
@@ -1088,24 +1248,35 @@ func copyAttrs(from, to waBinary.Attrs) {
|
|
|
1088
1248
|
}
|
|
1089
1249
|
}
|
|
1090
1250
|
|
|
1091
|
-
func (cli *Client) encryptMessageForDevice(
|
|
1251
|
+
func (cli *Client) encryptMessageForDevice(
|
|
1252
|
+
ctx context.Context,
|
|
1253
|
+
plaintext []byte,
|
|
1254
|
+
to types.JID,
|
|
1255
|
+
bundle *prekey.Bundle,
|
|
1256
|
+
extraAttrs waBinary.Attrs,
|
|
1257
|
+
) (*waBinary.Node, bool, error) {
|
|
1092
1258
|
builder := session.NewBuilderFromSignal(cli.Store, to.SignalAddress(), pbSerializer)
|
|
1093
1259
|
if bundle != nil {
|
|
1094
1260
|
cli.Log.Debugf("Processing prekey bundle for %s", to)
|
|
1095
|
-
err := builder.ProcessBundle(bundle)
|
|
1261
|
+
err := builder.ProcessBundle(ctx, bundle)
|
|
1096
1262
|
if cli.AutoTrustIdentity && errors.Is(err, signalerror.ErrUntrustedIdentity) {
|
|
1097
1263
|
cli.Log.Warnf("Got %v error while trying to process prekey bundle for %s, clearing stored identity and retrying", err, to)
|
|
1098
|
-
cli.clearUntrustedIdentity(to)
|
|
1099
|
-
err
|
|
1264
|
+
err = cli.clearUntrustedIdentity(ctx, to)
|
|
1265
|
+
if err != nil {
|
|
1266
|
+
return nil, false, fmt.Errorf("failed to clear untrusted identity: %w", err)
|
|
1267
|
+
}
|
|
1268
|
+
err = builder.ProcessBundle(ctx, bundle)
|
|
1100
1269
|
}
|
|
1101
1270
|
if err != nil {
|
|
1102
1271
|
return nil, false, fmt.Errorf("failed to process prekey bundle: %w", err)
|
|
1103
1272
|
}
|
|
1104
|
-
} else if
|
|
1273
|
+
} else if contains, err := cli.Store.ContainsSession(ctx, to.SignalAddress()); err != nil {
|
|
1274
|
+
return nil, false, err
|
|
1275
|
+
} else if !contains {
|
|
1105
1276
|
return nil, false, ErrNoSession
|
|
1106
1277
|
}
|
|
1107
1278
|
cipher := session.NewCipher(builder, to.SignalAddress())
|
|
1108
|
-
ciphertext, err := cipher.Encrypt(padMessage(plaintext))
|
|
1279
|
+
ciphertext, err := cipher.Encrypt(ctx, padMessage(plaintext))
|
|
1109
1280
|
if err != nil {
|
|
1110
1281
|
return nil, false, fmt.Errorf("cipher encryption failed: %w", err)
|
|
1111
1282
|
}
|