slidge-whatsapp 0.2.7__cp312-cp312-manylinux_2_36_aarch64.whl → 0.3.0b0__cp312-cp312-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.
- slidge_whatsapp/contact.py +13 -3
- slidge_whatsapp/event.go +107 -37
- slidge_whatsapp/gateway.go +7 -63
- slidge_whatsapp/gateway.py +2 -3
- slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.h +186 -169
- slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +148 -134
- slidge_whatsapp/generated/whatsapp.c +1652 -1380
- slidge_whatsapp/generated/whatsapp.go +798 -687
- slidge_whatsapp/generated/whatsapp.py +1169 -1044
- slidge_whatsapp/generated/whatsapp_go.h +186 -169
- slidge_whatsapp/go.mod +18 -15
- slidge_whatsapp/go.sum +38 -26
- slidge_whatsapp/group.py +34 -30
- slidge_whatsapp/media/media.go +1 -1
- slidge_whatsapp/session.go +33 -16
- 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/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 +30 -0
- 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 +51 -13
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
- 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/runtime_go1.23.go +2 -2
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -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/util/exhttp/handleerrors.go +60 -26
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +28 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
- 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 +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +15 -18
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +97 -25
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +22 -10
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +10 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +5 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
- 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/waCompanionReg/WACompanionReg.pb.go +30 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8532 -11526
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +132 -438
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +225 -73
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +21 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +884 -441
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +40 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +8 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +3 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +12 -8
- slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
- slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
- slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
- 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 +1 -55
- 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_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/types_windows.go +6 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
- 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 +10 -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 +68 -22
- 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/version/version.go +1 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
- slidge_whatsapp/vendor/modules.txt +43 -23
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/METADATA +2 -2
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/RECORD +208 -161
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
- slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/LICENSE +0 -0
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/WHEEL +0 -0
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/entry_points.txt +0 -0
|
@@ -56,6 +56,16 @@ message CallLogRecord {
|
|
|
56
56
|
optional CallType callType = 15;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
message MaibaAIFeaturesControlAction {
|
|
60
|
+
enum MaibaAIFeatureStatus {
|
|
61
|
+
ENABLED = 0;
|
|
62
|
+
ENABLED_HAS_LEARNING = 1;
|
|
63
|
+
DISABLED = 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
optional MaibaAIFeatureStatus aiFeatureStatus = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
59
69
|
message PaymentTosAction {
|
|
60
70
|
enum PaymentNotice {
|
|
61
71
|
BR_PAY_PRIVACY_POLICY = 0;
|
|
@@ -256,6 +266,26 @@ message SyncActionValue {
|
|
|
256
266
|
optional PaymentTosAction paymentTosAction = 63;
|
|
257
267
|
optional PrivacySettingChannelsPersonalisedRecommendationAction privacySettingChannelsPersonalisedRecommendationAction = 64;
|
|
258
268
|
optional BusinessBroadcastAssociationAction businessBroadcastAssociationAction = 65;
|
|
269
|
+
optional DetectedOutcomesStatusAction detectedOutcomesStatusAction = 66;
|
|
270
|
+
optional MaibaAIFeaturesControlAction maibaAiFeaturesControlAction = 68;
|
|
271
|
+
optional BusinessBroadcastListAction businessBroadcastListAction = 69;
|
|
272
|
+
optional MusicUserIdAction musicUserIDAction = 70;
|
|
273
|
+
optional StatusPostOptInNotificationPreferencesAction statusPostOptInNotificationPreferencesAction = 71;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
message StatusPostOptInNotificationPreferencesAction {
|
|
277
|
+
optional bool enabled = 1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
message BroadcastListParticipant {
|
|
281
|
+
required string lidJID = 1;
|
|
282
|
+
optional string pnJID = 2;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
message BusinessBroadcastListAction {
|
|
286
|
+
optional bool deleted = 1;
|
|
287
|
+
repeated BroadcastListParticipant participants = 2;
|
|
288
|
+
optional string listName = 3;
|
|
259
289
|
}
|
|
260
290
|
|
|
261
291
|
message BusinessBroadcastAssociationAction {
|
|
@@ -330,6 +360,10 @@ message BotWelcomeRequestAction {
|
|
|
330
360
|
optional bool isSent = 1;
|
|
331
361
|
}
|
|
332
362
|
|
|
363
|
+
message MusicUserIdAction {
|
|
364
|
+
optional string musicUserID = 1;
|
|
365
|
+
}
|
|
366
|
+
|
|
333
367
|
message CallLogAction {
|
|
334
368
|
optional CallLogRecord callLogRecord = 1;
|
|
335
369
|
}
|
|
@@ -338,6 +372,10 @@ message PrivacySettingRelayAllCalls {
|
|
|
338
372
|
optional bool isEnabled = 1;
|
|
339
373
|
}
|
|
340
374
|
|
|
375
|
+
message DetectedOutcomesStatusAction {
|
|
376
|
+
optional bool isEnabled = 1;
|
|
377
|
+
}
|
|
378
|
+
|
|
341
379
|
message ExternalWebBetaAction {
|
|
342
380
|
optional bool isOptIn = 1;
|
|
343
381
|
}
|
|
@@ -370,6 +408,8 @@ message StickerAction {
|
|
|
370
408
|
optional bool isFavorite = 9;
|
|
371
409
|
optional uint32 deviceIDHint = 10;
|
|
372
410
|
optional bool isLottie = 11;
|
|
411
|
+
optional string imageHash = 12;
|
|
412
|
+
optional bool isAvatarSticker = 13;
|
|
373
413
|
}
|
|
374
414
|
|
|
375
415
|
message RemoveRecentStickerAction {
|
|
@@ -726,6 +726,7 @@ const (
|
|
|
726
726
|
ClientPayload_UserAgent_IPAD ClientPayload_UserAgent_Platform = 33
|
|
727
727
|
ClientPayload_UserAgent_TEST ClientPayload_UserAgent_Platform = 34
|
|
728
728
|
ClientPayload_UserAgent_SMART_GLASSES ClientPayload_UserAgent_Platform = 35
|
|
729
|
+
ClientPayload_UserAgent_BLUE_VR ClientPayload_UserAgent_Platform = 36
|
|
729
730
|
)
|
|
730
731
|
|
|
731
732
|
// Enum value maps for ClientPayload_UserAgent_Platform.
|
|
@@ -767,6 +768,7 @@ var (
|
|
|
767
768
|
33: "IPAD",
|
|
768
769
|
34: "TEST",
|
|
769
770
|
35: "SMART_GLASSES",
|
|
771
|
+
36: "BLUE_VR",
|
|
770
772
|
}
|
|
771
773
|
ClientPayload_UserAgent_Platform_value = map[string]int32{
|
|
772
774
|
"ANDROID": 0,
|
|
@@ -805,6 +807,7 @@ var (
|
|
|
805
807
|
"IPAD": 33,
|
|
806
808
|
"TEST": 34,
|
|
807
809
|
"SMART_GLASSES": 35,
|
|
810
|
+
"BLUE_VR": 36,
|
|
808
811
|
}
|
|
809
812
|
)
|
|
810
813
|
|
|
@@ -846,39 +849,41 @@ func (ClientPayload_UserAgent_Platform) EnumDescriptor() ([]byte, []int) {
|
|
|
846
849
|
}
|
|
847
850
|
|
|
848
851
|
type ClientPayload struct {
|
|
849
|
-
state
|
|
850
|
-
Username
|
|
851
|
-
Passive
|
|
852
|
-
UserAgent
|
|
853
|
-
WebInfo
|
|
854
|
-
PushName
|
|
855
|
-
SessionID
|
|
856
|
-
ShortConnect
|
|
857
|
-
ConnectType
|
|
858
|
-
ConnectReason
|
|
859
|
-
Shards
|
|
860
|
-
DnsSource
|
|
861
|
-
ConnectAttemptCount
|
|
862
|
-
Device
|
|
863
|
-
DevicePairingData
|
|
864
|
-
Product
|
|
865
|
-
FbCat
|
|
866
|
-
FbUserAgent
|
|
867
|
-
Oc
|
|
868
|
-
Lc
|
|
869
|
-
IosAppExtension
|
|
870
|
-
FbAppID
|
|
871
|
-
FbDeviceID
|
|
872
|
-
Pull
|
|
873
|
-
PaddingBytes
|
|
874
|
-
YearClass
|
|
875
|
-
MemClass
|
|
876
|
-
InteropData
|
|
877
|
-
TrafficAnonymization
|
|
878
|
-
LidDbMigrated
|
|
879
|
-
AccountType
|
|
880
|
-
|
|
881
|
-
|
|
852
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
853
|
+
Username *uint64 `protobuf:"varint,1,opt,name=username" json:"username,omitempty"`
|
|
854
|
+
Passive *bool `protobuf:"varint,3,opt,name=passive" json:"passive,omitempty"`
|
|
855
|
+
UserAgent *ClientPayload_UserAgent `protobuf:"bytes,5,opt,name=userAgent" json:"userAgent,omitempty"`
|
|
856
|
+
WebInfo *ClientPayload_WebInfo `protobuf:"bytes,6,opt,name=webInfo" json:"webInfo,omitempty"`
|
|
857
|
+
PushName *string `protobuf:"bytes,7,opt,name=pushName" json:"pushName,omitempty"`
|
|
858
|
+
SessionID *int32 `protobuf:"fixed32,9,opt,name=sessionID" json:"sessionID,omitempty"`
|
|
859
|
+
ShortConnect *bool `protobuf:"varint,10,opt,name=shortConnect" json:"shortConnect,omitempty"`
|
|
860
|
+
ConnectType *ClientPayload_ConnectType `protobuf:"varint,12,opt,name=connectType,enum=WAWebProtobufsWa6.ClientPayload_ConnectType" json:"connectType,omitempty"`
|
|
861
|
+
ConnectReason *ClientPayload_ConnectReason `protobuf:"varint,13,opt,name=connectReason,enum=WAWebProtobufsWa6.ClientPayload_ConnectReason" json:"connectReason,omitempty"`
|
|
862
|
+
Shards []int32 `protobuf:"varint,14,rep,name=shards" json:"shards,omitempty"`
|
|
863
|
+
DnsSource *ClientPayload_DNSSource `protobuf:"bytes,15,opt,name=dnsSource" json:"dnsSource,omitempty"`
|
|
864
|
+
ConnectAttemptCount *uint32 `protobuf:"varint,16,opt,name=connectAttemptCount" json:"connectAttemptCount,omitempty"`
|
|
865
|
+
Device *uint32 `protobuf:"varint,18,opt,name=device" json:"device,omitempty"`
|
|
866
|
+
DevicePairingData *ClientPayload_DevicePairingRegistrationData `protobuf:"bytes,19,opt,name=devicePairingData" json:"devicePairingData,omitempty"`
|
|
867
|
+
Product *ClientPayload_Product `protobuf:"varint,20,opt,name=product,enum=WAWebProtobufsWa6.ClientPayload_Product" json:"product,omitempty"`
|
|
868
|
+
FbCat []byte `protobuf:"bytes,21,opt,name=fbCat" json:"fbCat,omitempty"`
|
|
869
|
+
FbUserAgent []byte `protobuf:"bytes,22,opt,name=fbUserAgent" json:"fbUserAgent,omitempty"`
|
|
870
|
+
Oc *bool `protobuf:"varint,23,opt,name=oc" json:"oc,omitempty"`
|
|
871
|
+
Lc *int32 `protobuf:"varint,24,opt,name=lc" json:"lc,omitempty"`
|
|
872
|
+
IosAppExtension *ClientPayload_IOSAppExtension `protobuf:"varint,30,opt,name=iosAppExtension,enum=WAWebProtobufsWa6.ClientPayload_IOSAppExtension" json:"iosAppExtension,omitempty"`
|
|
873
|
+
FbAppID *uint64 `protobuf:"varint,31,opt,name=fbAppID" json:"fbAppID,omitempty"`
|
|
874
|
+
FbDeviceID []byte `protobuf:"bytes,32,opt,name=fbDeviceID" json:"fbDeviceID,omitempty"`
|
|
875
|
+
Pull *bool `protobuf:"varint,33,opt,name=pull" json:"pull,omitempty"`
|
|
876
|
+
PaddingBytes []byte `protobuf:"bytes,34,opt,name=paddingBytes" json:"paddingBytes,omitempty"`
|
|
877
|
+
YearClass *int32 `protobuf:"varint,36,opt,name=yearClass" json:"yearClass,omitempty"`
|
|
878
|
+
MemClass *int32 `protobuf:"varint,37,opt,name=memClass" json:"memClass,omitempty"`
|
|
879
|
+
InteropData *ClientPayload_InteropData `protobuf:"bytes,38,opt,name=interopData" json:"interopData,omitempty"`
|
|
880
|
+
TrafficAnonymization *ClientPayload_TrafficAnonymization `protobuf:"varint,40,opt,name=trafficAnonymization,enum=WAWebProtobufsWa6.ClientPayload_TrafficAnonymization" json:"trafficAnonymization,omitempty"`
|
|
881
|
+
LidDbMigrated *bool `protobuf:"varint,41,opt,name=lidDbMigrated" json:"lidDbMigrated,omitempty"`
|
|
882
|
+
AccountType *ClientPayload_AccountType `protobuf:"varint,42,opt,name=accountType,enum=WAWebProtobufsWa6.ClientPayload_AccountType" json:"accountType,omitempty"`
|
|
883
|
+
ConnectionSequenceInfo *int32 `protobuf:"fixed32,43,opt,name=connectionSequenceInfo" json:"connectionSequenceInfo,omitempty"`
|
|
884
|
+
PaaLink *bool `protobuf:"varint,44,opt,name=paaLink" json:"paaLink,omitempty"`
|
|
885
|
+
unknownFields protoimpl.UnknownFields
|
|
886
|
+
sizeCache protoimpl.SizeCache
|
|
882
887
|
}
|
|
883
888
|
|
|
884
889
|
func (x *ClientPayload) Reset() {
|
|
@@ -1121,6 +1126,20 @@ func (x *ClientPayload) GetAccountType() ClientPayload_AccountType {
|
|
|
1121
1126
|
return ClientPayload_DEFAULT
|
|
1122
1127
|
}
|
|
1123
1128
|
|
|
1129
|
+
func (x *ClientPayload) GetConnectionSequenceInfo() int32 {
|
|
1130
|
+
if x != nil && x.ConnectionSequenceInfo != nil {
|
|
1131
|
+
return *x.ConnectionSequenceInfo
|
|
1132
|
+
}
|
|
1133
|
+
return 0
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
func (x *ClientPayload) GetPaaLink() bool {
|
|
1137
|
+
if x != nil && x.PaaLink != nil {
|
|
1138
|
+
return *x.PaaLink
|
|
1139
|
+
}
|
|
1140
|
+
return false
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1124
1143
|
type HandshakeMessage struct {
|
|
1125
1144
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
1126
1145
|
ClientHello *HandshakeMessage_ClientHello `protobuf:"bytes,2,opt,name=clientHello" json:"clientHello,omitempty"`
|
|
@@ -2001,7 +2020,7 @@ var File_waWa6_WAWebProtobufsWa6_proto protoreflect.FileDescriptor
|
|
|
2001
2020
|
|
|
2002
2021
|
const file_waWa6_WAWebProtobufsWa6_proto_rawDesc = "" +
|
|
2003
2022
|
"\n" +
|
|
2004
|
-
"\x1dwaWa6/WAWebProtobufsWa6.proto\x12\x11WAWebProtobufsWa6\"\
|
|
2023
|
+
"\x1dwaWa6/WAWebProtobufsWa6.proto\x12\x11WAWebProtobufsWa6\"\x82*\n" +
|
|
2005
2024
|
"\rClientPayload\x12\x1a\n" +
|
|
2006
2025
|
"\busername\x18\x01 \x01(\x04R\busername\x12\x18\n" +
|
|
2007
2026
|
"\apassive\x18\x03 \x01(\bR\apassive\x12H\n" +
|
|
@@ -2035,7 +2054,9 @@ const file_waWa6_WAWebProtobufsWa6_proto_rawDesc = "" +
|
|
|
2035
2054
|
"\vinteropData\x18& \x01(\v2,.WAWebProtobufsWa6.ClientPayload.InteropDataR\vinteropData\x12i\n" +
|
|
2036
2055
|
"\x14trafficAnonymization\x18( \x01(\x0e25.WAWebProtobufsWa6.ClientPayload.TrafficAnonymizationR\x14trafficAnonymization\x12$\n" +
|
|
2037
2056
|
"\rlidDbMigrated\x18) \x01(\bR\rlidDbMigrated\x12N\n" +
|
|
2038
|
-
"\vaccountType\x18* \x01(\x0e2,.WAWebProtobufsWa6.ClientPayload.AccountTypeR\vaccountType\
|
|
2057
|
+
"\vaccountType\x18* \x01(\x0e2,.WAWebProtobufsWa6.ClientPayload.AccountTypeR\vaccountType\x126\n" +
|
|
2058
|
+
"\x16connectionSequenceInfo\x18+ \x01(\x0fR\x16connectionSequenceInfo\x12\x18\n" +
|
|
2059
|
+
"\apaaLink\x18, \x01(\bR\apaaLink\x1a\xea\x01\n" +
|
|
2039
2060
|
"\tDNSSource\x12\\\n" +
|
|
2040
2061
|
"\tdnsMethod\x18\x0f \x01(\x0e2>.WAWebProtobufsWa6.ClientPayload.DNSSource.DNSResolutionMethodR\tdnsMethod\x12\x1c\n" +
|
|
2041
2062
|
"\tappCached\x18\x10 \x01(\bR\tappCached\"a\n" +
|
|
@@ -2074,7 +2095,7 @@ const file_waWa6_WAWebProtobufsWa6_proto_rawDesc = "" +
|
|
|
2074
2095
|
"\x06DARWIN\x10\x03\x12\t\n" +
|
|
2075
2096
|
"\x05WIN32\x10\x04\x12\x0e\n" +
|
|
2076
2097
|
"\n" +
|
|
2077
|
-
"WIN_HYBRID\x10\x05\x1a\
|
|
2098
|
+
"WIN_HYBRID\x10\x05\x1a\xcf\f\n" +
|
|
2078
2099
|
"\tUserAgent\x12O\n" +
|
|
2079
2100
|
"\bplatform\x18\x01 \x01(\x0e23.WAWebProtobufsWa6.ClientPayload.UserAgent.PlatformR\bplatform\x12U\n" +
|
|
2080
2101
|
"\n" +
|
|
@@ -2118,7 +2139,7 @@ const file_waWa6_WAWebProtobufsWa6_proto_rawDesc = "" +
|
|
|
2118
2139
|
"\aRELEASE\x10\x00\x12\b\n" +
|
|
2119
2140
|
"\x04BETA\x10\x01\x12\t\n" +
|
|
2120
2141
|
"\x05ALPHA\x10\x02\x12\t\n" +
|
|
2121
|
-
"\x05DEBUG\x10\x03\"\
|
|
2142
|
+
"\x05DEBUG\x10\x03\"\x97\x04\n" +
|
|
2122
2143
|
"\bPlatform\x12\v\n" +
|
|
2123
2144
|
"\aANDROID\x10\x00\x12\a\n" +
|
|
2124
2145
|
"\x03IOS\x10\x01\x12\x11\n" +
|
|
@@ -2161,7 +2182,8 @@ const file_waWa6_WAWebProtobufsWa6_proto_rawDesc = "" +
|
|
|
2161
2182
|
"\bBLUE_WEB\x10 \x12\b\n" +
|
|
2162
2183
|
"\x04IPAD\x10!\x12\b\n" +
|
|
2163
2184
|
"\x04TEST\x10\"\x12\x11\n" +
|
|
2164
|
-
"\rSMART_GLASSES\x10#\
|
|
2185
|
+
"\rSMART_GLASSES\x10#\x12\v\n" +
|
|
2186
|
+
"\aBLUE_VR\x10$\x1aq\n" +
|
|
2165
2187
|
"\vInteropData\x12\x1c\n" +
|
|
2166
2188
|
"\taccountID\x18\x01 \x01(\x04R\taccountID\x12\x14\n" +
|
|
2167
2189
|
"\x05token\x18\x02 \x01(\fR\x05token\x12.\n" +
|
|
@@ -152,6 +152,7 @@ message ClientPayload {
|
|
|
152
152
|
IPAD = 33;
|
|
153
153
|
TEST = 34;
|
|
154
154
|
SMART_GLASSES = 35;
|
|
155
|
+
BLUE_VR = 36;
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
message AppVersion {
|
|
@@ -227,6 +228,8 @@ message ClientPayload {
|
|
|
227
228
|
optional TrafficAnonymization trafficAnonymization = 40;
|
|
228
229
|
optional bool lidDbMigrated = 41;
|
|
229
230
|
optional AccountType accountType = 42;
|
|
231
|
+
optional sfixed32 connectionSequenceInfo = 43;
|
|
232
|
+
optional bool paaLink = 44;
|
|
230
233
|
}
|
|
231
234
|
|
|
232
235
|
message HandshakeMessage {
|
|
@@ -11,6 +11,7 @@ import (
|
|
|
11
11
|
"fmt"
|
|
12
12
|
"time"
|
|
13
13
|
|
|
14
|
+
"github.com/rs/zerolog"
|
|
14
15
|
"go.mau.fi/util/ptr"
|
|
15
16
|
|
|
16
17
|
waBinary "go.mau.fi/whatsmeow/binary"
|
|
@@ -103,7 +104,13 @@ func (cli *Client) parseReceipt(node *waBinary.Node) (*events.Receipt, error) {
|
|
|
103
104
|
func (cli *Client) maybeDeferredAck(ctx context.Context, node *waBinary.Node) func(cancelled ...*bool) {
|
|
104
105
|
if cli.SynchronousAck {
|
|
105
106
|
return func(cancelled ...*bool) {
|
|
106
|
-
|
|
107
|
+
isCancelled := len(cancelled) > 0 && ptr.Val(cancelled[0])
|
|
108
|
+
if ctx.Err() != nil || isCancelled {
|
|
109
|
+
zerolog.Ctx(ctx).Debug().
|
|
110
|
+
AnErr("ctx_err", ctx.Err()).
|
|
111
|
+
Bool("cancelled", isCancelled).
|
|
112
|
+
Str("node_tag", node.Tag).
|
|
113
|
+
Msg("Not sending ack for node")
|
|
107
114
|
return
|
|
108
115
|
}
|
|
109
116
|
cli.sendAck(node)
|
|
@@ -29,6 +29,7 @@ import (
|
|
|
29
29
|
"google.golang.org/protobuf/proto"
|
|
30
30
|
|
|
31
31
|
waBinary "go.mau.fi/whatsmeow/binary"
|
|
32
|
+
"go.mau.fi/whatsmeow/proto/waBotMetadata"
|
|
32
33
|
"go.mau.fi/whatsmeow/proto/waCommon"
|
|
33
34
|
"go.mau.fi/whatsmeow/proto/waE2E"
|
|
34
35
|
"go.mau.fi/whatsmeow/types"
|
|
@@ -237,7 +238,7 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waE2E
|
|
|
237
238
|
|
|
238
239
|
if isBotMode {
|
|
239
240
|
if message.MessageContextInfo.BotMetadata == nil {
|
|
240
|
-
message.MessageContextInfo.BotMetadata = &
|
|
241
|
+
message.MessageContextInfo.BotMetadata = &waBotMetadata.BotMetadata{
|
|
241
242
|
PersonaID: proto.String("867051314767696$760019659443059"),
|
|
242
243
|
}
|
|
243
244
|
}
|
|
@@ -578,13 +579,14 @@ func ParseDisappearingTimerString(val string) (time.Duration, bool) {
|
|
|
578
579
|
// and in groups the server will just reject the change. You can use the DisappearingTimer<Duration> constants for convenience.
|
|
579
580
|
//
|
|
580
581
|
// In groups, the server will echo the change as a notification, so it'll show up as a *events.GroupInfo update.
|
|
581
|
-
func (cli *Client) SetDisappearingTimer(chat types.JID, timer time.Duration) (err error) {
|
|
582
|
+
func (cli *Client) SetDisappearingTimer(chat types.JID, timer time.Duration, settingTS time.Time) (err error) {
|
|
582
583
|
switch chat.Server {
|
|
583
584
|
case types.DefaultUserServer, types.HiddenUserServer:
|
|
584
585
|
_, err = cli.SendMessage(context.TODO(), chat, &waE2E.Message{
|
|
585
586
|
ProtocolMessage: &waE2E.ProtocolMessage{
|
|
586
|
-
Type:
|
|
587
|
-
EphemeralExpiration:
|
|
587
|
+
Type: waE2E.ProtocolMessage_EPHEMERAL_SETTING.Enum(),
|
|
588
|
+
EphemeralExpiration: proto.Uint32(uint32(timer.Seconds())),
|
|
589
|
+
EphemeralSettingTimestamp: proto.Int64(settingTS.Unix()),
|
|
588
590
|
},
|
|
589
591
|
})
|
|
590
592
|
case types.GroupServer:
|
|
@@ -76,7 +76,7 @@ func (vc WAVersionContainer) ProtoAppVersion() *waWa6.ClientPayload_UserAgent_Ap
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// waVersion is the WhatsApp web client version
|
|
79
|
-
var waVersion = WAVersionContainer{2, 3000,
|
|
79
|
+
var waVersion = WAVersionContainer{2, 3000, 1026436087}
|
|
80
80
|
|
|
81
81
|
// waVersionHash is the md5 hash of a dot-separated waVersion
|
|
82
82
|
var waVersionHash [16]byte
|
|
@@ -37,6 +37,7 @@ var NoopDevice = &Device{
|
|
|
37
37
|
MsgSecrets: nilStore,
|
|
38
38
|
PrivacyTokens: nilStore,
|
|
39
39
|
EventBuffer: nilStore,
|
|
40
|
+
LIDs: nilStore,
|
|
40
41
|
Container: nilStore,
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -199,8 +200,8 @@ func (n *NoopStore) PutMessageSecret(ctx context.Context, chat, sender types.JID
|
|
|
199
200
|
return n.Error
|
|
200
201
|
}
|
|
201
202
|
|
|
202
|
-
func (n *NoopStore) GetMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID) ([]byte, error) {
|
|
203
|
-
return nil, n.Error
|
|
203
|
+
func (n *NoopStore) GetMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID) ([]byte, types.JID, error) {
|
|
204
|
+
return nil, types.EmptyJID, n.Error
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
func (n *NoopStore) PutPrivacyTokens(ctx context.Context, tokens ...PrivacyToken) error {
|
|
@@ -733,7 +733,9 @@ const (
|
|
|
733
733
|
|
|
734
734
|
func (s *SQLStore) PutMutedUntil(ctx context.Context, chat types.JID, mutedUntil time.Time) error {
|
|
735
735
|
var val int64
|
|
736
|
-
if
|
|
736
|
+
if mutedUntil == store.MutedForever {
|
|
737
|
+
val = -1
|
|
738
|
+
} else if !mutedUntil.IsZero() {
|
|
737
739
|
val = mutedUntil.Unix()
|
|
738
740
|
}
|
|
739
741
|
_, err := s.db.Exec(ctx, fmt.Sprintf(putChatSettingQuery, "muted_until"), s.JID, chat, val)
|
|
@@ -760,7 +762,9 @@ func (s *SQLStore) GetChatSettings(ctx context.Context, chat types.JID) (setting
|
|
|
760
762
|
} else {
|
|
761
763
|
settings.Found = true
|
|
762
764
|
}
|
|
763
|
-
if mutedUntil
|
|
765
|
+
if mutedUntil < 0 {
|
|
766
|
+
settings.MutedUntil = store.MutedForever
|
|
767
|
+
} else if mutedUntil > 0 {
|
|
764
768
|
settings.MutedUntil = time.Unix(mutedUntil, 0)
|
|
765
769
|
}
|
|
766
770
|
return
|
|
@@ -773,7 +777,23 @@ const (
|
|
|
773
777
|
ON CONFLICT (our_jid, chat_jid, sender_jid, message_id) DO NOTHING
|
|
774
778
|
`
|
|
775
779
|
getMsgSecret = `
|
|
776
|
-
SELECT key
|
|
780
|
+
SELECT key, sender_jid
|
|
781
|
+
FROM whatsmeow_message_secrets
|
|
782
|
+
WHERE our_jid=$1 AND (chat_jid=$2 OR chat_jid=(
|
|
783
|
+
CASE
|
|
784
|
+
WHEN $2 LIKE '%@lid'
|
|
785
|
+
THEN (SELECT pn || '@s.whatsapp.net' FROM whatsmeow_lid_map WHERE lid=replace($2, '@lid', ''))
|
|
786
|
+
WHEN $2 LIKE '%@s.whatsapp.net'
|
|
787
|
+
THEN (SELECT lid || '@lid' FROM whatsmeow_lid_map WHERE lid=replace($2, '@s.whatsapp.net', ''))
|
|
788
|
+
END
|
|
789
|
+
)) AND message_id=$4 AND (sender_jid=$3 OR sender_jid=(
|
|
790
|
+
CASE
|
|
791
|
+
WHEN $3 LIKE '%@lid'
|
|
792
|
+
THEN (SELECT pn || '@s.whatsapp.net' FROM whatsmeow_lid_map WHERE lid=replace($3, '@lid', ''))
|
|
793
|
+
WHEN $3 LIKE '%@s.whatsapp.net'
|
|
794
|
+
THEN (SELECT lid || '@lid' FROM whatsmeow_lid_map WHERE lid=replace($3, '@s.whatsapp.net', ''))
|
|
795
|
+
END
|
|
796
|
+
))
|
|
777
797
|
`
|
|
778
798
|
)
|
|
779
799
|
|
|
@@ -797,8 +817,8 @@ func (s *SQLStore) PutMessageSecret(ctx context.Context, chat, sender types.JID,
|
|
|
797
817
|
return
|
|
798
818
|
}
|
|
799
819
|
|
|
800
|
-
func (s *SQLStore) GetMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID) (secret []byte, err error) {
|
|
801
|
-
err = s.db.QueryRow(ctx, getMsgSecret, s.JID, chat.ToNonAD(), sender.ToNonAD(), id).Scan(&secret)
|
|
820
|
+
func (s *SQLStore) GetMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID) (secret []byte, realSender types.JID, err error) {
|
|
821
|
+
err = s.db.QueryRow(ctx, getMsgSecret, s.JID, chat.ToNonAD(), sender.ToNonAD(), id).Scan(&secret, &realSender)
|
|
802
822
|
if errors.Is(err, sql.ErrNoRows) {
|
|
803
823
|
err = nil
|
|
804
824
|
}
|
|
@@ -91,6 +91,8 @@ type ContactStore interface {
|
|
|
91
91
|
GetAllContacts(ctx context.Context) (map[types.JID]types.ContactInfo, error)
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
var MutedForever = time.Date(9999, 12, 31, 23, 59, 59, 999999999, time.UTC)
|
|
95
|
+
|
|
94
96
|
type ChatSettingsStore interface {
|
|
95
97
|
PutMutedUntil(ctx context.Context, chat types.JID, mutedUntil time.Time) error
|
|
96
98
|
PutPinned(ctx context.Context, chat types.JID, pinned bool) error
|
|
@@ -113,7 +115,7 @@ type MessageSecretInsert struct {
|
|
|
113
115
|
type MsgSecretStore interface {
|
|
114
116
|
PutMessageSecrets(ctx context.Context, inserts []MessageSecretInsert) error
|
|
115
117
|
PutMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID, secret []byte) error
|
|
116
|
-
GetMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID) ([]byte, error)
|
|
118
|
+
GetMessageSecret(ctx context.Context, chat, sender types.JID, id types.MessageID) ([]byte, types.JID, error)
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
type PrivacyToken struct {
|
|
@@ -297,6 +297,7 @@ type Message struct {
|
|
|
297
297
|
IsViewOnceV2Extension bool // True if the message was unwrapped from a ViewOnceMessageV2Extension
|
|
298
298
|
IsDocumentWithCaption bool // True if the message was unwrapped from a DocumentWithCaptionMessage
|
|
299
299
|
IsLottieSticker bool // True if the message was unwrapped from a LottieStickerMessage
|
|
300
|
+
IsBotInvoke bool // True if the message was unwrapped from a BotInvokeMessage
|
|
300
301
|
IsEdit bool // True if the message was unwrapped from an EditedMessage
|
|
301
302
|
|
|
302
303
|
// If this event was parsed from a WebMessageInfo (i.e. from a history sync or unavailable message request), the source data is here.
|
|
@@ -350,6 +351,10 @@ func (evt *Message) UnwrapRaw() *Message {
|
|
|
350
351
|
}
|
|
351
352
|
evt.Message = evt.Message.GetDeviceSentMessage().GetMessage()
|
|
352
353
|
}
|
|
354
|
+
if evt.Message.GetBotInvokeMessage().GetMessage() != nil {
|
|
355
|
+
evt.Message = evt.Message.GetBotInvokeMessage().GetMessage()
|
|
356
|
+
evt.IsBotInvoke = true
|
|
357
|
+
}
|
|
353
358
|
if evt.Message.GetEphemeralMessage().GetMessage() != nil {
|
|
354
359
|
evt.Message = evt.Message.GetEphemeralMessage().GetMessage()
|
|
355
360
|
evt.IsEphemeral = true
|
|
@@ -381,6 +386,9 @@ func (evt *Message) UnwrapRaw() *Message {
|
|
|
381
386
|
evt.Message = evt.Message.GetEditedMessage().GetMessage()
|
|
382
387
|
evt.IsEdit = true
|
|
383
388
|
}
|
|
389
|
+
if evt.Message != nil && evt.RawMessage != nil && evt.Message.MessageContextInfo == nil && evt.RawMessage.MessageContextInfo != nil {
|
|
390
|
+
evt.Message.MessageContextInfo = evt.RawMessage.MessageContextInfo
|
|
391
|
+
}
|
|
384
392
|
return evt
|
|
385
393
|
}
|
|
386
394
|
|
|
@@ -39,7 +39,8 @@ var (
|
|
|
39
39
|
ServerJID = NewJID("", DefaultUserServer)
|
|
40
40
|
BroadcastServerJID = NewJID("", BroadcastServer)
|
|
41
41
|
StatusBroadcastJID = NewJID("status", BroadcastServer)
|
|
42
|
-
|
|
42
|
+
LegacyPSAJID = NewJID("0", LegacyUserServer)
|
|
43
|
+
PSAJID = NewJID("0", DefaultUserServer)
|
|
43
44
|
OfficialBusinessJID = NewJID("16505361212", LegacyUserServer)
|
|
44
45
|
MetaAIJID = NewJID("13135550002", DefaultUserServer)
|
|
45
46
|
NewMetaAIJID = NewJID("867051314767696", BotServer)
|
|
@@ -56,6 +56,8 @@ type ProfilePictureInfo struct {
|
|
|
56
56
|
Type string `json:"type"` // The type of image. Known types include "image" (full res) and "preview" (thumbnail).
|
|
57
57
|
|
|
58
58
|
DirectPath string `json:"direct_path"` // The path to the image, probably not very useful
|
|
59
|
+
|
|
60
|
+
Hash []byte `json:"hash"` // Some kind of hash (format is unknown)
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
// ContactInfo contains the cached names of a WhatsApp user.
|
|
@@ -8,6 +8,7 @@ package whatsmeow
|
|
|
8
8
|
|
|
9
9
|
import (
|
|
10
10
|
"context"
|
|
11
|
+
"encoding/base64"
|
|
11
12
|
"errors"
|
|
12
13
|
"fmt"
|
|
13
14
|
"slices"
|
|
@@ -338,8 +339,8 @@ func (cli *Client) parseBusinessProfile(node *waBinary.Node) (*types.BusinessPro
|
|
|
338
339
|
if !ok {
|
|
339
340
|
return nil, errors.New("missing jid in business profile")
|
|
340
341
|
}
|
|
341
|
-
address :=
|
|
342
|
-
email :=
|
|
342
|
+
address, _ := profileNode.GetChildByTag("address").Content.([]byte)
|
|
343
|
+
email, _ := profileNode.GetChildByTag("email").Content.([]byte)
|
|
343
344
|
businessHour := profileNode.GetChildByTag("business_hours")
|
|
344
345
|
businessHourTimezone := businessHour.AttrGetter().String("timezone")
|
|
345
346
|
businessHoursConfigs := businessHour.GetChildren()
|
|
@@ -348,7 +349,7 @@ func (cli *Client) parseBusinessProfile(node *waBinary.Node) (*types.BusinessPro
|
|
|
348
349
|
if config.Tag != "business_hours_config" {
|
|
349
350
|
continue
|
|
350
351
|
}
|
|
351
|
-
dow := config.AttrGetter().String("
|
|
352
|
+
dow := config.AttrGetter().String("day_of_week")
|
|
352
353
|
mode := config.AttrGetter().String("mode")
|
|
353
354
|
openTime := config.AttrGetter().String("open_time")
|
|
354
355
|
closeTime := config.AttrGetter().String("close_time")
|
|
@@ -366,21 +367,23 @@ func (cli *Client) parseBusinessProfile(node *waBinary.Node) (*types.BusinessPro
|
|
|
366
367
|
continue
|
|
367
368
|
}
|
|
368
369
|
id := category.AttrGetter().String("id")
|
|
369
|
-
name :=
|
|
370
|
+
name, _ := category.Content.([]byte)
|
|
370
371
|
categories = append(categories, types.Category{
|
|
371
372
|
ID: id,
|
|
372
|
-
Name: name,
|
|
373
|
+
Name: string(name),
|
|
373
374
|
})
|
|
374
375
|
}
|
|
375
376
|
profileOptionsNode := profileNode.GetChildByTag("profile_options")
|
|
376
377
|
profileOptions := make(map[string]string)
|
|
377
378
|
for _, option := range profileOptionsNode.GetChildren() {
|
|
378
|
-
|
|
379
|
+
optValueBytes, _ := option.Content.([]byte)
|
|
380
|
+
profileOptions[option.Tag] = string(optValueBytes)
|
|
381
|
+
// TODO parse bot_fields
|
|
379
382
|
}
|
|
380
383
|
return &types.BusinessProfile{
|
|
381
384
|
JID: jid,
|
|
382
|
-
Email: email,
|
|
383
|
-
Address: address,
|
|
385
|
+
Email: string(email),
|
|
386
|
+
Address: string(address),
|
|
384
387
|
Categories: categories,
|
|
385
388
|
ProfileOptions: profileOptions,
|
|
386
389
|
BusinessHoursTimeZone: businessHourTimezone,
|
|
@@ -568,6 +571,7 @@ func (cli *Client) GetProfilePictureInfo(jid types.JID, params *GetProfilePictur
|
|
|
568
571
|
info.URL = ag.String("url")
|
|
569
572
|
info.Type = ag.String("type")
|
|
570
573
|
info.DirectPath = ag.String("direct_path")
|
|
574
|
+
info.Hash, _ = base64.StdEncoding.DecodeString(ag.OptionalString("hash"))
|
|
571
575
|
if !ag.OK() {
|
|
572
576
|
return &info, ag.Error()
|
|
573
577
|
}
|
|
@@ -36,7 +36,7 @@ func ScalarBaseMult(dst, scalar *[32]byte) {
|
|
|
36
36
|
curve := ecdh.X25519()
|
|
37
37
|
priv, err := curve.NewPrivateKey(scalar[:])
|
|
38
38
|
if err != nil {
|
|
39
|
-
panic("curve25519:
|
|
39
|
+
panic("curve25519: " + err.Error())
|
|
40
40
|
}
|
|
41
41
|
copy(dst[:], priv.PublicKey().Bytes())
|
|
42
42
|
}
|
|
@@ -55,7 +55,7 @@ func configFromServer(h1 *http.Server, h2 *Server) http2Config {
|
|
|
55
55
|
PermitProhibitedCipherSuites: h2.PermitProhibitedCipherSuites,
|
|
56
56
|
CountError: h2.CountError,
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
fillNetHTTPConfig(&conf, h1.HTTP2)
|
|
59
59
|
setConfigDefaults(&conf, true)
|
|
60
60
|
return conf
|
|
61
61
|
}
|
|
@@ -81,7 +81,7 @@ func configFromTransport(h2 *Transport) http2Config {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
if h2.t1 != nil {
|
|
84
|
-
|
|
84
|
+
fillNetHTTPConfig(&conf, h2.t1.HTTP2)
|
|
85
85
|
}
|
|
86
86
|
setConfigDefaults(&conf, false)
|
|
87
87
|
return conf
|
|
@@ -120,3 +120,45 @@ func adjustHTTP1MaxHeaderSize(n int64) int64 {
|
|
|
120
120
|
const typicalHeaders = 10 // conservative
|
|
121
121
|
return n + typicalHeaders*perFieldOverhead
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) {
|
|
125
|
+
if h2 == nil {
|
|
126
|
+
return
|
|
127
|
+
}
|
|
128
|
+
if h2.MaxConcurrentStreams != 0 {
|
|
129
|
+
conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
|
|
130
|
+
}
|
|
131
|
+
if h2.MaxEncoderHeaderTableSize != 0 {
|
|
132
|
+
conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize)
|
|
133
|
+
}
|
|
134
|
+
if h2.MaxDecoderHeaderTableSize != 0 {
|
|
135
|
+
conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize)
|
|
136
|
+
}
|
|
137
|
+
if h2.MaxConcurrentStreams != 0 {
|
|
138
|
+
conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
|
|
139
|
+
}
|
|
140
|
+
if h2.MaxReadFrameSize != 0 {
|
|
141
|
+
conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize)
|
|
142
|
+
}
|
|
143
|
+
if h2.MaxReceiveBufferPerConnection != 0 {
|
|
144
|
+
conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection)
|
|
145
|
+
}
|
|
146
|
+
if h2.MaxReceiveBufferPerStream != 0 {
|
|
147
|
+
conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream)
|
|
148
|
+
}
|
|
149
|
+
if h2.SendPingTimeout != 0 {
|
|
150
|
+
conf.SendPingTimeout = h2.SendPingTimeout
|
|
151
|
+
}
|
|
152
|
+
if h2.PingTimeout != 0 {
|
|
153
|
+
conf.PingTimeout = h2.PingTimeout
|
|
154
|
+
}
|
|
155
|
+
if h2.WriteByteTimeout != 0 {
|
|
156
|
+
conf.WriteByteTimeout = h2.WriteByteTimeout
|
|
157
|
+
}
|
|
158
|
+
if h2.PermitProhibitedCipherSuites {
|
|
159
|
+
conf.PermitProhibitedCipherSuites = true
|
|
160
|
+
}
|
|
161
|
+
if h2.CountError != nil {
|
|
162
|
+
conf.CountError = h2.CountError
|
|
163
|
+
}
|
|
164
|
+
}
|