@arcaelas/whatsapp 7.0.0 → 7.0.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.
|
@@ -114,6 +114,16 @@ class WhatsApp {
|
|
|
114
114
|
logger: (0, pino_1.default)({ level: 'silent' }),
|
|
115
115
|
syncFullHistory: sync,
|
|
116
116
|
shouldSyncHistoryMessage: ({ syncType }) => sync || syncType !== baileys_1.proto.HistorySync.HistorySyncType.FULL,
|
|
117
|
+
// Cuando el receptor no puede descifrar pide un retry; el cache interno de
|
|
118
|
+
// baileys indexa por JID pero el retry llega por LID y no lo encuentra: sin
|
|
119
|
+
// este fallback el mensaje muere en un solo check.
|
|
120
|
+
// When the receiver cannot decrypt it asks for a retry; the internal baileys
|
|
121
|
+
// cache indexes by JID but the retry arrives by LID and misses: without this
|
|
122
|
+
// fallback the message dies at a single check.
|
|
123
|
+
getMessage: async (key) => {
|
|
124
|
+
const found = key.remoteJid && key.id ? await locate(key.remoteJid, key.id) : null;
|
|
125
|
+
return found?.doc.raw.message ?? undefined;
|
|
126
|
+
},
|
|
117
127
|
markOnlineOnConnect: false,
|
|
118
128
|
});
|
|
119
129
|
alive = socket;
|
|
@@ -76,6 +76,16 @@ export default class WhatsApp {
|
|
|
76
76
|
logger: pino({ level: 'silent' }),
|
|
77
77
|
syncFullHistory: sync,
|
|
78
78
|
shouldSyncHistoryMessage: ({ syncType }) => sync || syncType !== proto.HistorySync.HistorySyncType.FULL,
|
|
79
|
+
// Cuando el receptor no puede descifrar pide un retry; el cache interno de
|
|
80
|
+
// baileys indexa por JID pero el retry llega por LID y no lo encuentra: sin
|
|
81
|
+
// este fallback el mensaje muere en un solo check.
|
|
82
|
+
// When the receiver cannot decrypt it asks for a retry; the internal baileys
|
|
83
|
+
// cache indexes by JID but the retry arrives by LID and misses: without this
|
|
84
|
+
// fallback the message dies at a single check.
|
|
85
|
+
getMessage: async (key) => {
|
|
86
|
+
const found = key.remoteJid && key.id ? await locate(key.remoteJid, key.id) : null;
|
|
87
|
+
return found?.doc.raw.message ?? undefined;
|
|
88
|
+
},
|
|
79
89
|
markOnlineOnConnect: false,
|
|
80
90
|
});
|
|
81
91
|
alive = socket;
|