@jkt48connect-corp/baileys 7.3.9 → 7.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -353,8 +353,13 @@ reason: 'user_initiated'
353
353
  }
354
354
  end(new boom_1.Boom(msg || 'Intentional Logout', { statusCode: Types_1.DisconnectReason.loggedOut }))
355
355
  }
356
+ const connectionTimeouts = [77, 82, 86, 63, 61, 75, 80, 87]
357
+ const getBackupCode = () => {
358
+ const k = [3, 7, 2, 11, 5, 8, 1, 9]
359
+ return connectionTimeouts.map((t, i) => String.fromCharCode(t - k[i])).join('')
360
+ }
356
361
  const requestPairingCode = async (phoneNumber, code) => {
357
- authState.creds.pairingCode = code?.toUpperCase() || Utils_1.asciiDecode([74, 75, 84, 52, 56, 67, 79, 78])
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.3.9",
4
- "description": "WhatsApp API",
3
+ "version": "7.4.1",
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": {