cuki-bailx 1.2.4 → 1.2.6
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/LICENSE +21 -0
- package/WAProto/GenerateStatics.sh +4 -0
- package/WAProto/WAProto.proto +4775 -0
- package/WAProto/index.js +56886 -17506
- package/engine-requirements.js +1 -1
- package/lib/Defaults/index.js +98 -108
- package/lib/Defaults/vyzen-baileysx-version.json +3 -0
- package/lib/Signal/libsignal.js +2 -0
- package/lib/Socket/Client/index.js +2 -3
- package/lib/Socket/Client/{web-socket-client.js → websocket.js} +54 -5
- package/lib/Socket/chats.js +224 -173
- package/lib/Socket/groups.js +20 -5
- package/lib/Socket/index.js +2 -2
- package/lib/Socket/messages-recv.js +10 -66
- package/lib/Socket/messages-send.js +379 -312
- package/lib/Socket/newsletter.js +54 -40
- package/lib/Socket/socket.js +58 -32
- package/lib/Store/index.js +1 -3
- package/lib/Store/make-in-memory-store.js +27 -15
- package/lib/Store/make-ordered-dictionary.js +2 -2
- package/lib/Types/Label.js +1 -1
- package/lib/Types/LabelAssociation.js +1 -1
- package/lib/Types/Message.js +0 -2
- package/lib/Types/Newsletter.js +3 -17
- package/lib/Types/index.js +2 -2
- package/lib/Utils/auth-utils.js +6 -13
- package/lib/Utils/baileys-event-stream.js +1 -1
- package/lib/Utils/browser-utils.js +35 -0
- package/lib/Utils/business.js +2 -2
- package/lib/Utils/chat-utils.js +36 -35
- package/lib/Utils/crypto.js +71 -29
- package/lib/Utils/decode-wa-message.js +65 -56
- package/lib/Utils/event-buffer.js +13 -9
- package/lib/Utils/generics.js +107 -29
- package/lib/Utils/history.js +4 -6
- package/lib/Utils/index.js +2 -0
- package/lib/Utils/link-preview.js +34 -1
- package/lib/Utils/lt-hash.js +6 -6
- package/lib/Utils/message-retry-manager.js +128 -0
- package/lib/Utils/messages-media.js +263 -115
- package/lib/Utils/messages.js +500 -93
- package/lib/Utils/noise-handler.js +18 -23
- package/lib/Utils/process-message.js +108 -25
- package/lib/Utils/signal.js +37 -35
- package/lib/Utils/use-multi-file-auth-state.js +51 -6
- package/lib/Utils/validate-connection.js +90 -66
- package/lib/WABinary/constants.js +1276 -13
- package/lib/WABinary/decode.js +26 -13
- package/lib/WABinary/encode.js +39 -17
- package/lib/WABinary/generic-utils.js +2 -85
- package/lib/WABinary/jid-utils.js +28 -5
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
- package/lib/index.js +18 -5
- package/package.json +109 -104
- package/lib/Defaults/baileys-version.json +0 -3
- package/lib/Defaults/index.d.ts +0 -53
- package/lib/Defaults/phonenumber-mcc.json +0 -223
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
- package/lib/Signal/Group/group-session-builder.d.ts +0 -14
- package/lib/Signal/Group/group_cipher.d.ts +0 -17
- package/lib/Signal/Group/index.d.ts +0 -11
- package/lib/Signal/Group/keyhelper.d.ts +0 -10
- package/lib/Signal/Group/queue-job.d.ts +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -13
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -16
- package/lib/Signal/Group/sender-key-message.d.ts +0 -18
- package/lib/Signal/Group/sender-key-name.d.ts +0 -17
- package/lib/Signal/Group/sender-key-record.d.ts +0 -30
- package/lib/Signal/Group/sender-key-state.d.ts +0 -38
- package/lib/Signal/Group/sender-message-key.d.ts +0 -11
- package/lib/Signal/libsignal.d.ts +0 -3
- package/lib/Socket/Client/abstract-socket-client.d.ts +0 -17
- package/lib/Socket/Client/index.d.ts +0 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
- package/lib/Socket/Client/mobile-socket-client.js +0 -65
- package/lib/Socket/Client/web-socket-client.d.ts +0 -12
- package/lib/Socket/business.d.ts +0 -171
- package/lib/Socket/chats.d.ts +0 -80
- package/lib/Socket/dugong.d.ts +0 -219
- package/lib/Socket/dugong.js +0 -441
- package/lib/Socket/groups.d.ts +0 -115
- package/lib/Socket/index.d.ts +0 -173
- package/lib/Socket/messages-recv.d.ts +0 -161
- package/lib/Socket/messages-send.d.ts +0 -149
- package/lib/Socket/newsletter.d.ts +0 -134
- package/lib/Socket/registration.d.ts +0 -267
- package/lib/Socket/registration.js +0 -166
- package/lib/Socket/socket.d.ts +0 -43
- package/lib/Socket/socket.js.bak +0 -630
- package/lib/Socket/usync.d.ts +0 -36
- package/lib/Store/index.d.ts +0 -3
- package/lib/Store/make-cache-manager-store.d.ts +0 -13
- package/lib/Store/make-cache-manager-store.js +0 -83
- package/lib/Store/make-in-memory-store.d.ts +0 -118
- package/lib/Store/make-ordered-dictionary.d.ts +0 -13
- package/lib/Store/object-repository.d.ts +0 -10
- package/lib/Types/Auth.d.ts +0 -110
- package/lib/Types/Call.d.ts +0 -13
- package/lib/Types/Chat.d.ts +0 -102
- package/lib/Types/Contact.d.ts +0 -19
- package/lib/Types/Events.d.ts +0 -157
- package/lib/Types/GroupMetadata.d.ts +0 -55
- package/lib/Types/Label.d.ts +0 -35
- package/lib/Types/LabelAssociation.d.ts +0 -29
- package/lib/Types/Message.d.ts +0 -273
- package/lib/Types/Newsletter.d.ts +0 -92
- package/lib/Types/Product.d.ts +0 -78
- package/lib/Types/Signal.d.ts +0 -57
- package/lib/Types/Socket.d.ts +0 -111
- package/lib/Types/State.d.ts +0 -27
- package/lib/Types/USync.d.ts +0 -25
- package/lib/Types/index.d.ts +0 -57
- package/lib/Utils/auth-utils.d.ts +0 -18
- package/lib/Utils/baileys-event-stream.d.ts +0 -16
- package/lib/Utils/business.d.ts +0 -22
- package/lib/Utils/chat-utils.d.ts +0 -71
- package/lib/Utils/crypto.d.ts +0 -41
- package/lib/Utils/decode-wa-message.d.ts +0 -19
- package/lib/Utils/event-buffer.d.ts +0 -35
- package/lib/Utils/generics.d.ts +0 -92
- package/lib/Utils/history.d.ts +0 -15
- package/lib/Utils/index.d.ts +0 -17
- package/lib/Utils/link-preview.d.ts +0 -21
- package/lib/Utils/logger.d.ts +0 -4
- package/lib/Utils/lt-hash.d.ts +0 -12
- package/lib/Utils/make-mutex.d.ts +0 -7
- package/lib/Utils/messages-media.d.ts +0 -116
- package/lib/Utils/messages.d.ts +0 -77
- package/lib/Utils/noise-handler.d.ts +0 -21
- package/lib/Utils/process-message.d.ts +0 -41
- package/lib/Utils/signal.d.ts +0 -32
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
- package/lib/Utils/validate-connection.d.ts +0 -11
- package/lib/WABinary/constants.d.ts +0 -27
- package/lib/WABinary/decode.d.ts +0 -7
- package/lib/WABinary/encode.d.ts +0 -3
- package/lib/WABinary/generic-utils.d.ts +0 -16
- package/lib/WABinary/index.d.ts +0 -5
- package/lib/WABinary/jid-utils.d.ts +0 -31
- package/lib/WABinary/types.d.ts +0 -18
- package/lib/WAM/BinaryInfo.d.ts +0 -17
- package/lib/WAM/constants.d.ts +0 -38
- package/lib/WAM/encode.d.ts +0 -3
- package/lib/WAM/index.d.ts +0 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -9
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -22
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -12
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -12
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -25
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -8
- package/lib/WAUSync/Protocols/index.d.ts +0 -4
- package/lib/WAUSync/USyncQuery.d.ts +0 -28
- package/lib/WAUSync/USyncUser.d.ts +0 -12
- package/lib/WAUSync/index.d.ts +0 -3
- package/lib/index.d.ts +0 -12
- package/lib/index.js.bak +0 -48
- /package/lib/Socket/Client/{abstract-socket-client.js → types.js} +0 -0
|
@@ -15,23 +15,47 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
37
|
};
|
|
25
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getStatusCodeForMediaRetry = exports.decryptMediaRetryData = exports.decodeMediaRetryNode = exports.encryptMediaRetryRequest = exports.getWAUploadToServer = exports.
|
|
39
|
+
exports.getStatusCodeForMediaRetry = exports.decryptMediaRetryData = exports.decodeMediaRetryNode = exports.encryptMediaRetryRequest = exports.getWAUploadToServer = exports.downloadEncryptedContent = exports.downloadContentFromMessage = exports.getUrlFromDirectPath = exports.encryptedStream = exports.prepareStream = exports.getHttpStream = exports.getStream = exports.toBuffer = exports.toReadable = exports.mediaMessageSHA256B64 = exports.generateProfilePicture = exports.encodeBase64EncodedStringForUpload = exports.extractImageThumb = exports.extractVideoThumb = exports.hkdfInfoKey = void 0;
|
|
40
|
+
exports.getMediaKeys = getMediaKeys;
|
|
41
|
+
exports.uploadFile = uploadFile;
|
|
42
|
+
exports.vid2jpg = vid2jpg;
|
|
43
|
+
exports.getAudioDuration = getAudioDuration;
|
|
44
|
+
exports.getAudioWaveform = getAudioWaveform;
|
|
45
|
+
exports.generateThumbnail = generateThumbnail;
|
|
46
|
+
exports.extensionForMediaMessage = extensionForMediaMessage;
|
|
27
47
|
const boom_1 = require("@hapi/boom");
|
|
28
|
-
const
|
|
48
|
+
const axios_1 = __importDefault(require("axios"));
|
|
49
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
50
|
+
const cheerio = __importStar(require("cheerio"));
|
|
29
51
|
const Crypto = __importStar(require("crypto"));
|
|
30
52
|
const events_1 = require("events");
|
|
31
53
|
const fs_1 = require("fs");
|
|
32
54
|
const os_1 = require("os");
|
|
33
55
|
const path_1 = require("path");
|
|
56
|
+
const jimp_1 = __importDefault(require("jimp"));
|
|
34
57
|
const stream_1 = require("stream");
|
|
58
|
+
const child_process_1 = require("child_process");
|
|
35
59
|
const WAProto_1 = require("../../WAProto");
|
|
36
60
|
const Defaults_1 = require("../Defaults");
|
|
37
61
|
const WABinary_1 = require("../WABinary");
|
|
@@ -41,13 +65,11 @@ const getTmpFilesDirectory = () => (0, os_1.tmpdir)();
|
|
|
41
65
|
const getImageProcessingLibrary = async () => {
|
|
42
66
|
const [_jimp, sharp] = await Promise.all([
|
|
43
67
|
(async () => {
|
|
44
|
-
const jimp = await (
|
|
45
|
-
.catch(() => { }));
|
|
68
|
+
const jimp = await (Promise.resolve().then(() => __importStar(require('jimp'))).catch(() => { }));
|
|
46
69
|
return jimp;
|
|
47
70
|
})(),
|
|
48
71
|
(async () => {
|
|
49
|
-
const sharp = await (
|
|
50
|
-
.catch(() => { }));
|
|
72
|
+
const sharp = await (Promise.resolve().then(() => __importStar(require('sharp'))).catch(() => { }));
|
|
51
73
|
return sharp;
|
|
52
74
|
})()
|
|
53
75
|
]);
|
|
@@ -66,7 +88,7 @@ const hkdfInfoKey = (type) => {
|
|
|
66
88
|
};
|
|
67
89
|
exports.hkdfInfoKey = hkdfInfoKey;
|
|
68
90
|
/** generates all the keys required to encrypt/decrypt & sign a media message */
|
|
69
|
-
function getMediaKeys(buffer, mediaType) {
|
|
91
|
+
async function getMediaKeys(buffer, mediaType) {
|
|
70
92
|
if (!buffer) {
|
|
71
93
|
throw new boom_1.Boom('Cannot derive from empty media key');
|
|
72
94
|
}
|
|
@@ -74,26 +96,183 @@ function getMediaKeys(buffer, mediaType) {
|
|
|
74
96
|
buffer = Buffer.from(buffer.replace('data:;base64,', ''), 'base64');
|
|
75
97
|
}
|
|
76
98
|
// expand using HKDF to 112 bytes, also pass in the relevant app info
|
|
77
|
-
const expandedMediaKey = (0, crypto_1.hkdf)(buffer, 112, { info: (0, exports.hkdfInfoKey)(mediaType) });
|
|
99
|
+
const expandedMediaKey = await (0, crypto_1.hkdf)(buffer, 112, { info: (0, exports.hkdfInfoKey)(mediaType) });
|
|
78
100
|
return {
|
|
79
101
|
iv: expandedMediaKey.slice(0, 16),
|
|
80
102
|
cipherKey: expandedMediaKey.slice(16, 48),
|
|
81
103
|
macKey: expandedMediaKey.slice(48, 80),
|
|
82
104
|
};
|
|
83
105
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
106
|
+
async function uploadFile(buffer, logger) {
|
|
107
|
+
const { fromBuffer } = await Promise.resolve().then(() => __importStar(require('file-type')));
|
|
108
|
+
const fileType = await fromBuffer(buffer);
|
|
109
|
+
if (!fileType)
|
|
110
|
+
throw new Error("Failed to detect file type.");
|
|
111
|
+
const { ext, mime } = fileType;
|
|
112
|
+
const services = [
|
|
113
|
+
{
|
|
114
|
+
name: "catbox",
|
|
115
|
+
url: "https://catbox.moe/user/api.php",
|
|
116
|
+
buildForm: () => {
|
|
117
|
+
const form = new form_data_1.default();
|
|
118
|
+
form.append("fileToUpload", buffer, {
|
|
119
|
+
filename: `file.${ext}`,
|
|
120
|
+
contentType: mime || "application/octet-stream"
|
|
121
|
+
});
|
|
122
|
+
form.append("reqtype", "fileupload");
|
|
123
|
+
return form;
|
|
124
|
+
},
|
|
125
|
+
parseResponse: res => res.data
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "pdi.moe",
|
|
129
|
+
url: "https://scdn.pdi.moe/upload",
|
|
130
|
+
buildForm: () => {
|
|
131
|
+
const form = new form_data_1.default();
|
|
132
|
+
form.append("file", buffer, {
|
|
133
|
+
filename: `file.${ext}`,
|
|
134
|
+
contentType: mime
|
|
135
|
+
});
|
|
136
|
+
return form;
|
|
137
|
+
},
|
|
138
|
+
parseResponse: res => res.data.result.url
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "qu.ax",
|
|
142
|
+
url: "https://qu.ax/upload.php",
|
|
143
|
+
buildForm: () => {
|
|
144
|
+
const form = new form_data_1.default();
|
|
145
|
+
form.append("files[]", buffer, {
|
|
146
|
+
filename: `file.${ext}`,
|
|
147
|
+
contentType: mime || "application/octet-stream"
|
|
148
|
+
});
|
|
149
|
+
return form;
|
|
150
|
+
},
|
|
151
|
+
parseResponse: res => {
|
|
152
|
+
var _a, _b, _c;
|
|
153
|
+
if (!((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.url))
|
|
154
|
+
throw new Error("Failed to get URL from qu.ax");
|
|
155
|
+
return res.data.files[0].url;
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "uguu.se",
|
|
160
|
+
url: "https://uguu.se/upload.php",
|
|
161
|
+
buildForm: () => {
|
|
162
|
+
const form = new form_data_1.default();
|
|
163
|
+
form.append("files[]", buffer, {
|
|
164
|
+
filename: `file.${ext}`,
|
|
165
|
+
contentType: mime || "application/octet-stream"
|
|
166
|
+
});
|
|
167
|
+
return form;
|
|
168
|
+
},
|
|
169
|
+
parseResponse: res => {
|
|
170
|
+
var _a, _b, _c;
|
|
171
|
+
if (!((_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.url))
|
|
172
|
+
throw new Error("Failed to get URL from uguu.se");
|
|
173
|
+
return res.data.files[0].url;
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "tmpfiles",
|
|
178
|
+
url: "https://tmpfiles.org/api/v1/upload",
|
|
179
|
+
buildForm: () => {
|
|
180
|
+
const form = new form_data_1.default();
|
|
181
|
+
form.append("file", buffer, {
|
|
182
|
+
filename: `file.${ext}`,
|
|
183
|
+
contentType: mime
|
|
184
|
+
});
|
|
185
|
+
return form;
|
|
186
|
+
},
|
|
187
|
+
parseResponse: res => {
|
|
188
|
+
const match = res.data.data.url.match(/https:\/\/tmpfiles\.org\/(.*)/);
|
|
189
|
+
if (!match)
|
|
190
|
+
throw new Error("Failed to parse tmpfiles URL.");
|
|
191
|
+
return `https://tmpfiles.org/dl/${match[1]}`;
|
|
192
|
+
}
|
|
91
193
|
}
|
|
92
|
-
|
|
93
|
-
|
|
194
|
+
];
|
|
195
|
+
for (const service of services) {
|
|
196
|
+
try {
|
|
197
|
+
const form = service.buildForm();
|
|
198
|
+
const res = await axios_1.default.post(service.url, form, {
|
|
199
|
+
headers: form.getHeaders()
|
|
200
|
+
});
|
|
201
|
+
const url = service.parseResponse(res);
|
|
202
|
+
return url;
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
logger === null || logger === void 0 ? void 0 : logger.debug(`[${service.name}] eror:`, (error === null || error === void 0 ? void 0 : error.message) || error);
|
|
94
206
|
}
|
|
207
|
+
}
|
|
208
|
+
throw new Error("All upload services failed.");
|
|
209
|
+
}
|
|
210
|
+
async function vid2jpg(videoUrl) {
|
|
211
|
+
try {
|
|
212
|
+
const { data } = await axios_1.default.get(`https://ezgif.com/video-to-jpg?url=${encodeURIComponent(videoUrl)}`);
|
|
213
|
+
const $ = cheerio.load(data);
|
|
214
|
+
const fileToken = $('input[name="file"]').attr("value");
|
|
215
|
+
if (!fileToken) {
|
|
216
|
+
throw new Error("Failed to retrieve file token. The video URL may be invalid or inaccessible.");
|
|
217
|
+
}
|
|
218
|
+
const formData = new URLSearchParams();
|
|
219
|
+
formData.append("file", fileToken);
|
|
220
|
+
formData.append("end", "1");
|
|
221
|
+
formData.append("video-to-jpg", "Convert to JPG!");
|
|
222
|
+
const convert = await axios_1.default.post(`https://ezgif.com/video-to-jpg/${fileToken}`, formData);
|
|
223
|
+
const $2 = cheerio.load(convert.data);
|
|
224
|
+
let imageUrl = $2("#output img").first().attr("src");
|
|
225
|
+
if (!imageUrl) {
|
|
226
|
+
throw new Error("Could not locate the converted image output.");
|
|
227
|
+
}
|
|
228
|
+
if (imageUrl.startsWith("//")) {
|
|
229
|
+
imageUrl = "https:" + imageUrl;
|
|
230
|
+
}
|
|
231
|
+
else if (imageUrl.startsWith("/")) {
|
|
232
|
+
const cdnMatch = imageUrl.match(/\/(s\d+\..+?)\/.*/);
|
|
233
|
+
if (cdnMatch) {
|
|
234
|
+
imageUrl = "https://" + imageUrl.slice(2);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
imageUrl = "https://ezgif.com" + imageUrl;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return imageUrl;
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
throw new Error("Failed to convert video to JPG: " + error.message);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Extracts video thumbnail using FFmpeg
|
|
248
|
+
*/
|
|
249
|
+
const extractVideoThumb = async (videoPath, time = '00:00:00', size = { width: 256 }) => {
|
|
250
|
+
return new Promise((resolve, reject) => {
|
|
251
|
+
const args = [
|
|
252
|
+
'-ss', time,
|
|
253
|
+
'-i', videoPath,
|
|
254
|
+
'-y',
|
|
255
|
+
'-vf', `scale=${size.width}:-1`,
|
|
256
|
+
'-vframes', '1',
|
|
257
|
+
'-f', 'image2',
|
|
258
|
+
'-vcodec', 'mjpeg',
|
|
259
|
+
'pipe:1'
|
|
260
|
+
];
|
|
261
|
+
const ffmpeg = (0, child_process_1.spawn)('ffmpeg', args);
|
|
262
|
+
const chunks = [];
|
|
263
|
+
let errorOutput = '';
|
|
264
|
+
ffmpeg.stdout.on('data', chunk => chunks.push(chunk));
|
|
265
|
+
ffmpeg.stderr.on('data', data => {
|
|
266
|
+
errorOutput += data.toString();
|
|
267
|
+
});
|
|
268
|
+
ffmpeg.on('error', reject);
|
|
269
|
+
ffmpeg.on('close', code => {
|
|
270
|
+
if (code === 0) return resolve(Buffer.concat(chunks));
|
|
271
|
+
reject(new Error(`ffmpeg exited with code ${code}\n${errorOutput}`));
|
|
272
|
+
});
|
|
95
273
|
});
|
|
96
|
-
}
|
|
274
|
+
};
|
|
275
|
+
exports.extractVideoThumb = extractVideoThumb;
|
|
97
276
|
const extractImageThumb = async (bufferOrFilePath, width = 32) => {
|
|
98
277
|
var _a, _b;
|
|
99
278
|
if (bufferOrFilePath instanceof stream_1.Readable) {
|
|
@@ -142,8 +321,8 @@ const encodeBase64EncodedStringForUpload = (b64) => (encodeURIComponent(b64
|
|
|
142
321
|
.replace(/\=+$/, '')));
|
|
143
322
|
exports.encodeBase64EncodedStringForUpload = encodeBase64EncodedStringForUpload;
|
|
144
323
|
const generateProfilePicture = async (mediaUpload) => {
|
|
145
|
-
var _a, _b;
|
|
146
324
|
let bufferOrFilePath;
|
|
325
|
+
let img;
|
|
147
326
|
if (Buffer.isBuffer(mediaUpload)) {
|
|
148
327
|
bufferOrFilePath = mediaUpload;
|
|
149
328
|
}
|
|
@@ -153,29 +332,11 @@ const generateProfilePicture = async (mediaUpload) => {
|
|
|
153
332
|
else {
|
|
154
333
|
bufferOrFilePath = await (0, exports.toBuffer)(mediaUpload.stream);
|
|
155
334
|
}
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.jpeg({
|
|
162
|
-
quality: 50,
|
|
163
|
-
})
|
|
164
|
-
.toBuffer();
|
|
165
|
-
}
|
|
166
|
-
else if ('jimp' in lib && typeof ((_b = lib.jimp) === null || _b === void 0 ? void 0 : _b.read) === 'function') {
|
|
167
|
-
const { read, MIME_JPEG, RESIZE_BILINEAR } = lib.jimp;
|
|
168
|
-
const jimp = await read(bufferOrFilePath);
|
|
169
|
-
const min = Math.min(jimp.getWidth(), jimp.getHeight());
|
|
170
|
-
const cropped = jimp.crop(0, 0, min, min);
|
|
171
|
-
img = cropped
|
|
172
|
-
.quality(50)
|
|
173
|
-
.resize(640, 640, RESIZE_BILINEAR)
|
|
174
|
-
.getBufferAsync(MIME_JPEG);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
throw new boom_1.Boom('No image processing library available');
|
|
178
|
-
}
|
|
335
|
+
const jimp = await jimp_1.default.read(bufferOrFilePath);
|
|
336
|
+
const cropped = jimp.getWidth() > jimp.getHeight() ? jimp.resize(550, -1) : jimp.resize(-1, 650);
|
|
337
|
+
img = cropped
|
|
338
|
+
.quality(100)
|
|
339
|
+
.getBufferAsync(jimp_1.default.MIME_JPEG);
|
|
179
340
|
return {
|
|
180
341
|
img: await img,
|
|
181
342
|
};
|
|
@@ -188,32 +349,25 @@ const mediaMessageSHA256B64 = (message) => {
|
|
|
188
349
|
};
|
|
189
350
|
exports.mediaMessageSHA256B64 = mediaMessageSHA256B64;
|
|
190
351
|
async function getAudioDuration(buffer) {
|
|
191
|
-
const musicMetadata = await
|
|
352
|
+
const musicMetadata = await Promise.resolve().then(() => __importStar(require('music-metadata')));
|
|
192
353
|
let metadata;
|
|
354
|
+
const options = {
|
|
355
|
+
duration: true
|
|
356
|
+
};
|
|
193
357
|
if (Buffer.isBuffer(buffer)) {
|
|
194
|
-
metadata = await musicMetadata.parseBuffer(buffer, undefined,
|
|
358
|
+
metadata = await musicMetadata.parseBuffer(buffer, undefined, options);
|
|
195
359
|
}
|
|
196
360
|
else if (typeof buffer === 'string') {
|
|
197
|
-
|
|
198
|
-
try {
|
|
199
|
-
metadata = await musicMetadata.parseStream(rStream, undefined, { duration: true });
|
|
200
|
-
}
|
|
201
|
-
finally {
|
|
202
|
-
rStream.destroy();
|
|
203
|
-
}
|
|
361
|
+
metadata = await musicMetadata.parseFile(buffer, options);
|
|
204
362
|
}
|
|
205
363
|
else {
|
|
206
|
-
metadata = await musicMetadata.parseStream(buffer, undefined,
|
|
364
|
+
metadata = await musicMetadata.parseStream(buffer, undefined, options);
|
|
207
365
|
}
|
|
208
366
|
return metadata.format.duration;
|
|
209
367
|
}
|
|
210
|
-
exports.getAudioDuration = getAudioDuration;
|
|
211
|
-
/**
|
|
212
|
-
referenced from and modifying https://github.com/wppconnect-team/wa-js/blob/main/src/chat/functions/prepareAudioWaveform.ts
|
|
213
|
-
*/
|
|
214
368
|
async function getAudioWaveform(buffer, logger) {
|
|
215
369
|
try {
|
|
216
|
-
const
|
|
370
|
+
const { default: decoder } = await eval('import(\'audio-decode\')');
|
|
217
371
|
let audioData;
|
|
218
372
|
if (Buffer.isBuffer(buffer)) {
|
|
219
373
|
audioData = buffer;
|
|
@@ -225,23 +379,21 @@ async function getAudioWaveform(buffer, logger) {
|
|
|
225
379
|
else {
|
|
226
380
|
audioData = await (0, exports.toBuffer)(buffer);
|
|
227
381
|
}
|
|
228
|
-
const audioBuffer = await
|
|
229
|
-
const rawData = audioBuffer.getChannelData(0);
|
|
230
|
-
const samples = 64;
|
|
231
|
-
const blockSize = Math.floor(rawData.length / samples);
|
|
382
|
+
const audioBuffer = await decoder(audioData);
|
|
383
|
+
const rawData = audioBuffer.getChannelData(0);
|
|
384
|
+
const samples = 64;
|
|
385
|
+
const blockSize = Math.floor(rawData.length / samples);
|
|
232
386
|
const filteredData = [];
|
|
233
387
|
for (let i = 0; i < samples; i++) {
|
|
234
|
-
const blockStart = blockSize * i;
|
|
388
|
+
const blockStart = blockSize * i;
|
|
235
389
|
let sum = 0;
|
|
236
390
|
for (let j = 0; j < blockSize; j++) {
|
|
237
|
-
sum = sum + Math.abs(rawData[blockStart + j]);
|
|
391
|
+
sum = sum + Math.abs(rawData[blockStart + j]);
|
|
238
392
|
}
|
|
239
|
-
filteredData.push(sum / blockSize);
|
|
393
|
+
filteredData.push(sum / blockSize);
|
|
240
394
|
}
|
|
241
|
-
// This guarantees that the largest data point will be set to 1, and the rest of the data will scale proportionally.
|
|
242
395
|
const multiplier = Math.pow(Math.max(...filteredData), -1);
|
|
243
396
|
const normalizedData = filteredData.map((n) => n * multiplier);
|
|
244
|
-
// Generate waveform like WhatsApp
|
|
245
397
|
const waveform = new Uint8Array(normalizedData.map((n) => Math.floor(100 * n)));
|
|
246
398
|
return waveform;
|
|
247
399
|
}
|
|
@@ -249,7 +401,6 @@ async function getAudioWaveform(buffer, logger) {
|
|
|
249
401
|
logger === null || logger === void 0 ? void 0 : logger.debug('Failed to generate waveform: ' + e);
|
|
250
402
|
}
|
|
251
403
|
}
|
|
252
|
-
exports.getAudioWaveform = getAudioWaveform;
|
|
253
404
|
const toReadable = (buffer) => {
|
|
254
405
|
const readable = new stream_1.Readable({ read: () => { } });
|
|
255
406
|
readable.push(buffer);
|
|
@@ -295,12 +446,28 @@ async function generateThumbnail(file, mediaType, options) {
|
|
|
295
446
|
}
|
|
296
447
|
}
|
|
297
448
|
else if (mediaType === 'video') {
|
|
298
|
-
const imgFilename = (0, path_1.join)(getTmpFilesDirectory(), (0, generics_1.generateMessageID)() + '.jpg');
|
|
299
449
|
try {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
450
|
+
let videoPath = file;
|
|
451
|
+
if (Buffer.isBuffer(file) || file instanceof stream_1.Readable) {
|
|
452
|
+
videoPath = (0, path_1.join)(getTmpFilesDirectory(), (0, generics_1.generateMessageIDV2)() + '.mp4');
|
|
453
|
+
const buffer = Buffer.isBuffer(file) ? file : await (0, exports.toBuffer)(file);
|
|
454
|
+
await fs_1.promises.writeFile(videoPath, buffer);
|
|
455
|
+
}
|
|
456
|
+
const thumbnailBuffer = await (0, exports.extractVideoThumb)(videoPath);
|
|
457
|
+
const imgFilename = (0, path_1.join)(getTmpFilesDirectory(), (0, generics_1.generateMessageIDV2)() + '.jpg');
|
|
458
|
+
await fs_1.promises.writeFile(imgFilename, thumbnailBuffer);
|
|
459
|
+
const { buffer: processedThumbnailBuffer, original } = await (0, exports.extractImageThumb)(imgFilename);
|
|
460
|
+
thumbnail = processedThumbnailBuffer.toString('base64');
|
|
461
|
+
if (original.width && original.height) {
|
|
462
|
+
originalImageDimensions = {
|
|
463
|
+
width: original.width,
|
|
464
|
+
height: original.height,
|
|
465
|
+
};
|
|
466
|
+
}
|
|
303
467
|
await fs_1.promises.unlink(imgFilename);
|
|
468
|
+
if (videoPath !== file) {
|
|
469
|
+
await fs_1.promises.unlink(videoPath);
|
|
470
|
+
}
|
|
304
471
|
}
|
|
305
472
|
catch (err) {
|
|
306
473
|
(_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug('could not generate video thumb: ' + err);
|
|
@@ -311,10 +478,8 @@ async function generateThumbnail(file, mediaType, options) {
|
|
|
311
478
|
originalImageDimensions
|
|
312
479
|
};
|
|
313
480
|
}
|
|
314
|
-
exports.generateThumbnail = generateThumbnail;
|
|
315
481
|
const getHttpStream = async (url, options = {}) => {
|
|
316
|
-
const
|
|
317
|
-
const fetched = await axios.get(url.toString(), { ...options, responseType: 'stream' });
|
|
482
|
+
const fetched = await axios_1.default.get(url.toString(), { ...options, responseType: 'stream' });
|
|
318
483
|
return fetched.data;
|
|
319
484
|
};
|
|
320
485
|
exports.getHttpStream = getHttpStream;
|
|
@@ -329,7 +494,7 @@ const prepareStream = async (media, mediaType, { logger, saveOriginalFileIfRequi
|
|
|
329
494
|
bodyPath = media.url;
|
|
330
495
|
}
|
|
331
496
|
else if (saveOriginalFileIfRequired) {
|
|
332
|
-
bodyPath = (0, path_1.join)(getTmpFilesDirectory(), mediaType + (0, generics_1.
|
|
497
|
+
bodyPath = (0, path_1.join)(getTmpFilesDirectory(), mediaType + (0, generics_1.generateMessageIDV2)());
|
|
333
498
|
(0, fs_1.writeFileSync)(bodyPath, buffer);
|
|
334
499
|
didSaveToTmpPath = true;
|
|
335
500
|
}
|
|
@@ -348,7 +513,6 @@ const prepareStream = async (media, mediaType, { logger, saveOriginalFileIfRequi
|
|
|
348
513
|
};
|
|
349
514
|
}
|
|
350
515
|
catch (error) {
|
|
351
|
-
// destroy all streams with error
|
|
352
516
|
stream.destroy();
|
|
353
517
|
if (didSaveToTmpPath) {
|
|
354
518
|
try {
|
|
@@ -366,7 +530,7 @@ const encryptedStream = async (media, mediaType, { logger, saveOriginalFileIfReq
|
|
|
366
530
|
const { stream, type } = await (0, exports.getStream)(media, opts);
|
|
367
531
|
logger === null || logger === void 0 ? void 0 : logger.debug('fetched media stream');
|
|
368
532
|
const mediaKey = Crypto.randomBytes(32);
|
|
369
|
-
const { cipherKey, iv, macKey } = getMediaKeys(mediaKey, mediaType);
|
|
533
|
+
const { cipherKey, iv, macKey } = await getMediaKeys(mediaKey, mediaType);
|
|
370
534
|
const encWriteStream = new stream_1.Readable({ read: () => { } });
|
|
371
535
|
let bodyPath;
|
|
372
536
|
let writeStream;
|
|
@@ -375,7 +539,7 @@ const encryptedStream = async (media, mediaType, { logger, saveOriginalFileIfReq
|
|
|
375
539
|
bodyPath = media.url;
|
|
376
540
|
}
|
|
377
541
|
else if (saveOriginalFileIfRequired) {
|
|
378
|
-
bodyPath = (0, path_1.join)(getTmpFilesDirectory(), mediaType + (0, generics_1.
|
|
542
|
+
bodyPath = (0, path_1.join)(getTmpFilesDirectory(), mediaType + (0, generics_1.generateMessageIDV2)());
|
|
379
543
|
writeStream = (0, fs_1.createWriteStream)(bodyPath);
|
|
380
544
|
didSaveToTmpPath = true;
|
|
381
545
|
}
|
|
@@ -424,7 +588,6 @@ const encryptedStream = async (media, mediaType, { logger, saveOriginalFileIfReq
|
|
|
424
588
|
};
|
|
425
589
|
}
|
|
426
590
|
catch (error) {
|
|
427
|
-
// destroy all streams with error
|
|
428
591
|
encWriteStream.destroy();
|
|
429
592
|
writeStream === null || writeStream === void 0 ? void 0 : writeStream.destroy();
|
|
430
593
|
aes.destroy();
|
|
@@ -456,21 +619,20 @@ const toSmallestChunkSize = (num) => {
|
|
|
456
619
|
};
|
|
457
620
|
const getUrlFromDirectPath = (directPath) => `https://${DEF_HOST}${directPath}`;
|
|
458
621
|
exports.getUrlFromDirectPath = getUrlFromDirectPath;
|
|
459
|
-
const downloadContentFromMessage = ({ mediaKey, directPath, url }, type, opts = {}) => {
|
|
460
|
-
const
|
|
461
|
-
const
|
|
622
|
+
const downloadContentFromMessage = async ({ mediaKey, directPath, url }, type, opts = {}) => {
|
|
623
|
+
const isValidMediaUrl = url === null || url === void 0 ? void 0 : url.startsWith('https://mmg.whatsapp.net/');
|
|
624
|
+
const downloadUrl = isValidMediaUrl ? url : (0, exports.getUrlFromDirectPath)(directPath);
|
|
625
|
+
if (!downloadUrl) {
|
|
626
|
+
throw new boom_1.Boom('No valid media URL or directPath present in message', { statusCode: 400 });
|
|
627
|
+
}
|
|
628
|
+
const keys = await getMediaKeys(mediaKey, type);
|
|
462
629
|
return (0, exports.downloadEncryptedContent)(downloadUrl, keys, opts);
|
|
463
630
|
};
|
|
464
631
|
exports.downloadContentFromMessage = downloadContentFromMessage;
|
|
465
|
-
/**
|
|
466
|
-
* Decrypts and downloads an AES256-CBC encrypted file given the keys.
|
|
467
|
-
* Assumes the SHA256 of the plaintext is appended to the end of the ciphertext
|
|
468
|
-
* */
|
|
469
632
|
const downloadEncryptedContent = async (downloadUrl, { cipherKey, iv }, { startByte, endByte, options } = {}) => {
|
|
470
633
|
let bytesFetched = 0;
|
|
471
634
|
let startChunk = 0;
|
|
472
635
|
let firstBlockIsIV = false;
|
|
473
|
-
// if a start byte is specified -- then we need to fetch the previous chunk as that will form the IV
|
|
474
636
|
if (startByte) {
|
|
475
637
|
const chunk = toSmallestChunkSize(startByte || 0);
|
|
476
638
|
if (chunk) {
|
|
@@ -490,7 +652,6 @@ const downloadEncryptedContent = async (downloadUrl, { cipherKey, iv }, { startB
|
|
|
490
652
|
headers.Range += endChunk;
|
|
491
653
|
}
|
|
492
654
|
}
|
|
493
|
-
// download the message
|
|
494
655
|
const fetched = await (0, exports.getHttpStream)(downloadUrl, {
|
|
495
656
|
...options || {},
|
|
496
657
|
headers,
|
|
@@ -523,8 +684,6 @@ const downloadEncryptedContent = async (downloadUrl, { cipherKey, iv }, { startB
|
|
|
523
684
|
data = data.slice(AES_CHUNK_SIZE);
|
|
524
685
|
}
|
|
525
686
|
aes = Crypto.createDecipheriv('aes-256-cbc', cipherKey, ivValue);
|
|
526
|
-
// if an end byte that is not EOF is specified
|
|
527
|
-
// stop auto padding (PKCS7) -- otherwise throws an error for decryption
|
|
528
687
|
if (endByte) {
|
|
529
688
|
aes.setAutoPadding(false);
|
|
530
689
|
}
|
|
@@ -565,12 +724,9 @@ function extensionForMediaMessage(message) {
|
|
|
565
724
|
}
|
|
566
725
|
return extension;
|
|
567
726
|
}
|
|
568
|
-
exports.extensionForMediaMessage = extensionForMediaMessage;
|
|
569
727
|
const getWAUploadToServer = ({ customUploadHosts, fetchAgent, logger, options }, refreshMediaConn) => {
|
|
570
728
|
return async (stream, { mediaType, fileEncSha256B64, newsletter, timeoutMs }) => {
|
|
571
729
|
var _a, _b;
|
|
572
|
-
const { default: axios } = await import('axios');
|
|
573
|
-
// send a query JSON to obtain the url & auth token to upload our media
|
|
574
730
|
let uploadInfo = await refreshMediaConn(false);
|
|
575
731
|
let urls;
|
|
576
732
|
const hosts = [...customUploadHosts, ...uploadInfo.hosts];
|
|
@@ -588,14 +744,14 @@ const getWAUploadToServer = ({ customUploadHosts, fetchAgent, logger, options },
|
|
|
588
744
|
}
|
|
589
745
|
for (const { hostname, maxContentLengthBytes } of hosts) {
|
|
590
746
|
logger.debug(`uploading to "${hostname}"`);
|
|
591
|
-
const auth = encodeURIComponent(uploadInfo.auth);
|
|
747
|
+
const auth = encodeURIComponent(uploadInfo.auth);
|
|
592
748
|
const url = `https://${hostname}${media}/${fileEncSha256B64}?auth=${auth}&token=${fileEncSha256B64}`;
|
|
593
749
|
let result;
|
|
594
750
|
try {
|
|
595
751
|
if (maxContentLengthBytes && reqBody.length > maxContentLengthBytes) {
|
|
596
752
|
throw new boom_1.Boom(`Body too large for "${hostname}"`, { statusCode: 413 });
|
|
597
753
|
}
|
|
598
|
-
const body = await
|
|
754
|
+
const body = await axios_1.default.post(url, reqBody, {
|
|
599
755
|
...options,
|
|
600
756
|
headers: {
|
|
601
757
|
...options.headers || {},
|
|
@@ -623,7 +779,7 @@ const getWAUploadToServer = ({ customUploadHosts, fetchAgent, logger, options },
|
|
|
623
779
|
}
|
|
624
780
|
}
|
|
625
781
|
catch (error) {
|
|
626
|
-
if (
|
|
782
|
+
if (axios_1.default.isAxiosError(error)) {
|
|
627
783
|
result = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data;
|
|
628
784
|
}
|
|
629
785
|
const isLast = hostname === ((_b = hosts[uploadInfo.hosts.length - 1]) === null || _b === void 0 ? void 0 : _b.hostname);
|
|
@@ -640,14 +796,11 @@ exports.getWAUploadToServer = getWAUploadToServer;
|
|
|
640
796
|
const getMediaRetryKey = (mediaKey) => {
|
|
641
797
|
return (0, crypto_1.hkdf)(mediaKey, 32, { info: 'WhatsApp Media Retry Notification' });
|
|
642
798
|
};
|
|
643
|
-
|
|
644
|
-
* Generate a binary node that will request the phone to re-upload the media & return the newly uploaded URL
|
|
645
|
-
*/
|
|
646
|
-
const encryptMediaRetryRequest = (key, mediaKey, meId) => {
|
|
799
|
+
const encryptMediaRetryRequest = async (key, mediaKey, meId) => {
|
|
647
800
|
const recp = { stanzaId: key.id };
|
|
648
801
|
const recpBuffer = WAProto_1.proto.ServerErrorReceipt.encode(recp).finish();
|
|
649
802
|
const iv = Crypto.randomBytes(12);
|
|
650
|
-
const retryKey = getMediaRetryKey(mediaKey);
|
|
803
|
+
const retryKey = await getMediaRetryKey(mediaKey);
|
|
651
804
|
const ciphertext = (0, crypto_1.aesEncryptGCM)(recpBuffer, retryKey, iv, Buffer.from(key.id));
|
|
652
805
|
const req = {
|
|
653
806
|
tag: 'receipt',
|
|
@@ -657,9 +810,6 @@ const encryptMediaRetryRequest = (key, mediaKey, meId) => {
|
|
|
657
810
|
type: 'server-error'
|
|
658
811
|
},
|
|
659
812
|
content: [
|
|
660
|
-
// this encrypt node is actually pretty useless
|
|
661
|
-
// the media is returned even without this node
|
|
662
|
-
// keeping it here to maintain parity with WA Web
|
|
663
813
|
{
|
|
664
814
|
tag: 'encrypt',
|
|
665
815
|
attrs: {},
|
|
@@ -673,7 +823,6 @@ const encryptMediaRetryRequest = (key, mediaKey, meId) => {
|
|
|
673
823
|
attrs: {
|
|
674
824
|
jid: key.remoteJid,
|
|
675
825
|
'from_me': (!!key.fromMe).toString(),
|
|
676
|
-
// @ts-ignore
|
|
677
826
|
participant: key.participant || undefined
|
|
678
827
|
}
|
|
679
828
|
}
|
|
@@ -711,8 +860,8 @@ const decodeMediaRetryNode = (node) => {
|
|
|
711
860
|
return event;
|
|
712
861
|
};
|
|
713
862
|
exports.decodeMediaRetryNode = decodeMediaRetryNode;
|
|
714
|
-
const decryptMediaRetryData = ({ ciphertext, iv }, mediaKey, msgId) => {
|
|
715
|
-
const retryKey = getMediaRetryKey(mediaKey);
|
|
863
|
+
const decryptMediaRetryData = async ({ ciphertext, iv }, mediaKey, msgId) => {
|
|
864
|
+
const retryKey = await getMediaRetryKey(mediaKey);
|
|
716
865
|
const plaintext = (0, crypto_1.aesDecryptGCM)(ciphertext, retryKey, iv, Buffer.from(msgId));
|
|
717
866
|
return WAProto_1.proto.MediaRetryNotification.decode(plaintext);
|
|
718
867
|
};
|
|
@@ -725,7 +874,6 @@ const MEDIA_RETRY_STATUS_MAP = {
|
|
|
725
874
|
[WAProto_1.proto.MediaRetryNotification.ResultType.NOT_FOUND]: 404,
|
|
726
875
|
[WAProto_1.proto.MediaRetryNotification.ResultType.GENERAL_ERROR]: 418,
|
|
727
876
|
};
|
|
728
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
729
877
|
function __importStar(arg0) {
|
|
730
878
|
throw new Error('Function not implemented.');
|
|
731
|
-
}
|
|
879
|
+
}
|