@yemo-dev/yebail 1.1.0 → 1.1.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.
|
@@ -378,9 +378,12 @@ const makeMessagesRecvSocket = (config) => {
|
|
|
378
378
|
msg.messageStubType = Types_1.WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD;
|
|
379
379
|
msg.messageStubParameters = [participantJid, isDenied ? 'revoked' : 'rejected'];
|
|
380
380
|
break;
|
|
381
|
-
break;
|
|
382
381
|
default:
|
|
383
|
-
|
|
382
|
+
const participant = (0, WABinary_1.assertJid)((_h = child.attrs.participant) !== null && _h !== void 0 ? _h : child.attrs.from);
|
|
383
|
+
// console.log("YEBAIL-DEBUG:", JSON.stringify({ ...child, content: Buffer.isBuffer(child.content) ? child.content.toString() : child.content, participant }, null, 2))
|
|
384
|
+
return {
|
|
385
|
+
stanzaId: child.attrs.id
|
|
386
|
+
};
|
|
384
387
|
}
|
|
385
388
|
};
|
|
386
389
|
const handleNewsletterNotification = (id, node) => {
|
package/lib/Utils/generics.js
CHANGED
|
@@ -293,7 +293,7 @@ const fetchLatestBaileysVersion = async (options = {}) => {
|
|
|
293
293
|
};
|
|
294
294
|
} catch (error) {
|
|
295
295
|
return {
|
|
296
|
-
version:
|
|
296
|
+
version: yebail_version_json_1.version,
|
|
297
297
|
isLatest: false,
|
|
298
298
|
error
|
|
299
299
|
};
|
|
@@ -312,7 +312,7 @@ const fetchLatestWaWebVersion = async (options) => {
|
|
|
312
312
|
const match = data.match(regex);
|
|
313
313
|
if (!(match === null || match === void 0 ? void 0 : match[1])) {
|
|
314
314
|
return {
|
|
315
|
-
version:
|
|
315
|
+
version: yebail_version_json_1.version,
|
|
316
316
|
isLatest: false,
|
|
317
317
|
error: {
|
|
318
318
|
message: 'Could not find client revision in the fetched content'
|
|
@@ -327,7 +327,7 @@ const fetchLatestWaWebVersion = async (options) => {
|
|
|
327
327
|
}
|
|
328
328
|
catch (error) {
|
|
329
329
|
return {
|
|
330
|
-
version:
|
|
330
|
+
version: yebail_version_json_1.version,
|
|
331
331
|
isLatest: false,
|
|
332
332
|
error
|
|
333
333
|
};
|
package/lib/Utils/index.js
CHANGED
|
@@ -26,7 +26,7 @@ __exportStar(require("./history"), exports);
|
|
|
26
26
|
__exportStar(require("./chat-utils"), exports);
|
|
27
27
|
__exportStar(require("./lt-hash"), exports);
|
|
28
28
|
__exportStar(require("./auth-utils"), exports);
|
|
29
|
-
__exportStar(require("./
|
|
29
|
+
__exportStar(require("./yebail-event-stream"), exports);
|
|
30
30
|
__exportStar(require("./use-multi-file-auth-state"), exports);
|
|
31
31
|
__exportStar(require("./use-custom-auth-state"), exports);
|
|
32
32
|
__exportStar(require("./use-sqlite-auth-state"), exports);
|
|
@@ -16,13 +16,13 @@ const useSqliteAuthState = async (databaseFilePath) => {
|
|
|
16
16
|
}
|
|
17
17
|
const db = new Database(databaseFilePath);
|
|
18
18
|
db.exec(`
|
|
19
|
-
CREATE TABLE IF NOT EXISTS
|
|
19
|
+
CREATE TABLE IF NOT EXISTS yebail_auth_kv (
|
|
20
20
|
k TEXT PRIMARY KEY NOT NULL,
|
|
21
21
|
v TEXT NOT NULL
|
|
22
22
|
)`);
|
|
23
|
-
const sel = db.prepare('SELECT v FROM
|
|
24
|
-
const upsert = db.prepare('INSERT OR REPLACE INTO
|
|
25
|
-
const del = db.prepare('DELETE FROM
|
|
23
|
+
const sel = db.prepare('SELECT v FROM yebail_auth_kv WHERE k = ?');
|
|
24
|
+
const upsert = db.prepare('INSERT OR REPLACE INTO yebail_auth_kv (k, v) VALUES (?, ?)');
|
|
25
|
+
const del = db.prepare('DELETE FROM yebail_auth_kv WHERE k = ?');
|
|
26
26
|
return (0, use_custom_auth_state_1.useCustomAuthState)({
|
|
27
27
|
get: async (key) => {
|
|
28
28
|
const row = sel.get(key);
|