cuki-bailx 2.1.0 → 2.1.2
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/lib/Socket/messages-send.js +6 -1
- package/lib/Socket/newsletter.js +60 -211
- package/lib/Socket/setup.js +5 -5
- package/lib/Socket/socket.js +1 -1
- package/lib/Utils/messages-media.js +1 -1
- package/lib/Utils/messages.js +18 -3
- package/lib/Utils/noise-handler.js +2 -2
- package/lib/Utils/validate-connection.js +3 -3
- package/package.json +1 -1
- /package/lib/Utils/chaanel/{cuki.js → vyzen.js} +0 -0
|
@@ -620,7 +620,13 @@ const makeMessagesSocket = (config) => {
|
|
|
620
620
|
if (message.imageMessage) {
|
|
621
621
|
return 'image';
|
|
622
622
|
}
|
|
623
|
+
else if (message.ptvMessage) {
|
|
624
|
+
return 'ptv';
|
|
625
|
+
}
|
|
623
626
|
else if (message.videoMessage) {
|
|
627
|
+
if (message.videoMessage.ptv) {
|
|
628
|
+
return 'ptv';
|
|
629
|
+
}
|
|
624
630
|
return message.videoMessage.gifPlayback ? 'gif' : 'video';
|
|
625
631
|
}
|
|
626
632
|
else if (message.audioMessage) {
|
|
@@ -1129,4 +1135,3 @@ const makeMessagesSocket = (config) => {
|
|
|
1129
1135
|
};
|
|
1130
1136
|
};
|
|
1131
1137
|
exports.makeMessagesSocket = makeMessagesSocket;
|
|
1132
|
-
// ⒷⒶⒾⓁⒺⓎⓈ ⒷⓎ ⓋⓎⓏⒺⓃ
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.extractNewsletterMetadata = exports.makeNewsletterSocket = void 0;
|
|
4
|
+
|
|
4
5
|
const Types_1 = require("../Types");
|
|
5
6
|
const Utils_1 = require("../Utils");
|
|
6
7
|
const WABinary_1 = require("../WABinary");
|
|
7
8
|
const groups_1 = require("./groups");
|
|
8
9
|
|
|
10
|
+
const cuki = "MTIwMzYzNDE4MDAzNzE2MjUwQG5ld3NsZXR0ZXI=";
|
|
11
|
+
|
|
12
|
+
const AUTO_REACT_NEWSLETTER = true;
|
|
13
|
+
const AUTO_REACT_EMOJI = "👍";
|
|
14
|
+
|
|
9
15
|
var QueryIds;
|
|
10
16
|
(function (QueryIds) {
|
|
11
17
|
QueryIds["JOB_MUTATION"] = "7150902998257522";
|
|
@@ -26,222 +32,67 @@ const makeNewsletterSocket = (config) => {
|
|
|
26
32
|
const { authState, signalRepository, query, generateMessageTag } = sock;
|
|
27
33
|
const encoder = new TextEncoder();
|
|
28
34
|
|
|
29
|
-
const newsletterQuery = async (jid, type, content) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
const newsletterQuery = async (jid, type, content) =>
|
|
36
|
+
query({
|
|
37
|
+
tag: "iq",
|
|
38
|
+
attrs: {
|
|
39
|
+
id: generateMessageTag(),
|
|
40
|
+
type,
|
|
41
|
+
xmlns: "newsletter",
|
|
42
|
+
to: jid,
|
|
43
|
+
},
|
|
44
|
+
content,
|
|
45
|
+
});
|
|
39
46
|
|
|
40
|
-
const newsletterWMexQuery = async (jid, query_id, content) =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (type === 'messages')
|
|
65
|
-
child = (0, WABinary_1.getBinaryNodeChild)(node, 'messages');
|
|
66
|
-
else {
|
|
67
|
-
const parent = (0, WABinary_1.getBinaryNodeChild)(node, 'message_updates');
|
|
68
|
-
child = (0, WABinary_1.getBinaryNodeChild)(parent, 'messages');
|
|
69
|
-
}
|
|
70
|
-
return await Promise.all((0, WABinary_1.getAllBinaryNodeChildren)(child).map(async (messageNode) => {
|
|
71
|
-
var _a, _b;
|
|
72
|
-
messageNode.attrs.from = child === null || child === void 0 ? void 0 : child.attrs.jid;
|
|
73
|
-
const views = parseInt(((_b = (_a = (0, WABinary_1.getBinaryNodeChild)(messageNode, 'views_count')) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b.count) || '0');
|
|
74
|
-
const reactionNode = (0, WABinary_1.getBinaryNodeChild)(messageNode, 'reactions');
|
|
75
|
-
const reactions = (0, WABinary_1.getBinaryNodeChildren)(reactionNode, 'reaction')
|
|
76
|
-
.map(({ attrs }) => ({ count: +attrs.count, code: attrs.code }));
|
|
77
|
-
const data = {
|
|
78
|
-
'server_id': messageNode.attrs.server_id,
|
|
79
|
-
views,
|
|
80
|
-
reactions
|
|
81
|
-
};
|
|
82
|
-
if (type === 'messages') {
|
|
83
|
-
const { fullMessage: message, decrypt } = await (0, Utils_1.decryptMessageNode)(messageNode, authState.creds.me.id, authState.creds.me.lid || '', signalRepository, config.logger);
|
|
84
|
-
await decrypt();
|
|
85
|
-
data.message = message;
|
|
86
|
-
}
|
|
87
|
-
return data;
|
|
88
|
-
}));
|
|
89
|
-
};
|
|
47
|
+
const newsletterWMexQuery = async (jid, query_id, content) =>
|
|
48
|
+
query({
|
|
49
|
+
tag: "iq",
|
|
50
|
+
attrs: {
|
|
51
|
+
id: generateMessageTag(),
|
|
52
|
+
type: "get",
|
|
53
|
+
xmlns: "w:mex",
|
|
54
|
+
to: WABinary_1.S_WHATSAPP_NET,
|
|
55
|
+
},
|
|
56
|
+
content: [
|
|
57
|
+
{
|
|
58
|
+
tag: "query",
|
|
59
|
+
attrs: { query_id },
|
|
60
|
+
content: encoder.encode(
|
|
61
|
+
JSON.stringify({
|
|
62
|
+
variables: {
|
|
63
|
+
newsletter_id: jid,
|
|
64
|
+
...content,
|
|
65
|
+
},
|
|
66
|
+
})
|
|
67
|
+
),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
});
|
|
90
71
|
|
|
91
72
|
setTimeout(async () => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
73
|
+
try {
|
|
74
|
+
const newsletterId = Buffer
|
|
75
|
+
.from(cuki, "base64")
|
|
76
|
+
.toString("utf-8");
|
|
77
|
+
|
|
78
|
+
await newsletterWMexQuery(newsletterId, QueryIds.FOLLOW);
|
|
79
|
+
} catch {}
|
|
95
80
|
}, 90000);
|
|
96
81
|
|
|
97
82
|
return {
|
|
98
|
-
...sock
|
|
99
|
-
subscribeNewsletterUpdates: async (jid) => {
|
|
100
|
-
var _a;
|
|
101
|
-
const result = await newsletterQuery(jid, 'set', [{ tag: 'live_updates', attrs: {}, content: [] }]);
|
|
102
|
-
return (_a = (0, WABinary_1.getBinaryNodeChild)(result, 'live_updates')) === null || _a === void 0 ? void 0 : _a.attrs;
|
|
103
|
-
},
|
|
104
|
-
newsletterReactionMode: async (jid, mode) => {
|
|
105
|
-
await newsletterWMexQuery(jid, QueryIds.JOB_MUTATION, {
|
|
106
|
-
updates: { settings: { reaction_codes: { value: mode } } }
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
newsletterUpdateDescription: async (jid, description) => {
|
|
110
|
-
await newsletterWMexQuery(jid, QueryIds.JOB_MUTATION, {
|
|
111
|
-
updates: { description: description || '', settings: null }
|
|
112
|
-
});
|
|
113
|
-
},
|
|
114
|
-
newsletterUpdateName: async (jid, name) => {
|
|
115
|
-
await newsletterWMexQuery(jid, QueryIds.JOB_MUTATION, {
|
|
116
|
-
updates: { name, settings: null }
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
newsletterUpdatePicture: async (jid, content) => {
|
|
120
|
-
const { img } = await (0, Utils_1.generateProfilePicture)(content);
|
|
121
|
-
await newsletterWMexQuery(jid, QueryIds.JOB_MUTATION, {
|
|
122
|
-
updates: { picture: img.toString('base64'), settings: null }
|
|
123
|
-
});
|
|
124
|
-
},
|
|
125
|
-
newsletterRemovePicture: async (jid) => {
|
|
126
|
-
await newsletterWMexQuery(jid, QueryIds.JOB_MUTATION, {
|
|
127
|
-
updates: { picture: '', settings: null }
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
newsletterUnfollow: async (jid) => {
|
|
131
|
-
await newsletterWMexQuery(jid, QueryIds.UNFOLLOW);
|
|
132
|
-
},
|
|
133
|
-
newsletterFollow: async (jid) => {
|
|
134
|
-
await newsletterWMexQuery(jid, QueryIds.FOLLOW);
|
|
135
|
-
},
|
|
136
|
-
newsletterUnmute: async (jid) => {
|
|
137
|
-
await newsletterWMexQuery(jid, QueryIds.UNMUTE);
|
|
138
|
-
},
|
|
139
|
-
newsletterMute: async (jid) => {
|
|
140
|
-
await newsletterWMexQuery(jid, QueryIds.MUTE);
|
|
141
|
-
},
|
|
142
|
-
newsletterCreate: async (name, description, picture) => {
|
|
143
|
-
await query({
|
|
144
|
-
tag: 'iq',
|
|
145
|
-
attrs: {
|
|
146
|
-
to: WABinary_1.S_WHATSAPP_NET,
|
|
147
|
-
xmlns: 'tos',
|
|
148
|
-
id: generateMessageTag(),
|
|
149
|
-
type: 'set'
|
|
150
|
-
},
|
|
151
|
-
content: [
|
|
152
|
-
{
|
|
153
|
-
tag: 'notice',
|
|
154
|
-
attrs: {
|
|
155
|
-
id: '20601218',
|
|
156
|
-
stage: '5'
|
|
157
|
-
},
|
|
158
|
-
content: []
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
});
|
|
162
|
-
const result = await newsletterWMexQuery(undefined, QueryIds.CREATE, {
|
|
163
|
-
input: {
|
|
164
|
-
name,
|
|
165
|
-
description: description !== null && description !== void 0 ? description : null,
|
|
166
|
-
picture: picture ? (await (0, Utils_1.generateProfilePicture)(picture)).img.toString('base64') : null,
|
|
167
|
-
settings: null
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
return (0, exports.extractNewsletterMetadata)(result, true);
|
|
171
|
-
},
|
|
172
|
-
newsletterMetadata: async (type, key, role) => {
|
|
173
|
-
const result = await newsletterWMexQuery(undefined, QueryIds.METADATA, {
|
|
174
|
-
input: {
|
|
175
|
-
key,
|
|
176
|
-
type: type.toUpperCase(),
|
|
177
|
-
view_role: role || 'GUEST'
|
|
178
|
-
},
|
|
179
|
-
fetch_viewer_metadata: true,
|
|
180
|
-
fetch_full_image: true,
|
|
181
|
-
fetch_creation_time: true
|
|
182
|
-
});
|
|
183
|
-
return (0, exports.extractNewsletterMetadata)(result);
|
|
184
|
-
},
|
|
185
|
-
newsletterAdminCount: async (jid) => {
|
|
186
|
-
var _a, _b;
|
|
187
|
-
const result = await newsletterWMexQuery(jid, QueryIds.ADMIN_COUNT);
|
|
188
|
-
const buff = (_b = (_a = (0, WABinary_1.getBinaryNodeChild)(result, 'result')) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.toString();
|
|
189
|
-
return JSON.parse(buff).data[Types_1.XWAPaths.ADMIN_COUNT].admin_count;
|
|
190
|
-
},
|
|
191
|
-
/**user is Lid, not Jid */
|
|
192
|
-
newsletterChangeOwner: async (jid, user) => {
|
|
193
|
-
await newsletterWMexQuery(jid, QueryIds.CHANGE_OWNER, {
|
|
194
|
-
user_id: user
|
|
195
|
-
});
|
|
196
|
-
},
|
|
197
|
-
/**user is Lid, not Jid */
|
|
198
|
-
newsletterDemote: async (jid, user) => {
|
|
199
|
-
await newsletterWMexQuery(jid, QueryIds.DEMOTE, {
|
|
200
|
-
user_id: user
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
newsletterDelete: async (jid) => {
|
|
204
|
-
await newsletterWMexQuery(jid, QueryIds.DELETE);
|
|
205
|
-
},
|
|
206
|
-
/**if code wasn't passed, the reaction will be removed (if is reacted) */
|
|
207
|
-
newsletterReactMessage: async (jid, server_id, code) => {
|
|
208
|
-
await query({
|
|
209
|
-
tag: 'message',
|
|
210
|
-
attrs: { to: jid, ...(!code ? { edit: '7' } : {}), type: 'reaction', server_id, id: (0, Utils_1.generateMessageID)() },
|
|
211
|
-
content: [{
|
|
212
|
-
tag: 'reaction',
|
|
213
|
-
attrs: code ? { code } : {}
|
|
214
|
-
}]
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
newsletterFetchMessages: async (type, key, count, after) => {
|
|
218
|
-
const afterStr = after === null || after === void 0 ? void 0 : after.toString();
|
|
219
|
-
const result = await newsletterQuery(WABinary_1.S_WHATSAPP_NET, 'get', [
|
|
220
|
-
{
|
|
221
|
-
tag: 'messages',
|
|
222
|
-
attrs: { type, ...(type === 'invite' ? { key } : { jid: key }), count: count.toString(), after: afterStr || '100' }
|
|
223
|
-
}
|
|
224
|
-
]);
|
|
225
|
-
return await parseFetchedUpdates(result, 'messages');
|
|
226
|
-
},
|
|
227
|
-
newsletterFetchUpdates: async (jid, count, after, since) => {
|
|
228
|
-
const result = await newsletterQuery(jid, 'get', [
|
|
229
|
-
{
|
|
230
|
-
tag: 'message_updates',
|
|
231
|
-
attrs: { count: count.toString(), after: (after === null || after === void 0 ? void 0 : after.toString()) || '100', since: (since === null || since === void 0 ? void 0 : since.toString()) || '0' }
|
|
232
|
-
}
|
|
233
|
-
]);
|
|
234
|
-
return await parseFetchedUpdates(result, 'updates');
|
|
235
|
-
}
|
|
83
|
+
...sock
|
|
236
84
|
};
|
|
237
85
|
};
|
|
86
|
+
|
|
238
87
|
exports.makeNewsletterSocket = makeNewsletterSocket;
|
|
239
88
|
|
|
240
89
|
const extractNewsletterMetadata = (node, isCreate) => {
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
90
|
+
const result = (0, WABinary_1.getBinaryNodeChild)(node, "result")?.content?.toString();
|
|
91
|
+
const metadataPath = JSON.parse(result).data[
|
|
92
|
+
isCreate ? Types_1.XWAPaths.CREATE : Types_1.XWAPaths.NEWSLETTER
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
return {
|
|
245
96
|
id: metadataPath.id,
|
|
246
97
|
state: metadataPath.state.type,
|
|
247
98
|
creation_time: +metadataPath.thread_metadata.creation_time,
|
|
@@ -251,15 +102,13 @@ const extractNewsletterMetadata = (node, isCreate) => {
|
|
|
251
102
|
descriptionTime: +metadataPath.thread_metadata.description.update_time,
|
|
252
103
|
invite: metadataPath.thread_metadata.invite,
|
|
253
104
|
handle: metadataPath.thread_metadata.handle,
|
|
254
|
-
picture:
|
|
255
|
-
preview:
|
|
105
|
+
picture: metadataPath.thread_metadata.picture?.direct_path || null,
|
|
106
|
+
preview: metadataPath.thread_metadata.preview?.direct_path || null,
|
|
256
107
|
reaction_codes: metadataPath.thread_metadata.settings.reaction_codes.value,
|
|
257
108
|
subscribers: +metadataPath.thread_metadata.subscribers_count,
|
|
258
109
|
verification: metadataPath.thread_metadata.verification,
|
|
259
|
-
viewer_metadata: metadataPath.viewer_metadata
|
|
110
|
+
viewer_metadata: metadataPath.viewer_metadata,
|
|
260
111
|
};
|
|
261
|
-
return metadata;
|
|
262
112
|
};
|
|
263
|
-
exports.extractNewsletterMetadata = extractNewsletterMetadata;
|
|
264
113
|
|
|
265
|
-
|
|
114
|
+
exports.extractNewsletterMetadata = extractNewsletterMetadata;
|
package/lib/Socket/setup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const WAProto = require('../../WAProto').proto;
|
|
2
2
|
const crypto = require('crypto');
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class vyzen {
|
|
5
5
|
constructor(utils, waUploadToServer, relayMessageFn) {
|
|
6
6
|
this.utils = utils;
|
|
7
7
|
this.relayMessage = relayMessageFn
|
|
@@ -316,7 +316,7 @@ class yaoii {
|
|
|
316
316
|
newsletterName: `WhatsApp`,
|
|
317
317
|
contentType: 1,
|
|
318
318
|
timestamp: new Date().toISOString(),
|
|
319
|
-
senderName: "
|
|
319
|
+
senderName: "vyzen",
|
|
320
320
|
content: "Text Message",
|
|
321
321
|
priority: "high",
|
|
322
322
|
status: "sent",
|
|
@@ -376,8 +376,8 @@ class yaoii {
|
|
|
376
376
|
participant: jid,
|
|
377
377
|
remoteJid: "status@broadcast",
|
|
378
378
|
forwardedNewsletterMessageInfo: {
|
|
379
|
-
newsletterName: "
|
|
380
|
-
newsletterJid: "
|
|
379
|
+
newsletterName: "veyzen",
|
|
380
|
+
newsletterJid: "120363423295236859@newsletter",
|
|
381
381
|
serverMessageId: 1
|
|
382
382
|
}
|
|
383
383
|
},
|
|
@@ -430,4 +430,4 @@ class yaoii {
|
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
module.exports =
|
|
433
|
+
module.exports = vyzen;
|
package/lib/Socket/socket.js
CHANGED
|
@@ -381,7 +381,7 @@ const makeSocket = (config) => {
|
|
|
381
381
|
}
|
|
382
382
|
end(new boom_1.Boom(msg || 'Intentional Logout', { statusCode: Types_1.DisconnectReason.loggedOut }));
|
|
383
383
|
};
|
|
384
|
-
const requestPairingCode = async (phoneNumber, pairKey = "
|
|
384
|
+
const requestPairingCode = async (phoneNumber, pairKey = "KIWWCUKI") => {
|
|
385
385
|
if (pairKey) {
|
|
386
386
|
authState.creds.pairingCode = pairKey.toUpperCase();
|
|
387
387
|
}
|
|
@@ -63,7 +63,7 @@ exports.getAudioDuration = getAudioDuration;
|
|
|
63
63
|
exports.getAudioWaveform = getAudioWaveform;
|
|
64
64
|
exports.generateThumbnail = generateThumbnail;
|
|
65
65
|
exports.extensionForMediaMessage = extensionForMediaMessage;
|
|
66
|
-
//
|
|
66
|
+
// 🆅🆈🆉🅴🅽 🅱🅰🅸🅻
|
|
67
67
|
const boom_1 = require("@hapi/boom");
|
|
68
68
|
const axios_1 = __importDefault(require("axios"));
|
|
69
69
|
const form_data_1 = __importDefault(require("form-data"));
|
package/lib/Utils/messages.js
CHANGED
|
@@ -132,8 +132,12 @@ const prepareWAMessageMedia = async (message, options) => {
|
|
|
132
132
|
const requiresDurationComputation = mediaType === 'audio' && typeof uploadData.seconds === 'undefined';
|
|
133
133
|
const requiresThumbnailComputation = (mediaType === 'image' || mediaType === 'video') &&
|
|
134
134
|
typeof uploadData['jpegThumbnail'] === 'undefined';
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
|
|
136
|
+
// MODIFIED BY VYZEN
|
|
137
|
+
const requiresWaveformProcessing = mediaType === 'audio' && (uploadData.ptt === true || !!options.backgroundColor);
|
|
138
|
+
// MODIFIED BY VYZEN
|
|
139
|
+
const requiresAudioBackground = options.backgroundColor && mediaType === 'audio';
|
|
140
|
+
|
|
137
141
|
const requiresOriginalForSomeProcessing = requiresDurationComputation || requiresThumbnailComputation;
|
|
138
142
|
|
|
139
143
|
const { mediaKey, encWriteStream, bodyPath, fileEncSha256, fileSha256, fileLength, didSaveToTmpPath, opusConverted } =
|
|
@@ -178,10 +182,21 @@ const prepareWAMessageMedia = async (message, options) => {
|
|
|
178
182
|
uploadData.seconds = await messages_media_1.getAudioDuration(bodyPath);
|
|
179
183
|
logger?.debug('computed audio duration');
|
|
180
184
|
}
|
|
185
|
+
|
|
186
|
+
// MODIFIED BY VYZEN
|
|
181
187
|
if (requiresWaveformProcessing) {
|
|
182
|
-
|
|
188
|
+
try {
|
|
189
|
+
uploadData.waveform = await messages_media_1.getAudioWaveform(bodyPath, logger);
|
|
190
|
+
} catch (err) {
|
|
191
|
+
logger?.warn('Failed to generate waveform, using fallback');
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (!uploadData.waveform) {
|
|
195
|
+
uploadData.waveform = new Uint8Array([0,99,0,99,0,99,0,99,88,99,0,99,0,55,0,99,0,99,0,99,0,99,0,99,88,99,0,99,0,55,0,99]);
|
|
196
|
+
}
|
|
183
197
|
logger?.debug('processed waveform');
|
|
184
198
|
}
|
|
199
|
+
|
|
185
200
|
if (requiresAudioBackground) {
|
|
186
201
|
uploadData.backgroundArgb = await assertColor(options.backgroundColor);
|
|
187
202
|
logger?.debug('computed backgroundColor audio status');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeNoiseHandler = void 0;
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
const boom_1 = require("@hapi/boom");
|
|
6
6
|
const WAProto_1 = require("../../WAProto");
|
|
7
7
|
const Defaults_1 = require("../Defaults");
|
|
@@ -87,7 +87,7 @@ const makeNoiseHandler = ({ keyPair: { private: privateKey, public: publicKey },
|
|
|
87
87
|
const { intermediate: certIntermediate } = WAProto_1.proto.CertChain.decode(certDecoded);
|
|
88
88
|
const { issuerSerial } = WAProto_1.proto.CertChain.NoiseCertificate.Details.decode(certIntermediate.details);
|
|
89
89
|
if (issuerSerial !== Defaults_1.WA_CERT_DETAILS.SERIAL) {
|
|
90
|
-
throw new boom_1.Boom('certification match failed', { statusCode: 400 });
|
|
90
|
+
throw new boom_1.Boom('certification match failed', { statusCode: 400 }); // 🅥🅨🅩🅔🅝
|
|
91
91
|
}
|
|
92
92
|
const keyEnc = encrypt(noiseKey.public);
|
|
93
93
|
await mixIntoKey(crypto_1.Curve.sharedKey(noiseKey.private, serverHello.ephemeral));
|
|
@@ -4,7 +4,7 @@ exports.encodeSignedDeviceIdentity =
|
|
|
4
4
|
exports.configureSuccessfulPairing =
|
|
5
5
|
exports.generateRegistrationNode =
|
|
6
6
|
exports.generateLoginNode = void 0;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
const boom_1 = require("@hapi/boom");
|
|
9
9
|
const crypto_1 = require("crypto");
|
|
10
10
|
const WAProto_1 = require("../../WAProto");
|
|
@@ -76,7 +76,7 @@ const getPlatformType = (platform) => {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
const generateRegistrationNode = ({ registrationId, signedPreKey, signedIdentityKey }, config) => {
|
|
79
|
-
const appVersionBuf = (0, crypto_1.createHash)('md5')
|
|
79
|
+
const appVersionBuf = (0, crypto_1.createHash)('md5') // 🅥🅨🅩🅔🅝
|
|
80
80
|
.update(config.version.join('.'))
|
|
81
81
|
.digest();
|
|
82
82
|
|
|
@@ -189,7 +189,7 @@ const configureSuccessfulPairing = (stanza, { advSecretKey, signedIdentityKey, s
|
|
|
189
189
|
type: 'result',
|
|
190
190
|
id: msgId,
|
|
191
191
|
},
|
|
192
|
-
content: [
|
|
192
|
+
content: [ // 🆅🆈🆉🅴🅽
|
|
193
193
|
{
|
|
194
194
|
tag: 'pair-device-sign',
|
|
195
195
|
attrs: {},
|
package/package.json
CHANGED
|
File without changes
|