@openclaw/whatsapp 2026.8.1-beta.3 → 2026.8.1
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.
- package/dist/{accounts-BX2fZUyR.js → accounts-CeKQbu_s.js} +9 -26
- package/dist/{action-runtime-pM-ExU0l.js → action-runtime-YA_Yvunu.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{call-tool-api.js → agent-tools-api.js} +11 -4
- package/dist/{agent-tools-login-BjRpD-JQ.js → agent-tools-login-B-2qZPzc.js} +12 -3
- package/dist/api.js +6 -6
- package/dist/{approval-handler.runtime-CkMMvUjk.js → approval-handler.runtime-C7jZ8rsD.js} +3 -3
- package/dist/{approval-reactions-Jyr1JaAK.js → approval-reactions-rpaNVHzZ.js} +2 -2
- package/dist/{channel-DRMYRfZ8.js → channel-Dx09AAmX.js} +10 -12
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-CstrR0CT.js → channel-react-action-n9a8Hk5i.js} +3 -3
- package/dist/{channel.runtime-X3JC2gaq.js → channel.runtime-D_PjmeMT.js} +3 -3
- package/dist/{channel.setup-DhBBhbQv.js → channel.setup-CRJQiWbh.js} +1 -1
- package/dist/{directory-config-P7_3U73Z.js → directory-config-Ci8Jjsw4.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{group-session-key-DmFc_Cqi.js → group-session-key-CH9jJIVQ.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/light-runtime-api.js +1 -1
- package/dist/{login-BkpKpndm.js → login-1u5WcfTn.js} +1 -1
- package/dist/{login-qr-1dpv6jjT.js → login-qr-B_1sr0hk.js} +35 -14
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-IzwQKizW.js → monitor-CySzv38g.js} +115 -108
- package/dist/{question-reactions-D3eAeB0i.js → question-reactions-B9D6MHXZ.js} +1 -1
- package/dist/runtime-api.js +6 -6
- package/dist/{send-CwvTU4RI.js → send-C3S-NqyO.js} +2 -2
- package/dist/{send-api-obOSm2cC.js → send-api-C-FFC1p_.js} +3 -3
- package/dist/{setup-finalize-n4K2I2gJ.js → setup-finalize-CRzMpx84.js} +4 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-Cwn3zyxK.js → setup-surface-ym4doiv3.js} +2 -2
- package/dist/{shared-wg42NKFB.js → shared-D3B14d45.js} +3 -3
- package/node_modules/baileys/lib/Defaults/index.js +1 -1
- package/node_modules/baileys/lib/Socket/business.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/chats.d.ts +1 -0
- package/node_modules/baileys/lib/Socket/chats.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/chats.js +10 -5
- package/node_modules/baileys/lib/Socket/chats.js.map +1 -1
- package/node_modules/baileys/lib/Socket/communities.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/groups.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/index.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/messages-recv.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/messages-send.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/newsletter.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/socket.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/socket.js +3 -0
- package/node_modules/baileys/lib/Socket/socket.js.map +1 -1
- package/node_modules/baileys/lib/Types/index.d.ts +1 -0
- package/node_modules/baileys/lib/Types/index.d.ts.map +1 -1
- package/node_modules/baileys/lib/Types/index.js.map +1 -1
- package/node_modules/baileys/lib/Utils/browser-utils.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/browser-utils.js +1 -0
- package/node_modules/baileys/lib/Utils/browser-utils.js.map +1 -1
- package/node_modules/baileys/lib/Utils/generics.d.ts +1 -0
- package/node_modules/baileys/lib/Utils/generics.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/generics.js +1 -1
- package/node_modules/baileys/lib/Utils/generics.js.map +1 -1
- package/node_modules/baileys/lib/Utils/tc-token-utils.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/tc-token-utils.js +3 -2
- package/node_modules/baileys/lib/Utils/tc-token-utils.js.map +1 -1
- package/node_modules/baileys/lib/Utils/validate-connection.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/validate-connection.js +9 -2
- package/node_modules/baileys/lib/Utils/validate-connection.js.map +1 -1
- package/node_modules/baileys/node_modules/content-type/README.md +2 -0
- package/node_modules/baileys/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/baileys/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/baileys/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/baileys/node_modules/content-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/readme.md +3 -0
- package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +6 -1
- package/node_modules/baileys/node_modules/file-type/source/index.d.ts +3 -0
- package/node_modules/baileys/node_modules/file-type/source/index.js +25 -13
- package/node_modules/baileys/node_modules/music-metadata/LICENSE.txt +9 -9
- package/node_modules/baileys/node_modules/music-metadata/README.md +878 -878
- package/node_modules/baileys/node_modules/music-metadata/lib/ParseError.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ParseError.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -4
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.js +66 -30
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.d.ts +5 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.js +94 -25
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfChunk.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfParser.js +38 -13
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/AtomToken.js +2 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/MP4Parser.js +34 -7
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +7 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +13 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/riff/RiffChunk.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/package.json +156 -156
- package/node_modules/baileys/node_modules/protobufjs/README.md +61 -84
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js +66 -45
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js +47 -40
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js +92 -68
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.js +26 -10
- package/node_modules/baileys/node_modules/protobufjs/index.d.ts +3 -0
- package/node_modules/baileys/node_modules/protobufjs/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/src/converter.js +5 -1
- package/node_modules/baileys/node_modules/protobufjs/src/enum.js +5 -2
- package/node_modules/baileys/node_modules/protobufjs/src/field.js +6 -1
- package/node_modules/baileys/node_modules/protobufjs/src/parse.js +26 -23
- package/node_modules/baileys/node_modules/protobufjs/src/reader.js +36 -9
- package/node_modules/baileys/node_modules/protobufjs/src/util/codegen.js +3 -1
- package/node_modules/baileys/node_modules/protobufjs/src/util/utf8.js +2 -28
- package/node_modules/baileys/node_modules/protobufjs/src/writer.js +7 -1
- package/node_modules/baileys/package.json +1 -1
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/openclaw.plugin.json +2 -1
- package/package.json +6 -6
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
2
|
-
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
1
|
+
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CeKQbu_s.js";
|
|
2
|
+
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-C3S-NqyO.js";
|
|
3
3
|
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.js";
|
|
4
4
|
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
|
|
5
5
|
import { a as markdownToWhatsAppChunks, c as toWhatsappJid, l as toWhatsappJidWithLid, n as isSelfChatMode, o as resolveEquivalentWhatsAppDirectChatJids, r as jidToE164, s as resolveJidToE164 } from "./targets-runtime-TMk0lGuy.js";
|
|
6
6
|
import { t as normalizeE164 } from "./text-runtime-CaKLhowd.js";
|
|
7
|
-
import { a as cacheInboundMessageMeta, i as buildQuotedMessageOptions, n as resolveWhatsAppGroupSessionRoute, o as lookupInboundMessageMeta, r as resolveWhatsAppLegacyGroupSessionKey } from "./group-session-key-
|
|
7
|
+
import { a as cacheInboundMessageMeta, i as buildQuotedMessageOptions, n as resolveWhatsAppGroupSessionRoute, o as lookupInboundMessageMeta, r as resolveWhatsAppLegacyGroupSessionKey } from "./group-session-key-CH9jJIVQ.js";
|
|
8
8
|
import { C as getMentionIdentities, D as getSenderIdentity, E as getSelfIdentity, O as identitiesOverlap, S as getComparableIdentityValues, T as getReplyContext, g as readWebSelfId, k as resolveComparableIdentity, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision, w as getPrimaryIdentityId } from "./auth-store-CtpBqH5S.js";
|
|
9
9
|
import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.js";
|
|
10
10
|
import { a as waitForWaConnection, c as isWhatsAppSocketOperationTimeoutError, d as withWhatsAppSocketOperationTimeout, l as resolveWhatsAppSocketOperationTimeoutMs, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter, u as resolveWhatsAppSocketTiming } from "./socket-close-2T0_jZTN.js";
|
|
11
11
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
12
12
|
import { t as BufferJSON } from "./session.runtime-Nsqaehbd.js";
|
|
13
|
-
import { _ as resolveInboundMediaMimetype, a as addWhatsAppImagePreviewFields, c as extractContextInfo, d as extractMediaKind, f as extractMentionedJids, g as projectWhatsAppInboundMessage, h as hasInboundUserContent, i as resolveWhatsAppOutboundMentions, l as extractExternalAdReplyContext, n as addWhatsAppOutboundMentionsToContent, o as describeReplyContext, p as extractText, r as mayContainWhatsAppOutboundMention, s as extractContactContext, t as createWebSendApi, u as extractLocationData } from "./send-api-
|
|
13
|
+
import { _ as resolveInboundMediaMimetype, a as addWhatsAppImagePreviewFields, c as extractContextInfo, d as extractMediaKind, f as extractMentionedJids, g as projectWhatsAppInboundMessage, h as hasInboundUserContent, i as resolveWhatsAppOutboundMentions, l as extractExternalAdReplyContext, n as addWhatsAppOutboundMentionsToContent, o as describeReplyContext, p as extractText, r as mayContainWhatsAppOutboundMention, s as extractContactContext, t as createWebSendApi, u as extractLocationData } from "./send-api-C-FFC1p_.js";
|
|
14
14
|
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-DeSRFXEV.js";
|
|
15
15
|
import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-CIYuBJrs.js";
|
|
16
|
-
import { n as maybeResolveWhatsAppApprovalReaction } from "./approval-reactions-
|
|
17
|
-
import { t as maybeResolveWhatsAppQuestionReaction } from "./question-reactions-
|
|
18
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString
|
|
16
|
+
import { n as maybeResolveWhatsAppApprovalReaction } from "./approval-reactions-rpaNVHzZ.js";
|
|
17
|
+
import { t as maybeResolveWhatsAppQuestionReaction } from "./question-reactions-B9D6MHXZ.js";
|
|
18
|
+
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
19
19
|
import { filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
20
20
|
import { createAckReactionHandle, createStatusReactionController, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
|
|
21
21
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
@@ -28,7 +28,7 @@ import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runt
|
|
|
28
28
|
import { buildChannelInboundEventContext, createChannelPartialDeliveryError, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundEnvelope as formatInboundEnvelope$1, formatInboundMediaUnavailableText, formatLocationText, formatMediaPlaceholderText, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, readAgentRunTerminalOutcome, resolveInboundSessionEnvelopeContext, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, shouldDebounceTextInbound, toInboundMediaFactsWithMetadata, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
|
|
29
29
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
30
30
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
31
|
-
import { isReasoningReplyPayload, resolveSendableOutboundReplyParts, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
|
|
31
|
+
import { isReasoningReplyPayload, resolveSendableOutboundReplyParts, resolveTextChunksWithFallback, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
|
|
32
32
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
33
33
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
34
34
|
import { DisconnectReason, downloadMediaMessage, isHostedLidUser, isHostedPnUser, isJidGroup, isJidGroup as isJidGroup$1, jidDecode, jidEncode, jidNormalizedUser, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
|
|
@@ -416,8 +416,7 @@ function readGroupMetadataCacheEntry(cache, jid) {
|
|
|
416
416
|
function createWhatsAppGroupMetadataCacheOwner(params) {
|
|
417
417
|
const reconnectCache = params.reconnectCache ?? /* @__PURE__ */ new Map();
|
|
418
418
|
const localCache = /* @__PURE__ */ new Map();
|
|
419
|
-
const
|
|
420
|
-
const invalidatedJids = /* @__PURE__ */ new Set();
|
|
419
|
+
const groupMetadataGenerations = /* @__PURE__ */ new Map();
|
|
421
420
|
const detachListeners = [];
|
|
422
421
|
let closed = false;
|
|
423
422
|
let started = false;
|
|
@@ -447,46 +446,51 @@ function createWhatsAppGroupMetadataCacheOwner(params) {
|
|
|
447
446
|
});
|
|
448
447
|
const rememberFullUpdate = (jid, meta) => {
|
|
449
448
|
if (closed) return;
|
|
449
|
+
groupMetadataGenerations.set(jid, {});
|
|
450
450
|
rememberWhatsAppBaileysCacheEntry(params.baileysCache, jid, meta, GROUP_META_TTL_MS);
|
|
451
|
-
publishedJids.add(jid);
|
|
452
|
-
invalidatedJids.delete(jid);
|
|
453
451
|
rememberGroupMetadataCacheEntry(reconnectCache, jid, summarizeForReconnect(meta));
|
|
454
452
|
localCache.delete(jid);
|
|
455
453
|
};
|
|
456
454
|
const forgetFullMetadata = (jid) => {
|
|
455
|
+
groupMetadataGenerations.set(jid, {});
|
|
457
456
|
params.baileysCache?.delete(jid);
|
|
458
457
|
reconnectCache.delete(jid);
|
|
459
458
|
localCache.delete(jid);
|
|
460
|
-
publishedJids.delete(jid);
|
|
461
|
-
invalidatedJids.add(jid);
|
|
462
459
|
};
|
|
463
460
|
const get = async (jid) => {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
rememberGroupMetadataCacheEntry(localCache, jid,
|
|
485
|
-
|
|
486
|
-
|
|
461
|
+
for (;;) {
|
|
462
|
+
if (closed) return { expires: resolveGroupMetadataExpiresAt() ?? 0 };
|
|
463
|
+
const cached = readGroupMetadataCacheEntry(localCache, jid);
|
|
464
|
+
if (cached) return cached;
|
|
465
|
+
const generation = groupMetadataGenerations.get(jid);
|
|
466
|
+
try {
|
|
467
|
+
const hydratedEntry = params.baileysCache?.get(jid);
|
|
468
|
+
const providerMetadata = params.baileysCache ? readWhatsAppBaileysCacheEntry(params.baileysCache, jid) : void 0;
|
|
469
|
+
const hydratedMetadata = providerMetadata?.participants?.length ? providerMetadata : void 0;
|
|
470
|
+
const meta = hydratedMetadata ?? await (params.getCurrentSock() ?? params.sock).groupMetadata(jid);
|
|
471
|
+
if (closed || groupMetadataGenerations.get(jid) !== generation) continue;
|
|
472
|
+
const entry = await summarize(meta);
|
|
473
|
+
if (closed || groupMetadataGenerations.get(jid) !== generation) continue;
|
|
474
|
+
if (hydratedMetadata && hydratedEntry) entry.expires = hydratedEntry.expiresAt;
|
|
475
|
+
else rememberWhatsAppBaileysCacheEntry(params.baileysCache, jid, meta, GROUP_META_TTL_MS);
|
|
476
|
+
groupMetadataGenerations.set(jid, {});
|
|
477
|
+
rememberGroupMetadataCacheEntry(reconnectCache, jid, {
|
|
478
|
+
subject: entry.subject,
|
|
479
|
+
expires: entry.expires
|
|
480
|
+
});
|
|
481
|
+
rememberGroupMetadataCacheEntry(localCache, jid, entry);
|
|
482
|
+
return entry;
|
|
483
|
+
} catch (error) {
|
|
484
|
+
if (closed || groupMetadataGenerations.get(jid) !== generation) continue;
|
|
485
|
+
const hydrated = readGroupMetadataCacheEntry(reconnectCache, jid);
|
|
486
|
+
if (hydrated) {
|
|
487
|
+
rememberGroupMetadataCacheEntry(localCache, jid, hydrated);
|
|
488
|
+
params.logVerbose(`Using cached group metadata for ${jid} after fetch failure: ${String(error)}`);
|
|
489
|
+
return hydrated;
|
|
490
|
+
}
|
|
491
|
+
params.logVerbose(`Failed to fetch group metadata for ${jid}: ${String(error)}`);
|
|
492
|
+
return { expires: resolveGroupMetadataExpiresAt() ?? 0 };
|
|
487
493
|
}
|
|
488
|
-
params.logVerbose(`Failed to fetch group metadata for ${jid}: ${String(error)}`);
|
|
489
|
-
return { expires: resolveGroupMetadataExpiresAt() ?? 0 };
|
|
490
494
|
}
|
|
491
495
|
};
|
|
492
496
|
const resolveOutboundMentions = async (jid, text) => {
|
|
@@ -544,10 +548,10 @@ function createWhatsAppGroupMetadataCacheOwner(params) {
|
|
|
544
548
|
try {
|
|
545
549
|
const groups = await params.sock.groupFetchAllParticipating();
|
|
546
550
|
if (closed) return;
|
|
547
|
-
for (const [jid, meta] of Object.entries(groups ?? {})) if (meta && !
|
|
551
|
+
for (const [jid, meta] of Object.entries(groups ?? {})) if (meta && !groupMetadataGenerations.has(jid)) {
|
|
548
552
|
rememberGroupMetadataCacheEntry(reconnectCache, jid, summarizeForReconnect(meta));
|
|
549
553
|
rememberWhatsAppBaileysCacheEntry(params.baileysCache, jid, meta, GROUP_META_TTL_MS);
|
|
550
|
-
|
|
554
|
+
groupMetadataGenerations.set(jid, {});
|
|
551
555
|
}
|
|
552
556
|
params.logVerbose(`Hydrated ${Object.keys(groups ?? {}).length} participating groups on connect`);
|
|
553
557
|
} catch (error) {
|
|
@@ -2713,6 +2717,11 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2713
2717
|
const isGroupConversation = transport.conversationKind === "group";
|
|
2714
2718
|
const replyStarted = Date.now();
|
|
2715
2719
|
const sendResults = [];
|
|
2720
|
+
const acceptedMediaUrls = /* @__PURE__ */ new Set();
|
|
2721
|
+
const recordMediaAccepted = (mediaUrl) => {
|
|
2722
|
+
acceptedMediaUrls.add(mediaUrl);
|
|
2723
|
+
params.onMediaAccepted?.(mediaUrl);
|
|
2724
|
+
};
|
|
2716
2725
|
const finishDelivery = () => {
|
|
2717
2726
|
const receipt = createWhatsAppReplyDeliveryReceipt(sendResults);
|
|
2718
2727
|
return {
|
|
@@ -2721,20 +2730,22 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2721
2730
|
providerAccepted: sendResults.some((result) => result.providerAccepted)
|
|
2722
2731
|
};
|
|
2723
2732
|
};
|
|
2724
|
-
const preserveAcceptedDeliveryError = (error, kind) => {
|
|
2733
|
+
const preserveAcceptedDeliveryError = (error, kind, mediaUrl) => {
|
|
2725
2734
|
const sendKind = kind ?? sendResults[0]?.kind ?? "text";
|
|
2726
|
-
if (isChannelPartialDeliveryError(error))
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2735
|
+
if (isChannelPartialDeliveryError(error)) {
|
|
2736
|
+
if (rememberWhatsAppPartialSend({
|
|
2737
|
+
error,
|
|
2738
|
+
kind: sendKind,
|
|
2739
|
+
results: sendResults
|
|
2740
|
+
}) && mediaUrl) recordMediaAccepted(mediaUrl);
|
|
2741
|
+
}
|
|
2731
2742
|
return mergeWhatsAppAcceptedSendError({
|
|
2732
2743
|
error,
|
|
2733
2744
|
kind: sendKind,
|
|
2734
2745
|
results: sendResults
|
|
2735
2746
|
});
|
|
2736
2747
|
};
|
|
2737
|
-
const rememberSendResult = (result) => {
|
|
2748
|
+
const rememberSendResult = (result, mediaUrl) => {
|
|
2738
2749
|
if (!result) return;
|
|
2739
2750
|
try {
|
|
2740
2751
|
rememberWhatsAppAcceptedSend({
|
|
@@ -2745,6 +2756,8 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2745
2756
|
} catch (error) {
|
|
2746
2757
|
if (sendResults.some((accepted) => accepted.providerAccepted)) throw preserveAcceptedDeliveryError(error, result.kind);
|
|
2747
2758
|
throw error;
|
|
2759
|
+
} finally {
|
|
2760
|
+
if (mediaUrl && sendResults.includes(result)) recordMediaAccepted(mediaUrl);
|
|
2748
2761
|
}
|
|
2749
2762
|
};
|
|
2750
2763
|
if (isReasoningReplyPayload(replyResult)) {
|
|
@@ -2754,7 +2767,8 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2754
2767
|
const tableMode = params.tableMode ?? "code";
|
|
2755
2768
|
const chunkMode = params.chunkMode ?? "length";
|
|
2756
2769
|
const normalizedReply = params.normalizedReplyResult ?? normalizeWhatsAppOutboundPayload(replyResult, { normalizeText: normalizeWhatsAppPayloadTextPreservingIndentation });
|
|
2757
|
-
const
|
|
2770
|
+
const text = normalizedReply.text ?? "";
|
|
2771
|
+
const textChunks = resolveTextChunksWithFallback(text, markdownToWhatsAppChunks(text, textLimit, tableMode, chunkMode));
|
|
2758
2772
|
const mediaList = normalizedReply.mediaUrls ?? [];
|
|
2759
2773
|
const getQuote = () => {
|
|
2760
2774
|
if (!replyResult.replyToId) return;
|
|
@@ -2768,7 +2782,7 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2768
2782
|
media: cached?.media
|
|
2769
2783
|
});
|
|
2770
2784
|
};
|
|
2771
|
-
const sendWithRetry = async (fn, label, kind) => {
|
|
2785
|
+
const sendWithRetry = async (fn, label, kind, mediaUrl) => {
|
|
2772
2786
|
try {
|
|
2773
2787
|
return await sendWhatsAppOutboundWithRetry({
|
|
2774
2788
|
send: fn,
|
|
@@ -2777,7 +2791,7 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2777
2791
|
}
|
|
2778
2792
|
});
|
|
2779
2793
|
} catch (error) {
|
|
2780
|
-
if (isChannelPartialDeliveryError(error) || sendResults.some((result) => result.providerAccepted)) throw preserveAcceptedDeliveryError(error, kind);
|
|
2794
|
+
if (isChannelPartialDeliveryError(error) || sendResults.some((result) => result.providerAccepted)) throw preserveAcceptedDeliveryError(error, kind, mediaUrl);
|
|
2781
2795
|
throw error;
|
|
2782
2796
|
}
|
|
2783
2797
|
};
|
|
@@ -2809,13 +2823,10 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2809
2823
|
return delivery;
|
|
2810
2824
|
}
|
|
2811
2825
|
const remainingText = [...textChunks];
|
|
2812
|
-
const leadingCaption = remainingText.shift() || "";
|
|
2813
|
-
let acceptedIdsBeforeCurrentMedia = /* @__PURE__ */ new Set();
|
|
2814
2826
|
await sendMediaWithLeadingCaption({
|
|
2815
2827
|
mediaUrls: mediaList,
|
|
2816
|
-
caption:
|
|
2828
|
+
caption: remainingText.shift() || "",
|
|
2817
2829
|
send: async ({ mediaUrl, caption }) => {
|
|
2818
|
-
acceptedIdsBeforeCurrentMedia = new Set(sendResults.flatMap(listWhatsAppSendResultMessageIds));
|
|
2819
2830
|
const media = await prepareWhatsAppOutboundMedia(await loadWebMedia(mediaUrl, {
|
|
2820
2831
|
maxBytes: maxMediaBytes,
|
|
2821
2832
|
localRoots: params.mediaLocalRoots
|
|
@@ -2824,37 +2835,26 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2824
2835
|
logVerbose(`Web auto-reply media size: ${(media.buffer.length / (1024 * 1024)).toFixed(2)}MB`);
|
|
2825
2836
|
logVerbose(`Web auto-reply media source: ${mediaUrl} (kind ${media.kind})`);
|
|
2826
2837
|
}
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
mimetype: media.mimetype
|
|
2848
|
-
}, quote), "media:video", "media"));
|
|
2849
|
-
} else {
|
|
2850
|
-
const quote = getQuote();
|
|
2851
|
-
rememberSendResult(await sendWithRetry(() => transport.sendMedia({
|
|
2852
|
-
document: media.buffer,
|
|
2853
|
-
fileName: media.fileName,
|
|
2854
|
-
caption,
|
|
2855
|
-
mimetype: media.mimetype
|
|
2856
|
-
}, quote), "media:document", "media"));
|
|
2857
|
-
}
|
|
2838
|
+
const quote = getQuote();
|
|
2839
|
+
const mediaContent = media.kind === "image" ? {
|
|
2840
|
+
image: media.buffer,
|
|
2841
|
+
caption
|
|
2842
|
+
} : media.kind === "audio" ? {
|
|
2843
|
+
audio: media.buffer,
|
|
2844
|
+
ptt: true
|
|
2845
|
+
} : media.kind === "video" ? {
|
|
2846
|
+
video: media.buffer,
|
|
2847
|
+
caption
|
|
2848
|
+
} : {
|
|
2849
|
+
document: media.buffer,
|
|
2850
|
+
fileName: media.fileName,
|
|
2851
|
+
caption
|
|
2852
|
+
};
|
|
2853
|
+
rememberSendResult(await sendWithRetry(() => transport.sendMedia({
|
|
2854
|
+
...mediaContent,
|
|
2855
|
+
mimetype: media.mimetype
|
|
2856
|
+
}, quote), `media:${media.kind}`, "media", mediaUrl), mediaUrl);
|
|
2857
|
+
if (media.kind === "audio" && caption) rememberSendResult(await sendWithRetry(() => transport.reply(caption, quote), "media:audio-text", "text"));
|
|
2858
2858
|
whatsappOutboundLog.info(`Sent media reply to ${conversationId} (${(media.buffer.length / (1024 * 1024)).toFixed(2)}MB)`);
|
|
2859
2859
|
replyLogger.info({
|
|
2860
2860
|
correlationId: transport.correlationId ?? newConnectionId(),
|
|
@@ -2869,7 +2869,7 @@ async function deliverWebReplyInActivityScope(params) {
|
|
|
2869
2869
|
}, "auto-reply sent (media)");
|
|
2870
2870
|
},
|
|
2871
2871
|
onError: async ({ error, mediaUrl, caption, isFirst }) => {
|
|
2872
|
-
if (
|
|
2872
|
+
if (acceptedMediaUrls.has(mediaUrl)) throw preserveAcceptedDeliveryError(error);
|
|
2873
2873
|
whatsappOutboundLog.error(`Failed sending web media to ${conversationId}: ${formatError(error)}`);
|
|
2874
2874
|
replyLogger.warn({
|
|
2875
2875
|
err: error,
|
|
@@ -3072,9 +3072,6 @@ function resolveWhatsAppDeliverablePayload(payload, info) {
|
|
|
3072
3072
|
}
|
|
3073
3073
|
return payload;
|
|
3074
3074
|
}
|
|
3075
|
-
function getWhatsAppPayloadMediaUrls(payload) {
|
|
3076
|
-
return new Set(normalizeStringEntries([...Array.isArray(payload.mediaUrls) ? payload.mediaUrls : [], ...typeof payload.mediaUrl === "string" ? [payload.mediaUrl] : []]));
|
|
3077
|
-
}
|
|
3078
3075
|
function hasWhatsAppMediaUrlOverlap(left, right) {
|
|
3079
3076
|
for (const url of left) if (right.has(url)) return true;
|
|
3080
3077
|
return false;
|
|
@@ -3122,16 +3119,28 @@ function createWhatsAppMediaOnlyReplyCoalescer(params) {
|
|
|
3122
3119
|
return finalization;
|
|
3123
3120
|
},
|
|
3124
3121
|
flushNonDuplicateMedia: (mediaUrls) => flushWhere((pending) => !hasWhatsAppMediaUrlOverlap(pending.mediaUrls, mediaUrls)),
|
|
3125
|
-
|
|
3122
|
+
supersedeMedia(mediaUrl) {
|
|
3126
3123
|
const flushResult = {
|
|
3127
3124
|
delivered: 0,
|
|
3128
3125
|
droppedDuplicateMedia: 0
|
|
3129
3126
|
};
|
|
3130
3127
|
const retained = [];
|
|
3131
|
-
for (const pending of pendingMediaOnlyPayloads.splice(0))
|
|
3132
|
-
pending.
|
|
3133
|
-
|
|
3134
|
-
|
|
3128
|
+
for (const pending of pendingMediaOnlyPayloads.splice(0)) {
|
|
3129
|
+
if (pending.mediaUrls.delete(mediaUrl)) {
|
|
3130
|
+
flushResult.droppedDuplicateMedia += 1;
|
|
3131
|
+
const mediaUrls = [...pending.mediaUrls];
|
|
3132
|
+
pending.payload = {
|
|
3133
|
+
...pending.payload,
|
|
3134
|
+
mediaUrl: mediaUrls[0],
|
|
3135
|
+
mediaUrls
|
|
3136
|
+
};
|
|
3137
|
+
}
|
|
3138
|
+
if (pending.mediaUrls.size === 0) {
|
|
3139
|
+
pending.resolveFinalization(whatsAppReplyDeliveryVisibility(false));
|
|
3140
|
+
continue;
|
|
3141
|
+
}
|
|
3142
|
+
retained.push(pending);
|
|
3143
|
+
}
|
|
3135
3144
|
pendingMediaOnlyPayloads.push(...retained);
|
|
3136
3145
|
return flushResult;
|
|
3137
3146
|
},
|
|
@@ -3140,7 +3149,7 @@ function createWhatsAppMediaOnlyReplyCoalescer(params) {
|
|
|
3140
3149
|
}
|
|
3141
3150
|
function logWhatsAppMediaOnlyFlushResult(result) {
|
|
3142
3151
|
if (!shouldLogVerbose$1()) return;
|
|
3143
|
-
if (result.droppedDuplicateMedia > 0) logVerbose$1(`
|
|
3152
|
+
if (result.droppedDuplicateMedia > 0) logVerbose$1(`Superseded ${result.droppedDuplicateMedia} deferred WhatsApp attachment(s) with accepted replacement media`);
|
|
3144
3153
|
if (result.delivered > 0) logVerbose$1(`Flushed ${result.delivered} deferred media-only WhatsApp reply payload(s)`);
|
|
3145
3154
|
}
|
|
3146
3155
|
function resolveWhatsAppResponsePrefix(params) {
|
|
@@ -3202,7 +3211,8 @@ async function prepareWhatsAppInboundContext(params) {
|
|
|
3202
3211
|
from: conversationId,
|
|
3203
3212
|
sender: {
|
|
3204
3213
|
id: params.sender.id ?? params.sender.e164,
|
|
3205
|
-
name: params.sender.name
|
|
3214
|
+
name: params.sender.name,
|
|
3215
|
+
isSelf: params.msg.platform.fromMe === true
|
|
3206
3216
|
},
|
|
3207
3217
|
conversation: {
|
|
3208
3218
|
kind: conversationKind,
|
|
@@ -3330,7 +3340,8 @@ function createWhatsAppReplyPlan(params) {
|
|
|
3330
3340
|
replyLogger: params.replyLogger,
|
|
3331
3341
|
connectionId: params.connectionId,
|
|
3332
3342
|
skipLog: false,
|
|
3333
|
-
tableMode
|
|
3343
|
+
tableMode,
|
|
3344
|
+
onMediaAccepted: options?.onMediaAccepted
|
|
3334
3345
|
});
|
|
3335
3346
|
} catch (error) {
|
|
3336
3347
|
if (isWhatsAppVisibleDeliveryError(error) && !isChannelPartialDeliveryError(error)) throw createChannelPartialDeliveryError(error, {
|
|
@@ -3392,7 +3403,7 @@ function createWhatsAppReplyPlan(params) {
|
|
|
3392
3403
|
} : normalizedOutboundPayload;
|
|
3393
3404
|
const reply = resolveSendableOutboundReplyParts(normalizedDeliveryPayload);
|
|
3394
3405
|
if (!reply.hasMedia && !reply.text.trim()) return normalizedDeliveryPayload;
|
|
3395
|
-
const mediaUrls =
|
|
3406
|
+
const mediaUrls = new Set(normalizedDeliveryPayload.mediaUrls);
|
|
3396
3407
|
logWhatsAppMediaOnlyFlushResult(reply.hasMedia ? shouldDeferWhatsAppMediaOnlyPayload({
|
|
3397
3408
|
info,
|
|
3398
3409
|
mediaUrls,
|
|
@@ -3426,7 +3437,7 @@ function createWhatsAppReplyPlan(params) {
|
|
|
3426
3437
|
const reply = resolveSendableOutboundReplyParts(normalizedDeliveryPayload);
|
|
3427
3438
|
if (!reply.hasMedia && !reply.text.trim()) return whatsAppReplyDeliveryVisibility(false);
|
|
3428
3439
|
if (!reply.hasMedia) return await deliverNormalizedPayload(normalizedDeliveryPayload, info, { recordDelivery: false });
|
|
3429
|
-
const mediaUrls =
|
|
3440
|
+
const mediaUrls = new Set(normalizedDeliveryPayload.mediaUrls);
|
|
3430
3441
|
if (shouldDeferWhatsAppMediaOnlyPayload({
|
|
3431
3442
|
info,
|
|
3432
3443
|
mediaUrls,
|
|
@@ -3439,14 +3450,10 @@ function createWhatsAppReplyPlan(params) {
|
|
|
3439
3450
|
payload: normalizedDeliveryPayload
|
|
3440
3451
|
})
|
|
3441
3452
|
};
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
} catch (error) {
|
|
3447
|
-
if (isWhatsAppVisibleDeliveryError(error)) logWhatsAppMediaOnlyFlushResult(mediaOnlyCoalescer.dropDuplicateMedia(mediaUrls));
|
|
3448
|
-
throw error;
|
|
3449
|
-
}
|
|
3453
|
+
return await deliverNormalizedPayload(normalizedDeliveryPayload, info, { onMediaAccepted: (mediaUrl) => {
|
|
3454
|
+
didSendReply = true;
|
|
3455
|
+
logWhatsAppMediaOnlyFlushResult(mediaOnlyCoalescer.supersedeMedia(mediaUrl));
|
|
3456
|
+
} });
|
|
3450
3457
|
},
|
|
3451
3458
|
onDelivered: (payload, _info, result) => {
|
|
3452
3459
|
if (!resolveSendableOutboundReplyParts(payload).hasMedia && result?.visibleReplySent === true) recordDeliveredPayload(payload);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
|
|
3
3
|
import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
4
4
|
//#region extensions/whatsapp/src/question-reactions.ts
|
|
5
5
|
var question_reactions_exports = /* @__PURE__ */ __exportAll({
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { c as resolveWebCredsPath, r as hasWebCredsSync, s as resolveWebCredsBackupPath } from "./creds-files-W6B3EMZ8.js";
|
|
2
|
-
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-
|
|
3
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
2
|
+
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-YA_Yvunu.js";
|
|
3
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-C3S-NqyO.js";
|
|
4
4
|
import { a as setWhatsAppRuntime } from "./runtime-BLlToOi6.js";
|
|
5
5
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
6
|
-
import { t as createWhatsAppLoginTool } from "./agent-tools-login-
|
|
6
|
+
import { t as createWhatsAppLoginTool } from "./agent-tools-login-B-2qZPzc.js";
|
|
7
7
|
import { M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, _ as readWebSelfIdentity, a as formatWhatsAppWebAuthStatusState, b as restoreCredsFromBackupIfNeeded, c as logoutWeb, d as readWebAuthExistsBestEffort, f as readWebAuthExistsForDecision, g as readWebSelfId, h as readWebAuthState, j as waitForCredsSaveQueue, l as pickWebChannel, m as readWebAuthSnapshotBestEffort, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as getWebAuthAgeMs, p as readWebAuthSnapshot, r as WhatsAppAuthUnstableError, s as logWebSelfId, t as WA_WEB_AUTH_DIR, u as readCredsJsonRaw, v as readWebSelfIdentityForDecision, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-CtpBqH5S.js";
|
|
8
8
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
9
9
|
import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
|
|
10
10
|
import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./socket-close-2T0_jZTN.js";
|
|
11
11
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
12
|
-
import { p as extractText, s as extractContactContext, u as extractLocationData } from "./send-api-
|
|
13
|
-
import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./monitor-
|
|
14
|
-
import { t as loginWeb } from "./login-
|
|
12
|
+
import { p as extractText, s as extractContactContext, u as extractLocationData } from "./send-api-C-FFC1p_.js";
|
|
13
|
+
import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./monitor-CySzv38g.js";
|
|
14
|
+
import { t as loginWeb } from "./login-1u5WcfTn.js";
|
|
15
15
|
import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
|
|
16
16
|
export { DEFAULT_WEB_MEDIA_BYTES, HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, LocalMediaAccessError, SILENT_REPLY_TOKEN, WA_WEB_AUTH_DIR, WHATSAPP_AUTH_UNSTABLE_CODE, WhatsAppAuthUnstableError, createWaSocket, createWhatsAppLoginTool, extractContactContext, extractLocationData, extractText, formatError, formatWhatsAppWebAuthStatusState, getActiveWebListener, getDefaultLocalRoots, getStatusCode, getWebAuthAgeMs, handleWhatsAppAction, hasWebCredsSync, loadWebMedia, loadWebMediaRaw, logWebSelfId, loginWeb, logoutWeb, monitorWebChannel, monitorWebInbox, newConnectionId, optimizeImageToJpeg, optimizeImageToPng, pickWebChannel, readCredsJsonRaw, readWebAuthExistsBestEffort, readWebAuthExistsForDecision, readWebAuthSnapshot, readWebAuthSnapshotBestEffort, readWebAuthState, readWebSelfId, readWebSelfIdentity, readWebSelfIdentityForDecision, resetWebInboundDedupe, resolveDefaultWebAuthDir, resolveWebAccountId, resolveWebCredsBackupPath, resolveWebCredsPath, restoreCredsFromBackupIfNeeded, sendMessageWhatsApp, sendPollWhatsApp, sendReactionWhatsApp, sendTypingWhatsApp, setWhatsAppRuntime, startWebLoginWithQr, stripHeartbeatToken, waitForCredsSaveQueue, waitForCredsSaveQueueWithTimeout, waitForWaConnection, waitForWebLogin, webAuthExists, whatsAppActionRuntime, writeCredsJsonAtomically };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CeKQbu_s.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
3
3
|
import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
|
|
4
4
|
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
|
|
@@ -496,7 +496,7 @@ async function sendMessageWhatsAppInActivityScope(to, body, options) {
|
|
|
496
496
|
const accountIdForFormatting = resolvedAccountId ?? options.accountId;
|
|
497
497
|
const textLimit = Math.min(resolveTextChunkLimit(cfg, "whatsapp", accountIdForFormatting, { fallbackLimit: 4e3 }), 4096);
|
|
498
498
|
const textChunks = markdownToWhatsAppChunks(text, textLimit, tableMode, resolveChunkMode(cfg, "whatsapp", accountIdForFormatting));
|
|
499
|
-
text = textChunks.shift() ??
|
|
499
|
+
text = textChunks.shift() ?? text;
|
|
500
500
|
if (!text && !hasMedia) return {
|
|
501
501
|
messageId: "",
|
|
502
502
|
toJid: jid
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
|
|
2
|
-
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-
|
|
2
|
+
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-C3S-NqyO.js";
|
|
3
3
|
import "./normalize-C7Hkc_vE.js";
|
|
4
4
|
import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-TMk0lGuy.js";
|
|
5
5
|
import "./text-runtime-CaKLhowd.js";
|
|
6
|
-
import { i as buildQuotedMessageOptions } from "./group-session-key-
|
|
6
|
+
import { i as buildQuotedMessageOptions } from "./group-session-key-CH9jJIVQ.js";
|
|
7
7
|
import { k as resolveComparableIdentity } from "./auth-store-CtpBqH5S.js";
|
|
8
8
|
import { isRecord, normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -401,7 +401,7 @@ async function addWhatsAppImagePreviewFields(content) {
|
|
|
401
401
|
//#endregion
|
|
402
402
|
//#region extensions/whatsapp/src/inbound/outbound-mentions.ts
|
|
403
403
|
const CODE_FENCE_RE = /```[\s\S]*?```/g;
|
|
404
|
-
const INLINE_CODE_RE =
|
|
404
|
+
const INLINE_CODE_RE = /(?<=(?:^|[^\\])(?:\\\\)*)(`+)[\s\S]*?(?:(?<!`)\1(?!`)|$)/g;
|
|
405
405
|
const OUTBOUND_MENTION_RE = /@(\+?\d+)/g;
|
|
406
406
|
const KNOWN_USER_JID_RE = /^(\d+)(?::\d+)?@(s\.whatsapp\.net|hosted|lid|hosted\.lid|c\.us)$/i;
|
|
407
407
|
const PHONE_JID_DOMAIN_RE = /^(s\.whatsapp\.net|hosted|c\.us)$/i;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-CeKQbu_s.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
3
3
|
import { r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.js";
|
|
4
4
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-CugRyONv.js";
|
|
5
|
-
import { r as whatsappSetupAdapter } from "./shared-
|
|
6
|
-
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
5
|
+
import { r as whatsappSetupAdapter } from "./shared-D3B14d45.js";
|
|
7
6
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
7
|
+
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
8
8
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
|
9
9
|
const t = createSetupTranslator();
|
|
10
10
|
function trimPromptText(value) {
|
|
@@ -295,7 +295,7 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
295
295
|
};
|
|
296
296
|
let loginWeb;
|
|
297
297
|
try {
|
|
298
|
-
({loginWeb} = await import("./login-
|
|
298
|
+
({loginWeb} = await import("./login-1u5WcfTn.js").then((n) => n.n));
|
|
299
299
|
} catch (error) {
|
|
300
300
|
await reportLoginFailure(error);
|
|
301
301
|
}
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-CRJQiWbh.js";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as resolveWhatsAppAuthDir } from "./accounts-
|
|
1
|
+
import { o as resolveWhatsAppAuthDir } from "./accounts-CeKQbu_s.js";
|
|
2
2
|
import { t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
3
3
|
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-CtpBqH5S.js";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
@@ -36,7 +36,7 @@ const whatsappSetupWizard = {
|
|
|
36
36
|
},
|
|
37
37
|
resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
|
|
38
38
|
credentials: [],
|
|
39
|
-
finalize: async (params) => await (await import("./setup-finalize-
|
|
39
|
+
finalize: async (params) => await (await import("./setup-finalize-CRzMpx84.js")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-CeKQbu_s.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-CugRyONv.js";
|
|
4
4
|
import { t as WhatsAppChannelConfigSchema } from "./config-schema-BQP5YCeK.js";
|
|
@@ -27,7 +27,7 @@ async function readWhatsAppAccountLinkState(authDir) {
|
|
|
27
27
|
}
|
|
28
28
|
const loadWhatsAppChannelRuntime = createLazyRuntimeModule(async () => {
|
|
29
29
|
await loadWhatsAppAuthStore();
|
|
30
|
-
return await import("./channel.runtime-
|
|
30
|
+
return await import("./channel.runtime-D_PjmeMT.js");
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region extensions/whatsapp/src/config-accessors.ts
|
|
@@ -115,7 +115,7 @@ async function applyWhatsAppSecurityConfigFixes(params) {
|
|
|
115
115
|
//#region extensions/whatsapp/src/shared.ts
|
|
116
116
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
117
117
|
async function loadWhatsAppSetupSurface() {
|
|
118
|
-
return await import("./setup-surface-
|
|
118
|
+
return await import("./setup-surface-ym4doiv3.js");
|
|
119
119
|
}
|
|
120
120
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
121
121
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
@@ -2,7 +2,7 @@ import { proto } from '../../WAProto/index.js';
|
|
|
2
2
|
import { makeLibSignalRepository } from '../Signal/libsignal.js';
|
|
3
3
|
import { Browsers } from '../Utils/browser-utils.js';
|
|
4
4
|
import logger from '../Utils/logger.js';
|
|
5
|
-
const version = [2, 3000,
|
|
5
|
+
const version = [2, 3000, 1043857760];
|
|
6
6
|
export const UNAUTHORIZED_CODES = [401, 403, 419];
|
|
7
7
|
export const DEFAULT_ORIGIN = 'https://web.whatsapp.com';
|
|
8
8
|
export const CALL_VIDEO_PREFIX = 'https://call.whatsapp.com/video/';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/Socket/business.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAUnE,OAAO,EAAE,KAAK,UAAU,EAAqC,MAAM,aAAa,CAAA;AAIhF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY;;+BA8Od,MAAM,eAAe,MAAM;yCAjGjB,iBAAiB;;;;2BAmD/B,MAAM;;;4BAkIL,aAAa;gCAwCT,MAAM,EAAE;;;+BA9ET,MAAM,UAAU,aAAa;kCAxR1B,0BAA0B;8BA2E9B,aAAa;2BAoChB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/Socket/business.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAUnE,OAAO,EAAE,KAAK,UAAU,EAAqC,MAAM,aAAa,CAAA;AAIhF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY;;+BA8Od,MAAM,eAAe,MAAM;yCAjGjB,iBAAiB;;;;2BAmD/B,MAAM;;;4BAkIL,aAAa;gCAwCT,MAAM,EAAE;;;+BA9ET,MAAM,UAAU,aAAa;kCAxR1B,0BAA0B;8BA2E9B,aAAa;2BAoChB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsS6+nB,CAAC;;;;;;;;;0DAhXtgoB,GAAG,0BAChB,GAAH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8WF,CAAA"}
|
|
@@ -5,6 +5,7 @@ import type { QuickReplyAction } from '../Types/Bussines.js';
|
|
|
5
5
|
import type { LabelActionBody } from '../Types/Label.js';
|
|
6
6
|
import { type BinaryNode } from '../WABinary/index.js';
|
|
7
7
|
import { USyncQuery } from '../WAUSync/index.js';
|
|
8
|
+
export declare const buildProfilePictureQueryContent: (type: "preview" | "image", tcTokenContent?: BinaryNode[]) => BinaryNode[];
|
|
8
9
|
export declare const makeChatsSocket: (config: SocketConfig) => {
|
|
9
10
|
serverProps: {
|
|
10
11
|
/** AB prop 10518: gate tctoken on 1:1 messages. Default true (safe: avoids 463). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/Socket/chats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAGhB,iBAAiB,EAEjB,YAAY,EAEZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EAEb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAqBrD,OAAO,EACN,KAAK,UAAU,EAWf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAa,MAAM,YAAY,CAAA;AAGlD,eAAO,MAAM,eAAe,GAAI,QAAQ,YAAY;;QA8BlD,oFAAoF;;QAEpF,+EAA+E;;QAE/E,iFAAiF;;;
|
|
1
|
+
{"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/Socket/chats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAGhB,iBAAiB,EAEjB,YAAY,EAEZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EAEb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAqBrD,OAAO,EACN,KAAK,UAAU,EAWf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAa,MAAM,YAAY,CAAA;AAGlD,eAAO,MAAM,+BAA+B,GAC3C,MAAM,SAAS,GAAG,OAAO,EACzB,iBAAiB,UAAU,EAAE,KAC3B,UAAU,EAOZ,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,QAAQ,YAAY;;QA8BlD,oFAAoF;;QAEpF,+EAA+E;;QAE/E,iFAAiF;;;2BAkqB9C,OAAO,GAAG,OAAO,UAAU;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,cAAc,MAAM;;;;;;;;;;;;;;;;;;4BA2HnE,aAAa;+BArGV,UAAU,UAAU,MAAM;+BA8C1B,MAAM;6BAzGR,MAAM,SAAQ,SAAS,GAAG,OAAO,cAA0B,MAAM;;2BAjdnE,MAAM,EAAE;yCAaM,MAAM,EAAE;gCAepD,MAAM,WACF,aAAa,eACT;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;gCAmCN,MAAM;kCA0BJ,MAAM;8BAkBV,MAAM;6BAkBP,MAAM,UAAU,OAAO,GAAG,SAAS;2DAioBX,OAAO;+BAl1B7B,kBAAkB;mCAJd,sBAAsB;mCAQtB,cAAc;iCAIhB,oBAAoB;yCAIZ,cAAc;iCAItB,cAAc;uCAIR,mBAAmB;oCAItB,sBAAsB;8CAIZ,MAAM;8BAqPtB,MAAM,KAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;;sBAyjBxD,gBAAgB,OAAO,MAAM;2BAvgBlB,cAAc,GAAG,QAAQ,kBAAkB,MAAM,GAAG,MAAM;4BA0iB/D,MAAM,WAAW,KAAK,CAAC,eAAe,CAAC,cAAc;yBAYxD,MAAM;;oBAYX,MAAM,UAAU,eAAe;wBAc3B,MAAM,WAAW,MAAM;2BAcpB,MAAM,WAAW,MAAM;2BAcvB,MAAM,aAAa,MAAM,WAAW,MAAM;8BAevC,MAAM,aAAa,MAAM,WAAW,MAAM;gBAhGxD,MAAM,YAAY;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,QAAQ,OAAO;sCA+G7C,gBAAgB;kCAYpB,MAAM;;;;;;0DAjmC5B,GAAG,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA07C/C,CAAA"}
|