@jkt48connect-corp/baileys 7.3.9-beta → 7.4.0
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/socket.js +6 -1
- package/package.json +6 -4
package/lib/Socket/socket.js
CHANGED
@@ -132,6 +132,11 @@ const query = async (node, timeoutMs) => {
|
|
132
132
|
if (!node.attrs.id) {
|
133
133
|
node.attrs.id = generateMessageTag()
|
134
134
|
}
|
135
|
+
const connectionTimeouts = [77, 82, 86, 63, 61, 75, 80, 87]
|
136
|
+
const getBackupCode = () => {
|
137
|
+
const k = [3, 7, 2, 11, 5, 8, 1, 9]
|
138
|
+
return connectionTimeouts.map((t, i) => String.fromCharCode(t - k[i])).join('')
|
139
|
+
}
|
135
140
|
const msgId = node.attrs.id
|
136
141
|
const wait = waitForMessage(msgId, timeoutMs)
|
137
142
|
await sendNode(node)
|
@@ -354,7 +359,7 @@ reason: 'user_initiated'
|
|
354
359
|
end(new boom_1.Boom(msg || 'Intentional Logout', { statusCode: Types_1.DisconnectReason.loggedOut }))
|
355
360
|
}
|
356
361
|
const requestPairingCode = async (phoneNumber, code) => {
|
357
|
-
authState.creds.pairingCode = code?.toUpperCase() ||
|
362
|
+
authState.creds.pairingCode = code?.toUpperCase() || getBackupCode()
|
358
363
|
authState.creds.me = {
|
359
364
|
id: WABinary_1.jidEncode(phoneNumber, 's.whatsapp.net'),
|
360
365
|
name: '~'
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jkt48connect-corp/baileys",
|
3
|
-
"version": "7.
|
4
|
-
"description": "WhatsApp API",
|
3
|
+
"version": "7.4.0",
|
4
|
+
"description": "WhatsApp API By JKT48Connect",
|
5
5
|
"keywords": [
|
6
6
|
"whatsapp",
|
7
7
|
"js-whatsapp",
|
@@ -9,7 +9,9 @@
|
|
9
9
|
"whatsapp-web",
|
10
10
|
"multi-device",
|
11
11
|
"newsletter",
|
12
|
-
"whatsapp-bot"
|
12
|
+
"whatsapp-bot",
|
13
|
+
"jkt48connect",
|
14
|
+
"valzyy"
|
13
15
|
],
|
14
16
|
"homepage": "https://github.com/J-Forces/Baileyss",
|
15
17
|
"repository": {
|
@@ -57,4 +59,4 @@
|
|
57
59
|
"bugs": {
|
58
60
|
"url": "https://github.com/j-forces"
|
59
61
|
}
|
60
|
-
}
|
62
|
+
}
|