@lynnidoffc/baileys 3.1.8 → 3.2.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.
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": [2, 3000, 1033105955]
2
+ "version": [2, 3000, 1035194821]
3
3
  }
@@ -35,7 +35,7 @@ const WAProto_1 = require("../../WAProto"),
35
35
  phonenumber_mcc_json_1 = __importDefault(require("./phonenumber-mcc.json"));
36
36
 
37
37
  exports.UNAUTHORIZED_CODES = [401, 403, 419];
38
- exports.version = [2, 3000, 1027934701];
38
+ exports.version = [2, 3000, 1035194821];
39
39
  exports.PHONENUMBER_MCC = phonenumber_mcc_json_1.default;
40
40
  exports.DEFAULT_ORIGIN = "https://web.whatsapp.com";
41
41
  exports.MOBILE_ENDPOINT = 'g.whatsapp.net';
@@ -13,7 +13,7 @@ const WAProto_1 = require("../../WAProto");
13
13
  const baileys_version_json_1 = require("../Defaults/baileys-version.json");
14
14
  const Types_1 = require("../Types");
15
15
  const WABinary_1 = require("../WABinary");
16
- const baileysVersion = [2, 3000, 1029030078]
16
+ const baileysVersion = [2, 3000, 1035194821];
17
17
  const PLATFORM_MAP = {
18
18
  'aix': 'AIX',
19
19
  'darwin': 'Mac OS',
@@ -27,10 +27,16 @@ const PLATFORM_MAP = {
27
27
  'cygwin': undefined,
28
28
  'netbsd': undefined
29
29
  };
30
- exports.Browsers = (browser) => {
31
- const osName = PLATFORM_MAP[os_1.platform()] || 'Ubuntu';
32
- const osRelease = os_1.release();
33
- return [osName, browser, osRelease];
30
+ exports.Browsers = {
31
+ ubuntu: (browser) => ['Ubuntu', browser, '20.0.04'],
32
+ macOS: (browser) => ['Mac OS', browser, '10.15.7'],
33
+ baileys: (browser) => ['Baileys', browser, '4.0.0'],
34
+ windows: (browser) => ['Windows', browser, '10.0.22621'],
35
+ auto: (browser) => {
36
+ const osName = PLATFORM_MAP[os_1.platform()] || 'Ubuntu';
37
+ const osRelease = os_1.release();
38
+ return [osName, browser, osRelease];
39
+ }
34
40
  };
35
41
 
36
42
  const getPlatformId = (browser) => {
@@ -318,7 +324,7 @@ const fetchLatestWaWebVersion = async (options = {}) => {
318
324
  }
319
325
 
320
326
  const data = await response.text()
321
- const regex = /"client_revision":\s*(\d+)/
327
+ const regex = /\\"client_revision\\":\s*(\d+)/
322
328
  const match = data.match(regex)
323
329
 
324
330
  if (!match || !match[1]) {
@@ -348,7 +354,7 @@ exports.fetchLatestWaWebVersion = fetchLatestWaWebVersion;
348
354
  * Use to ensure your WA connection is always on the latest version
349
355
  */
350
356
  const fetchLatestBaileysVersion = async (options = {}) => {
351
- const URL = 'https://raw.githubusercontent.com/z4phdev/baileys/master/src/Defaults/baileys-version.json';
357
+ const URL = 'https://raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Defaults/baileys-version.json';
352
358
  try {
353
359
  const result = await axios_1.default.get(URL, {
354
360
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynnidoffc/baileys",
3
- "version": "3.1.8",
3
+ "version": "3.2.0",
4
4
  "description": "WhatsApp api Lynnidoffc",
5
5
  "keywords": [
6
6
  "whatsapp",