kage-baileys 3.0.6 → 3.2.3
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/Example/connection.cjs +4 -0
- package/README.MD +4726 -48
- package/WAProto/WAProto.proto +3395 -415
- package/WAProto/compat.cjs +12 -0
- package/WAProto/index.d.ts +47104 -19888
- package/WAProto/index.js +131979 -57361
- package/lib/Addon/http-error.js +43 -0
- package/lib/Addon/index.js +32 -0
- package/lib/Addon/keyed-db.js +250 -0
- package/lib/Addon/link-preview.js +82 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/connection.js +110 -0
- package/lib/Defaults/constants.js +156 -0
- package/lib/Defaults/history.js +46 -0
- package/lib/Defaults/index.js +230 -0
- package/lib/Defaults/media.js +104 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Defaults/prefix.js +44 -0
- package/lib/Extensions/business-advanced.js +382 -0
- package/lib/Extensions/business.js +159 -0
- package/lib/Extensions/chats-advanced.js +1106 -0
- package/lib/Extensions/chats.js +349 -0
- package/lib/Extensions/communities-advanced.js +430 -0
- package/lib/Extensions/community.js +94 -0
- package/lib/Extensions/groups-advanced.js +343 -0
- package/lib/Extensions/index.js +30 -0
- package/lib/Extensions/messages-recv-advanced.js +1690 -0
- package/lib/Extensions/messages-send-advanced.js +622 -0
- package/lib/Extensions/messages-send.js +1380 -0
- package/lib/Extensions/newsletter-advanced.js +228 -0
- package/lib/Extensions/newsletter.js +72 -0
- package/lib/Extensions/socket.js +389 -0
- package/lib/Modded/message_builder.js +2084 -4
- package/lib/Signal/Group/ciphertext-message.js +54 -0
- package/lib/Signal/Group/group-session-builder.js +124 -0
- package/lib/Signal/Group/group_cipher.js +216 -0
- package/lib/Signal/Group/index.js +124 -0
- package/lib/Signal/Group/keyhelper.js +108 -0
- package/lib/Signal/Group/sender-chain-key.js +83 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +157 -0
- package/lib/Signal/Group/sender-key-message.js +166 -0
- package/lib/Signal/Group/sender-key-name.js +130 -0
- package/lib/Signal/Group/sender-key-record.js +113 -0
- package/lib/Signal/Group/sender-key-state.js +208 -0
- package/lib/Signal/Group/sender-message-key.js +82 -0
- package/lib/Signal/libsignal.js +935 -0
- package/lib/Signal/lid-mapping.js +545 -1
- package/lib/Socket/Client/index.js +60 -0
- package/lib/Socket/Client/types.js +51 -0
- package/lib/Socket/Client/websocket.js +152 -0
- package/lib/Socket/business.js +831 -0
- package/lib/Socket/chats.js +2535 -49
- package/lib/Socket/communities.js +450 -1
- package/lib/Socket/community.js +1022 -0
- package/lib/Socket/dugong.js +1 -1
- package/lib/Socket/groups.js +747 -0
- package/lib/Socket/index.js +60 -2
- package/lib/Socket/messages-recv.js +3450 -5
- package/lib/Socket/messages-send.js +3123 -0
- package/lib/Socket/mex.js +126 -1
- package/lib/Socket/newsletter.js +465 -0
- package/lib/Socket/socket.js +2217 -1
- package/lib/Store/index.js +79 -0
- package/lib/Store/make-cache-manager-store.js +186 -0
- package/lib/Store/make-in-memory-store.js +878 -0
- package/lib/Store/make-ordered-dictionary.js +187 -0
- package/lib/Store/object-repository.js +78 -0
- package/lib/Types/Auth.js +25 -0
- package/lib/Types/Bussines.js +25 -1
- package/lib/Types/Call.js +25 -0
- package/lib/Types/Chat.js +39 -0
- package/lib/Types/Contact.js +25 -0
- package/lib/Types/Events.js +25 -0
- package/lib/Types/GroupMetadata.js +25 -0
- package/lib/Types/Label.js +76 -0
- package/lib/Types/LabelAssociation.js +40 -0
- package/lib/Types/Message.js +57 -0
- package/lib/Types/Mex.js +56 -1
- package/lib/Types/MexUpdates.js +46 -0
- package/lib/Types/Newsletter.js +56 -0
- package/lib/Types/Product.js +25 -0
- package/lib/Types/RichType.js +23 -0
- package/lib/Types/Signal.js +25 -0
- package/lib/Types/Socket.js +25 -0
- package/lib/Types/State.js +92 -0
- package/lib/Types/USync.js +25 -0
- package/lib/Types/index.js +133 -0
- package/lib/Utils/auth-utils.js +703 -0
- package/lib/Utils/automation-tools.js +51 -16
- package/lib/Utils/baileys-event-stream.js +146 -0
- package/lib/Utils/browser-utils.js +95 -0
- package/lib/Utils/business.js +525 -0
- package/lib/Utils/chat-utils.js +1861 -0
- package/lib/Utils/companion-reg-client-utils.js +55 -1
- package/lib/Utils/crypto.js +355 -0
- package/lib/Utils/decode-wa-message.js +709 -0
- package/lib/Utils/event-buffer.js +1323 -8
- package/lib/Utils/generics.js +945 -1
- package/lib/Utils/history.js +266 -0
- package/lib/Utils/identity-change-handler.js +62 -1
- package/lib/Utils/index.js +114 -0
- package/lib/Utils/link-preview.js +179 -0
- package/lib/Utils/logger.js +42 -0
- package/lib/Utils/lt-hash.js +73 -0
- package/lib/Utils/make-mutex.js +104 -0
- package/lib/Utils/message-inspector.js +110 -0
- package/lib/Utils/message-retry-manager.js +507 -2
- package/lib/Utils/messages-media.js +1931 -1
- package/lib/Utils/messages.js +3748 -0
- package/lib/Utils/noise-handler.js +423 -0
- package/lib/Utils/offline-node-processor.js +53 -1
- package/lib/Utils/pre-key-manager.js +255 -1
- package/lib/Utils/process-message.js +1592 -0
- package/lib/Utils/reporting-utils.js +272 -1
- package/lib/Utils/rich-message-utils.js +377 -0
- package/lib/Utils/rich-messages.js +1 -1
- package/lib/Utils/signal.js +437 -0
- package/lib/Utils/stanza-ack.js +51 -1
- package/lib/Utils/status-refresh.js +37 -0
- package/lib/Utils/status-tools.js +4 -2
- package/lib/Utils/sync-action-utils.js +63 -1
- package/lib/Utils/tc-token-utils.js +185 -1
- package/lib/Utils/terminal-banner.js +31 -0
- package/lib/Utils/use-multi-file-auth-state.js +271 -0
- package/lib/Utils/use-single-file-auth-state.js +108 -0
- package/lib/Utils/use-sqlite-auth-state.js +142 -0
- package/lib/Utils/validate-connection.js +497 -1
- package/lib/Utils/view-once-compat.js +13 -5
- package/lib/VoIP/audio-feeder.js +150 -0
- package/lib/VoIP/index.js +289 -0
- package/lib/VoIP/relay-transport.js +608 -0
- package/lib/VoIP/signaling.js +583 -0
- package/lib/VoIP/types.js +30 -0
- package/lib/VoIP/wasm-engine.js +1261 -2
- package/lib/VoIP/worker-bootstrap.js +1090 -2
- package/lib/WABinary/constants.js +2805 -0
- package/lib/WABinary/decode.js +649 -2
- package/lib/WABinary/encode.js +564 -2
- package/lib/WABinary/generic-utils.js +401 -0
- package/lib/WABinary/index.js +82 -0
- package/lib/WABinary/jid-utils.js +290 -0
- package/lib/WABinary/types.js +25 -0
- package/lib/WAM/BinaryInfo.js +50 -0
- package/lib/WAM/constants.js +45747 -0
- package/lib/WAM/encode.js +393 -0
- package/lib/WAM/index.js +78 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +135 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +110 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +142 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +85 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +69 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +107 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +38 -1
- package/lib/WAUSync/Protocols/index.js +83 -0
- package/lib/WAUSync/USyncQuery.js +241 -2
- package/lib/WAUSync/USyncUser.js +86 -0
- package/lib/WAUSync/index.js +78 -0
- package/lib/assets/wasm/loader.js +1875 -1
- package/lib/assets/wasm/worker-modules.js +11047 -1
- package/lib/index.d.ts +126 -0
- package/lib/index.js +53 -21
- package/lib/index.mjs +437 -0
- package/licenses/upstream-MIT.txt +22 -0
- package/maintenance/api-coverage.json +1642 -0
- package/maintenance/archivos-sha256.json +207 -0
- package/maintenance/consumer-validation.log +3 -0
- package/maintenance/dependency-audit.json +4 -4
- package/maintenance/extension-inventory.json +57 -0
- package/maintenance/protocol-update.json +1101 -0
- package/maintenance/protocol-wire-audit.json +4 -0
- package/maintenance/reference-socket-surface.json +209 -0
- package/maintenance/resumen-validacion.json +50 -0
- package/maintenance/validation.log +2725 -0
- package/maintenance/verification.json +566 -0
- package/package.json +107 -9
- package/scripts/check-imports.cjs +10 -0
- package/scripts/check-package.cjs +40 -0
- package/scripts/check-syntax.cjs +1 -1
- package/scripts/generate-protobuf.cjs +6 -1
- package/scripts/generate-public-types.cjs +9 -0
- package/scripts/kage-base64-fix.cjs +45 -0
- package/scripts/maintenance.cjs +10 -0
- package/test/advanced.test.cjs +24 -0
- package/test/base64-fix.test.cjs +49 -0
- package/test/maintenance.test.cjs +1 -1
- package/test/npm-publication.test.cjs +141 -0
- package/test/recepcion-reparada.test.cjs +98 -0
- package/test/resilience-binary.test.cjs +69 -0
- package/test/resilience-transport.test.cjs +34 -0
- package/test/types.test.ts +5 -0
- package/test/upgrade.test.cjs +104 -0
- package/tsconfig.json +20 -0
- package/WAProto/p.html +0 -1
- package/lib/KageExtra/Modded/message_builder.js +0 -2330
- package/lib/KageExtra/VoIP/audio-feeder.js +0 -136
- package/lib/KageExtra/VoIP/index.js +0 -282
- package/lib/KageExtra/VoIP/relay-transport.js +0 -559
- package/lib/KageExtra/VoIP/signaling.js +0 -603
- package/lib/KageExtra/VoIP/types.js +0 -17
- package/lib/KageExtra/VoIP/wasm-engine.js +0 -1214
- package/lib/KageExtra/VoIP/worker-bootstrap.js +0 -1042
- package/lib/KageExtra/assets/wasm/loader.js +0 -5
- package/lib/KageExtra/assets/wasm/whatsapp.wasm +0 -0
- package/lib/KageExtra/assets/wasm/worker-modules.js +0 -273
- package/lib/KageExtra/index.js +0 -3
- package/lib/KageExtra/package.json +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -53
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -24
- package/maintenance/revision-full-check.txt +0 -1097
- package/maintenance/revision-library-tests.tap +0 -1088
- package/maintenance/revision-protobuf.txt +0 -5
- package/maintenance/revision-syntax.txt +0 -5
- package/maintenance/schema-coverage.json +0 -23
- package/maintenance/schema-merge.json +0 -30
- package/maintenance/validation-node20.txt +0 -191
- package/maintenance/validation-node22.txt +0 -237
|
@@ -255,4 +255,275 @@ const encodeVarint = (value) => {
|
|
|
255
255
|
]
|
|
256
256
|
};
|
|
257
257
|
}; exports.getMessageReportingToken = getMessageReportingToken;
|
|
258
|
-
//#
|
|
258
|
+
//#
|
|
259
|
+
// Kage: funciones avanzadas.
|
|
260
|
+
const __kageModule183 = (() => {
|
|
261
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
262
|
+
"use strict";
|
|
263
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
264
|
+
exports.getMessageReportingToken = exports.shouldIncludeReportingToken = void 0;
|
|
265
|
+
const node_crypto_1 = require("node:crypto");
|
|
266
|
+
const crypto_js_1 = require("./crypto.js");
|
|
267
|
+
const reportingFields = [
|
|
268
|
+
{ f: 1 },
|
|
269
|
+
{
|
|
270
|
+
f: 3,
|
|
271
|
+
s: [{ f: 2 }, { f: 3 }, { f: 8 }, { f: 11 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }, { f: 25 }]
|
|
272
|
+
},
|
|
273
|
+
{ f: 4, s: [{ f: 1 }, { f: 16 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }] },
|
|
274
|
+
{ f: 5, s: [{ f: 3 }, { f: 4 }, { f: 5 }, { f: 16 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }] },
|
|
275
|
+
{ f: 6, s: [{ f: 1 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }, { f: 30 }] },
|
|
276
|
+
{ f: 7, s: [{ f: 2 }, { f: 7 }, { f: 10 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }, { f: 20 }] },
|
|
277
|
+
{ f: 8, s: [{ f: 2 }, { f: 7 }, { f: 9 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }, { f: 21 }] },
|
|
278
|
+
{ f: 9, s: [{ f: 2 }, { f: 6 }, { f: 7 }, { f: 13 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }, { f: 20 }] },
|
|
279
|
+
{ f: 12, s: [{ f: 1 }, { f: 2 }, { f: 14, m: true }, { f: 15 }] },
|
|
280
|
+
{ f: 18, s: [{ f: 6 }, { f: 16 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }] },
|
|
281
|
+
{ f: 26, s: [{ f: 4 }, { f: 5 }, { f: 8 }, { f: 13 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }] },
|
|
282
|
+
{ f: 28, s: [{ f: 1 }, { f: 2 }, { f: 4 }, { f: 5 }, { f: 6 }, { f: 7, s: [{ f: 21 }, { f: 22 }] }] },
|
|
283
|
+
{ f: 37, s: [{ f: 1, m: true }] },
|
|
284
|
+
{
|
|
285
|
+
f: 49,
|
|
286
|
+
s: [
|
|
287
|
+
{ f: 2 },
|
|
288
|
+
{ f: 3, s: [{ f: 1 }, { f: 2 }] },
|
|
289
|
+
{ f: 5, s: [{ f: 21 }, { f: 22 }] },
|
|
290
|
+
{ f: 8, s: [{ f: 1 }, { f: 2 }] }
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{ f: 53, s: [{ f: 1, m: true }] },
|
|
294
|
+
{ f: 55, s: [{ f: 1, m: true }] },
|
|
295
|
+
{ f: 58, s: [{ f: 1, m: true }] },
|
|
296
|
+
{ f: 59, s: [{ f: 1, m: true }] },
|
|
297
|
+
{
|
|
298
|
+
f: 60,
|
|
299
|
+
s: [
|
|
300
|
+
{ f: 2 },
|
|
301
|
+
{ f: 3, s: [{ f: 1 }, { f: 2 }] },
|
|
302
|
+
{ f: 5, s: [{ f: 21 }, { f: 22 }] },
|
|
303
|
+
{ f: 8, s: [{ f: 1 }, { f: 2 }] }
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
f: 64,
|
|
308
|
+
s: [
|
|
309
|
+
{ f: 2 },
|
|
310
|
+
{ f: 3, s: [{ f: 1 }, { f: 2 }] },
|
|
311
|
+
{ f: 5, s: [{ f: 21 }, { f: 22 }] },
|
|
312
|
+
{ f: 8, s: [{ f: 1 }, { f: 2 }] }
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
{ f: 66, s: [{ f: 2 }, { f: 6 }, { f: 7 }, { f: 13 }, { f: 17, s: [{ f: 21 }, { f: 22 }] }, { f: 20 }] },
|
|
316
|
+
{ f: 74, s: [{ f: 1, m: true }] },
|
|
317
|
+
{ f: 87, s: [{ f: 1, m: true }] },
|
|
318
|
+
{ f: 88, s: [{ f: 1 }, { f: 2, s: [{ f: 1 }] }, { f: 3, s: [{ f: 21 }, { f: 22 }] }] },
|
|
319
|
+
{ f: 92, s: [{ f: 1, m: true }] },
|
|
320
|
+
{ f: 93, s: [{ f: 1, m: true }] },
|
|
321
|
+
{ f: 94, s: [{ f: 1, m: true }] }
|
|
322
|
+
];
|
|
323
|
+
const compileReportingFields = (fields) => {
|
|
324
|
+
const map = new Map();
|
|
325
|
+
for (const f of fields) {
|
|
326
|
+
map.set(f.f, {
|
|
327
|
+
m: f.m,
|
|
328
|
+
children: f.s ? compileReportingFields(f.s) : undefined
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
return map;
|
|
332
|
+
};
|
|
333
|
+
const compiledReportingFields = compileReportingFields(reportingFields);
|
|
334
|
+
const EMPTY_MAP = new Map();
|
|
335
|
+
const ENC_SECRET_REPORT_TOKEN = 'Report Token';
|
|
336
|
+
const WIRE = {
|
|
337
|
+
VARINT: 0,
|
|
338
|
+
FIXED64: 1,
|
|
339
|
+
BYTES: 2,
|
|
340
|
+
FIXED32: 5
|
|
341
|
+
};
|
|
342
|
+
const shouldIncludeReportingToken = (message) => !message.reactionMessage &&
|
|
343
|
+
!message.encReactionMessage &&
|
|
344
|
+
!message.encEventResponseMessage &&
|
|
345
|
+
!message.pollUpdateMessage;
|
|
346
|
+
exports.shouldIncludeReportingToken = shouldIncludeReportingToken;
|
|
347
|
+
const generateMsgSecretKey = (modificationType, origMsgId, origMsgSender, modificationSender, origMsgSecret) => {
|
|
348
|
+
const useCaseSecret = Buffer.concat([
|
|
349
|
+
Buffer.from(origMsgId, 'utf8'),
|
|
350
|
+
Buffer.from(origMsgSender, 'utf8'),
|
|
351
|
+
Buffer.from(modificationSender, 'utf8'),
|
|
352
|
+
Buffer.from(modificationType, 'utf8')
|
|
353
|
+
]);
|
|
354
|
+
return (0, crypto_js_1.hkdf)(origMsgSecret, 32, { info: useCaseSecret.toString('latin1') });
|
|
355
|
+
};
|
|
356
|
+
const extractReportingTokenContent = (data, cfg) => {
|
|
357
|
+
const out = [];
|
|
358
|
+
let i = 0;
|
|
359
|
+
while (i < data.length) {
|
|
360
|
+
const tag = decodeVarint(data, i);
|
|
361
|
+
if (!tag.ok) {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
const fieldNum = tag.value >> 3;
|
|
365
|
+
const wireType = tag.value & 0x7;
|
|
366
|
+
const fieldStart = i;
|
|
367
|
+
i += tag.bytes;
|
|
368
|
+
const fieldCfg = cfg.get(fieldNum);
|
|
369
|
+
const pushSlice = (end) => {
|
|
370
|
+
if (end > data.length) {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
out.push({ num: fieldNum, bytes: data.subarray(fieldStart, end) });
|
|
374
|
+
i = end;
|
|
375
|
+
return true;
|
|
376
|
+
};
|
|
377
|
+
const skip = (end) => {
|
|
378
|
+
if (end > data.length) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
i = end;
|
|
382
|
+
return true;
|
|
383
|
+
};
|
|
384
|
+
if (wireType === WIRE.VARINT) {
|
|
385
|
+
const v = decodeVarint(data, i);
|
|
386
|
+
if (!v.ok) {
|
|
387
|
+
return null;
|
|
388
|
+
}
|
|
389
|
+
const end = i + v.bytes;
|
|
390
|
+
if (!fieldCfg) {
|
|
391
|
+
if (!skip(end)) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
if (!pushSlice(end)) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
if (wireType === WIRE.FIXED64) {
|
|
402
|
+
const end = i + 8;
|
|
403
|
+
if (!fieldCfg) {
|
|
404
|
+
if (!skip(end)) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (!pushSlice(end)) {
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
if (wireType === WIRE.FIXED32) {
|
|
415
|
+
const end = i + 4;
|
|
416
|
+
if (!fieldCfg) {
|
|
417
|
+
if (!skip(end)) {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
if (!pushSlice(end)) {
|
|
423
|
+
return null;
|
|
424
|
+
}
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (wireType === WIRE.BYTES) {
|
|
428
|
+
const len = decodeVarint(data, i);
|
|
429
|
+
if (!len.ok) {
|
|
430
|
+
return null;
|
|
431
|
+
}
|
|
432
|
+
const valStart = i + len.bytes;
|
|
433
|
+
const valEnd = valStart + len.value;
|
|
434
|
+
if (valEnd > data.length) {
|
|
435
|
+
return null;
|
|
436
|
+
}
|
|
437
|
+
if (!fieldCfg) {
|
|
438
|
+
i = valEnd;
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
if (fieldCfg.m || fieldCfg.children) {
|
|
442
|
+
const sub = extractReportingTokenContent(data.subarray(valStart, valEnd), fieldCfg.children ?? EMPTY_MAP);
|
|
443
|
+
if (sub === null) {
|
|
444
|
+
return null;
|
|
445
|
+
}
|
|
446
|
+
if (sub.length > 0) {
|
|
447
|
+
const newTag = encodeVarint(tag.value);
|
|
448
|
+
const newLen = encodeVarint(sub.length);
|
|
449
|
+
out.push({
|
|
450
|
+
num: fieldNum,
|
|
451
|
+
bytes: Buffer.concat([newTag, newLen, sub])
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
i = valEnd;
|
|
455
|
+
continue;
|
|
456
|
+
}
|
|
457
|
+
out.push({ num: fieldNum, bytes: data.subarray(fieldStart, valEnd) });
|
|
458
|
+
i = valEnd;
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
if (out.length === 0) {
|
|
464
|
+
return Buffer.alloc(0);
|
|
465
|
+
}
|
|
466
|
+
out.sort((a, b) => a.num - b.num);
|
|
467
|
+
return Buffer.concat(out.map(f => f.bytes));
|
|
468
|
+
};
|
|
469
|
+
const decodeVarint = (buffer, offset) => {
|
|
470
|
+
let value = 0;
|
|
471
|
+
let bytes = 0;
|
|
472
|
+
let shift = 0;
|
|
473
|
+
while (offset + bytes < buffer.length) {
|
|
474
|
+
const current = buffer[offset + bytes];
|
|
475
|
+
value |= (current & 0x7f) << shift;
|
|
476
|
+
bytes++;
|
|
477
|
+
if ((current & 0x80) === 0) {
|
|
478
|
+
return { value, bytes, ok: true };
|
|
479
|
+
}
|
|
480
|
+
shift += 7;
|
|
481
|
+
if (shift > 35) {
|
|
482
|
+
return { value: 0, bytes: 0, ok: false };
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return { value: 0, bytes: 0, ok: false };
|
|
486
|
+
};
|
|
487
|
+
const encodeVarint = (value) => {
|
|
488
|
+
const parts = [];
|
|
489
|
+
let remaining = value >>> 0;
|
|
490
|
+
while (remaining > 0x7f) {
|
|
491
|
+
parts.push((remaining & 0x7f) | 0x80);
|
|
492
|
+
remaining >>>= 7;
|
|
493
|
+
}
|
|
494
|
+
parts.push(remaining);
|
|
495
|
+
return Buffer.from(parts);
|
|
496
|
+
};
|
|
497
|
+
const getMessageReportingToken = async (msgProtobuf, message, key) => {
|
|
498
|
+
const msgSecret = message.messageContextInfo?.messageSecret;
|
|
499
|
+
if (!msgSecret || !key.id) {
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
const from = key.fromMe ? key.remoteJid : key.participant || key.remoteJid;
|
|
503
|
+
const to = key.fromMe ? key.participant || key.remoteJid : key.remoteJid;
|
|
504
|
+
const reportingSecret = generateMsgSecretKey(ENC_SECRET_REPORT_TOKEN, key.id, from, to, msgSecret);
|
|
505
|
+
const content = extractReportingTokenContent(msgProtobuf, compiledReportingFields);
|
|
506
|
+
if (!content || content.length === 0) {
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
const reportingToken = (0, node_crypto_1.createHmac)('sha256', reportingSecret).update(content).digest().subarray(0, 16);
|
|
510
|
+
return {
|
|
511
|
+
tag: 'reporting',
|
|
512
|
+
attrs: {},
|
|
513
|
+
content: [
|
|
514
|
+
{
|
|
515
|
+
tag: 'reporting_token',
|
|
516
|
+
attrs: { v: '2' },
|
|
517
|
+
content: reportingToken
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
exports.getMessageReportingToken = getMessageReportingToken;
|
|
523
|
+
|
|
524
|
+
return module.exports;
|
|
525
|
+
})();
|
|
526
|
+
for (const key of Object.keys(__kageModule183)) {
|
|
527
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule183[key]});
|
|
528
|
+
}
|
|
529
|
+
Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule183, configurable:true});
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapToBotForwardedMessage = exports.botMetadataCertificate = exports.botMetadataSignature = exports.prepareRichResponseMessage = exports.toUnified = exports.tokenizeCode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Kage: actualización de compatibilidad.
|
|
6
|
+
* Adds support for tables and code blocks with richResponseMessage (wrapped inside botForwardedMessage).
|
|
7
|
+
*
|
|
8
|
+
* If you use or copy this code, please credit my name or project. AND DO NOT CHANGE THIS NOTE
|
|
9
|
+
*/
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
|
+
const index_js_1 = require("../Defaults/index.js");
|
|
12
|
+
const constants_js_1 = require("../WABinary/constants.js");
|
|
13
|
+
const RichType_js_1 = require("../Types/RichType.js");
|
|
14
|
+
const index_js_2 = require("../../WAProto/index.js");
|
|
15
|
+
const NOOP = new Set([]);
|
|
16
|
+
const tokenizeCode = (code, language = 'javascript') => {
|
|
17
|
+
const keywords = constants_js_1.LANGUAGE_KEYWORDS[language] || NOOP;
|
|
18
|
+
const blocks = [];
|
|
19
|
+
index_js_1.LEXER_REGEX.lastIndex = 0;
|
|
20
|
+
let match;
|
|
21
|
+
while ((match = index_js_1.LEXER_REGEX.exec(code)) !== null) {
|
|
22
|
+
if (match[1]) {
|
|
23
|
+
blocks.push({ highlightType: RichType_js_1.CodeHighlightType.COMMENT, codeContent: match[1] });
|
|
24
|
+
}
|
|
25
|
+
else if (match[2]) {
|
|
26
|
+
blocks.push({ highlightType: RichType_js_1.CodeHighlightType.STRING, codeContent: match[2] });
|
|
27
|
+
}
|
|
28
|
+
else if (match[3]) {
|
|
29
|
+
blocks.push({
|
|
30
|
+
highlightType: keywords.has(match[3]) ? RichType_js_1.CodeHighlightType.KEYWORD : RichType_js_1.CodeHighlightType.METHOD,
|
|
31
|
+
codeContent: match[3],
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
else if (match[4]) {
|
|
35
|
+
blocks.push({
|
|
36
|
+
highlightType: keywords.has(match[4]) ? RichType_js_1.CodeHighlightType.KEYWORD : RichType_js_1.CodeHighlightType.DEFAULT,
|
|
37
|
+
codeContent: match[4],
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else if (match[5]) {
|
|
41
|
+
blocks.push({ highlightType: RichType_js_1.CodeHighlightType.NUMBER, codeContent: match[5] });
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
blocks.push({ highlightType: RichType_js_1.CodeHighlightType.DEFAULT, codeContent: match[6] });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return blocks;
|
|
48
|
+
};
|
|
49
|
+
exports.tokenizeCode = tokenizeCode;
|
|
50
|
+
// Kage: actualización de compatibilidad.
|
|
51
|
+
const toUnified = (submessages, uuid) => ({
|
|
52
|
+
response_id: uuid || (0, node_crypto_1.randomUUID)(),
|
|
53
|
+
sections: submessages.map((submessage, index) => {
|
|
54
|
+
switch (submessage.messageType) {
|
|
55
|
+
case RichType_js_1.RichSubMessageType.CODE:
|
|
56
|
+
const codeMetadata = submessage.codeMetadata;
|
|
57
|
+
return {
|
|
58
|
+
view_model: {
|
|
59
|
+
primitive: {
|
|
60
|
+
language: codeMetadata.codeLanguage,
|
|
61
|
+
code_blocks: codeMetadata.codeBlocks.map((block) => ({ content: block.codeContent, type: RichType_js_1.CodeHighlightType[block.highlightType] })),
|
|
62
|
+
__typename: 'GenAICodeUXPrimitive'
|
|
63
|
+
},
|
|
64
|
+
__typename: 'GenAISingleLayoutViewModel'
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
case RichType_js_1.RichSubMessageType.CONTENT_ITEMS:
|
|
68
|
+
return {};
|
|
69
|
+
case RichType_js_1.RichSubMessageType.INLINE_IMAGE:
|
|
70
|
+
return {};
|
|
71
|
+
case RichType_js_1.RichSubMessageType.LATEX:
|
|
72
|
+
return {};
|
|
73
|
+
case RichType_js_1.RichSubMessageType.TABLE:
|
|
74
|
+
const tableMetadata = submessage.tableMetadata;
|
|
75
|
+
return {
|
|
76
|
+
view_model: {
|
|
77
|
+
primitive: {
|
|
78
|
+
title: tableMetadata.title,
|
|
79
|
+
rows: tableMetadata.rows.map((row) => ({
|
|
80
|
+
is_header: row.isHeading,
|
|
81
|
+
cells: row.items,
|
|
82
|
+
markdown_cells: row.items.map((item) => ({ text: item }))
|
|
83
|
+
})),
|
|
84
|
+
__typename: 'GenATableUXPrimitive'
|
|
85
|
+
},
|
|
86
|
+
__typename: 'GenAISingleLayoutViewModel'
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
case RichType_js_1.RichSubMessageType.TEXT:
|
|
90
|
+
return {
|
|
91
|
+
view_model: {
|
|
92
|
+
primitive: {
|
|
93
|
+
text: submessage.messageText,
|
|
94
|
+
inline_entities: submessage.inlineEntities || [],
|
|
95
|
+
__typename: 'GenAIMarkdownTextUXPrimitive'
|
|
96
|
+
},
|
|
97
|
+
__typename: 'GenAISingleLayoutViewModel'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return submessage;
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
exports.toUnified = toUnified;
|
|
105
|
+
const prepareRichResponseMessage = (content) => {
|
|
106
|
+
const { alignment, code, contentText, disclaimerText, footerText, headerText, imageText, inlineImage, inlineVideo, items, language, latex, links, noHeading, posts, products, suggested, richResponse, table, tapLinkUrl, title } = content;
|
|
107
|
+
let submessages = [];
|
|
108
|
+
if (Array.isArray(richResponse)) {
|
|
109
|
+
submessages = richResponse.map((submessage) => {
|
|
110
|
+
if (submessage.text) {
|
|
111
|
+
return {
|
|
112
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
113
|
+
messageText: submessage.text,
|
|
114
|
+
inlineEntities: submessage.inlineEntities
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
else if (submessage.code) {
|
|
118
|
+
return {
|
|
119
|
+
messageType: RichType_js_1.RichSubMessageType.CODE,
|
|
120
|
+
codeMetadata: {
|
|
121
|
+
codeLanguage: submessage.language,
|
|
122
|
+
codeBlocks: submessage.code
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
else if (submessage.items) {
|
|
127
|
+
return {
|
|
128
|
+
messageType: RichType_js_1.RichSubMessageType.CONTENT_ITEMS,
|
|
129
|
+
contentItemsMetadata: {
|
|
130
|
+
itemsMetadata: submessage.items,
|
|
131
|
+
contentType: index_js_2.proto.AIRichResponseContentItemsMetadata.ContentType.CAROUSEL
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
else if (submessage.inlineImage) {
|
|
136
|
+
return {
|
|
137
|
+
messageType: RichType_js_1.RichSubMessageType.INLINE_IMAGE,
|
|
138
|
+
imageMetadata: {
|
|
139
|
+
imageUrl: submessage.inlineImage,
|
|
140
|
+
imageText: submessage.imageText,
|
|
141
|
+
alignment: submessage.alignment,
|
|
142
|
+
tapLinkUrl: submessage.tapLinkUrl
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
else if (submessage.inlineVideo) {
|
|
147
|
+
return {
|
|
148
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
149
|
+
messageText: 'INLINE_VIDEO'
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
else if (submessage.latex) {
|
|
153
|
+
return {
|
|
154
|
+
messageType: RichType_js_1.RichSubMessageType.LATEX,
|
|
155
|
+
latexMetadata: {
|
|
156
|
+
text: submessage.text,
|
|
157
|
+
expressions: submessage.latex
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
else if (submessage.posts) {
|
|
162
|
+
return {
|
|
163
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
164
|
+
messageText: 'POSTS'
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
else if (submessage.products) {
|
|
168
|
+
return {
|
|
169
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
170
|
+
messageText: 'PRODUCTS'
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
else if (submessage.suggested) {
|
|
174
|
+
return {
|
|
175
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
176
|
+
messageText: 'SUGGESTED_PROMPT'
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
else if (submessage.table) {
|
|
180
|
+
return {
|
|
181
|
+
messageType: RichType_js_1.RichSubMessageType.TABLE,
|
|
182
|
+
tableMetadata: {
|
|
183
|
+
title: submessage.title,
|
|
184
|
+
rows: submessage.table
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return submessage;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
if (headerText) {
|
|
193
|
+
submessages.push({
|
|
194
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
195
|
+
messageText: headerText
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
if (contentText) {
|
|
199
|
+
submessages.push({
|
|
200
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
201
|
+
messageText: contentText
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
if (code) {
|
|
205
|
+
language || (language = 'javascript');
|
|
206
|
+
submessages.push({
|
|
207
|
+
messageType: RichType_js_1.RichSubMessageType.CODE,
|
|
208
|
+
codeMetadata: {
|
|
209
|
+
codeLanguage: language,
|
|
210
|
+
codeBlocks: (0, exports.tokenizeCode)(code, language)
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
if (items) {
|
|
215
|
+
submessages.push({
|
|
216
|
+
messageType: RichType_js_1.RichSubMessageType.CONTENT_ITEMS,
|
|
217
|
+
contentItemsMetadata: {
|
|
218
|
+
itemsMetadata: items,
|
|
219
|
+
contentType: index_js_2.proto.AIRichResponseContentItemsMetadata.ContentType.CAROUSEL
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
if (inlineImage) {
|
|
224
|
+
submessages.push({
|
|
225
|
+
messageType: RichType_js_1.RichSubMessageType.INLINE_IMAGE,
|
|
226
|
+
imageMetadata: {
|
|
227
|
+
imageUrl: inlineImage,
|
|
228
|
+
imageText,
|
|
229
|
+
alignment,
|
|
230
|
+
tapLinkUrl
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
if (inlineVideo) {
|
|
235
|
+
submessages.push({
|
|
236
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
237
|
+
messageText: 'INLINE_VIDEO'
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
if (latex) {
|
|
241
|
+
submessages.push({
|
|
242
|
+
messageType: RichType_js_1.RichSubMessageType.LATEX,
|
|
243
|
+
latexMetadata: {
|
|
244
|
+
text,
|
|
245
|
+
expressions: latex
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
if (links) {
|
|
250
|
+
links.forEach((linkField, index) => {
|
|
251
|
+
const prefix = 'SS_' + index;
|
|
252
|
+
const url = linkField.url || index_js_1.DONATE_URL;
|
|
253
|
+
const sources = linkField.sources?.map((sourceField) => ({
|
|
254
|
+
source_type: 'THIRD_PARTY',
|
|
255
|
+
source_display_name: sourceField.displayName || 'Donate',
|
|
256
|
+
source_subtitle: sourceField.subtitle || 'Saweria',
|
|
257
|
+
source_url: sourceField.url || url
|
|
258
|
+
}));
|
|
259
|
+
submessages.push({
|
|
260
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
261
|
+
messageText: linkField.text + ` {{${prefix}}}¹{{/${prefix}}} `,
|
|
262
|
+
inlineEntities: [{
|
|
263
|
+
key: prefix,
|
|
264
|
+
metadata: {
|
|
265
|
+
reference_id: index + 1,
|
|
266
|
+
reference_url: url,
|
|
267
|
+
reference_title: linkField.title || 'For Donation via Saweria',
|
|
268
|
+
reference_display_name: linkField.displayName || 'Donation',
|
|
269
|
+
sources: sources || [],
|
|
270
|
+
__typename: 'GenAISearchCitationItem'
|
|
271
|
+
}
|
|
272
|
+
}]
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
if (posts) {
|
|
277
|
+
submessages.push({
|
|
278
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
279
|
+
messageText: 'POSTS'
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
if (products) {
|
|
283
|
+
submessages.push({
|
|
284
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
285
|
+
messageText: 'PRODUCTS'
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
if (suggested) {
|
|
289
|
+
submessages.push({
|
|
290
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
291
|
+
messageText: 'SUGGESTED_PROMPT'
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
if (table) {
|
|
295
|
+
submessages.push({
|
|
296
|
+
messageType: RichType_js_1.RichSubMessageType.TABLE,
|
|
297
|
+
tableMetadata: {
|
|
298
|
+
title,
|
|
299
|
+
rows: table.map((items, index) => ({
|
|
300
|
+
isHeading: !noHeading && index == 0,
|
|
301
|
+
items
|
|
302
|
+
}))
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
if (footerText) {
|
|
307
|
+
submessages.push({
|
|
308
|
+
messageType: RichType_js_1.RichSubMessageType.TEXT,
|
|
309
|
+
messageText: footerText
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
const uuid = (0, node_crypto_1.randomUUID)();
|
|
314
|
+
const unified = (0, exports.toUnified)(submessages, uuid);
|
|
315
|
+
const richResponseMessage = index_js_2.proto.AIRichResponseMessage.create({
|
|
316
|
+
submessages,
|
|
317
|
+
messageType: index_js_2.proto.AIRichResponseMessageType.AI_RICH_RESPONSE_TYPE_STANDARD,
|
|
318
|
+
unifiedResponse: {
|
|
319
|
+
data: index_js_1.TEXT_ENCODER.encode(JSON.stringify(unified)) // Kage: nota de compatibilidad.
|
|
320
|
+
},
|
|
321
|
+
contextInfo: {
|
|
322
|
+
isForwarded: true,
|
|
323
|
+
forwardingScore: 1,
|
|
324
|
+
forwardedAiBotMessageInfo: { botJid: '867051314767696@bot' },
|
|
325
|
+
forwardOrigin: 4
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
const message = (0, exports.wrapToBotForwardedMessage)(richResponseMessage);
|
|
329
|
+
const botMetadata = message.messageContextInfo.botMetadata;
|
|
330
|
+
// Kage: nota de compatibilidad.
|
|
331
|
+
if (disclaimerText) {
|
|
332
|
+
botMetadata.messageDisclaimerText = disclaimerText;
|
|
333
|
+
}
|
|
334
|
+
// Kage: nota de compatibilidad.
|
|
335
|
+
botMetadata.botResponseId = uuid;
|
|
336
|
+
return message;
|
|
337
|
+
};
|
|
338
|
+
exports.prepareRichResponseMessage = prepareRichResponseMessage;
|
|
339
|
+
// Kage: nota de compatibilidad.
|
|
340
|
+
const botMetadataSignature = () => {
|
|
341
|
+
const signature = new Uint8Array(64);
|
|
342
|
+
(0, node_crypto_1.getRandomValues)(signature);
|
|
343
|
+
return signature;
|
|
344
|
+
};
|
|
345
|
+
exports.botMetadataSignature = botMetadataSignature;
|
|
346
|
+
const botMetadataCertificate = (length = 685) => {
|
|
347
|
+
const certificate = new Uint8Array(length);
|
|
348
|
+
certificate[0] = 48;
|
|
349
|
+
certificate[1] = 130;
|
|
350
|
+
(0, node_crypto_1.getRandomValues)(certificate.subarray(2));
|
|
351
|
+
return certificate;
|
|
352
|
+
};
|
|
353
|
+
exports.botMetadataCertificate = botMetadataCertificate;
|
|
354
|
+
const wrapToBotForwardedMessage = (richResponseMessage) => ({
|
|
355
|
+
messageContextInfo: {
|
|
356
|
+
botMetadata: {
|
|
357
|
+
// Kage: nota de compatibilidad.
|
|
358
|
+
verificationMetadata: {
|
|
359
|
+
proofs: [
|
|
360
|
+
{
|
|
361
|
+
certificateChain: [
|
|
362
|
+
(0, exports.botMetadataCertificate)(),
|
|
363
|
+
(0, exports.botMetadataCertificate)(892)
|
|
364
|
+
],
|
|
365
|
+
version: 1,
|
|
366
|
+
useCase: 1,
|
|
367
|
+
signature: (0, exports.botMetadataSignature)()
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
botForwardedMessage: {
|
|
374
|
+
message: { richResponseMessage }
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
exports.wrapToBotForwardedMessage = wrapToBotForwardedMessage;
|