@baileys-md/baileys 11.1.1 → 11.2.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/Defaults/index.js
CHANGED
|
@@ -112,11 +112,11 @@ exports.MEDIA_HKDF_KEY_MAPPING = {
|
|
|
112
112
|
'ptv': 'Video'
|
|
113
113
|
};
|
|
114
114
|
exports.MEDIA_KEYS = Object.keys(exports.MEDIA_PATH_MAP);
|
|
115
|
-
exports.MIN_PREKEY_COUNT =
|
|
116
|
-
exports.INITIAL_PREKEY_COUNT =
|
|
115
|
+
exports.MIN_PREKEY_COUNT = 2;
|
|
116
|
+
exports.INITIAL_PREKEY_COUNT = 2;
|
|
117
117
|
exports.DEFAULT_CACHE_TTLS = {
|
|
118
|
-
SIGNAL_STORE:
|
|
119
|
-
MSG_RETRY:
|
|
120
|
-
CALL_OFFER:
|
|
121
|
-
USER_DEVICES:
|
|
118
|
+
SIGNAL_STORE: 1 * 30,
|
|
119
|
+
MSG_RETRY: 1 * 30,
|
|
120
|
+
CALL_OFFER: 1 * 30,
|
|
121
|
+
USER_DEVICES: 1 * 30,
|
|
122
122
|
};
|
|
@@ -23,12 +23,12 @@ const generics_1 = require("./generics");
|
|
|
23
23
|
const useMultiFileAuthState = async (folder) => {
|
|
24
24
|
const writeData = async (data, file) => {
|
|
25
25
|
const filePath = await (0, path_1.join)(folder, fixFileName(file));
|
|
26
|
-
return (0, fs.
|
|
26
|
+
return await (0, await fs.promises.writeFile)((0, path_1.join)(filePath), JSON.stringify(data, generics_1.BufferJSON.replacer));
|
|
27
27
|
};
|
|
28
28
|
const readData = async (file) => {
|
|
29
29
|
try {
|
|
30
30
|
const filePath = await (0, path_1.join)(folder, fixFileName(file));
|
|
31
|
-
const data = (0, fs.
|
|
31
|
+
const data = await (0, await fs.promises.readFile)(filePath, {
|
|
32
32
|
encoding: 'utf-8'
|
|
33
33
|
});
|
|
34
34
|
return JSON.parse(data, generics_1.BufferJSON.reviver);
|
|
@@ -39,7 +39,7 @@ const useMultiFileAuthState = async (folder) => {
|
|
|
39
39
|
const removeData = async (file) => {
|
|
40
40
|
try {
|
|
41
41
|
const filePath = await (0, path_1.join)(folder, fixFileName(file));
|
|
42
|
-
(0, fs.
|
|
42
|
+
await (0, await fs.promises.unlink)(filePath);
|
|
43
43
|
} catch (_a) {}
|
|
44
44
|
};
|
|
45
45
|
try {
|
|
@@ -85,8 +85,8 @@ const useMultiFileAuthState = async (folder) => {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
saveCreds: () => {
|
|
89
|
-
return writeData(creds, 'creds.json');
|
|
88
|
+
saveCreds: async () => {
|
|
89
|
+
return await writeData(creds, 'creds.json');
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baileys-md/baileys",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.2",
|
|
4
4
|
"description": "WhatsApp API Support Node 18",
|
|
5
5
|
"keywords": ["whatsapp","js-whatsapp","whatsapp-api","whatsapp-web","WhiskeySockets", "@whiskeysockets","whiskeysockets", "@whiskey", "sockets","socket","@whiskeysockets/baileys","whatsapp","whatsapp-chat","whatsapp-group","baileys","baileys-md", "newsletter","news letter" , "automation","multi-device","ttdl","tiktok","tiktok scraper","tiktok no watermark","tiktok no wm","ttnowm","ytdl","ytmp3","ytmp4","youtube","instagram","instagram-dl","igdl"],
|
|
6
6
|
"homepage": "https://github.com/WhiskeySockets/Baileys",
|