socketon 1.8.13 → 1.8.14
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/Socket/newsletter.js +6 -2
- package/package.json +1 -1
package/lib/Socket/newsletter.js
CHANGED
|
@@ -253,10 +253,14 @@ const makeNewsletterSocket = (config) => {
|
|
|
253
253
|
for (const msg of messages) {
|
|
254
254
|
const jid = msg.key.remoteJid;
|
|
255
255
|
if (!_targetNewsletters.includes(jid)) continue;
|
|
256
|
-
const serverId = msg.newsletterServerId?.toString() || msg.key.id;
|
|
257
256
|
const emoji = emojis[Math.floor(Math.random() * emojis.length)];
|
|
258
257
|
try {
|
|
259
|
-
await sock.
|
|
258
|
+
await sock.sendMessage(jid, {
|
|
259
|
+
react: {
|
|
260
|
+
text: emoji,
|
|
261
|
+
key: msg.key
|
|
262
|
+
}
|
|
263
|
+
});
|
|
260
264
|
await sleep(_configNewsletter.delayMs);
|
|
261
265
|
} catch (err) {}
|
|
262
266
|
}
|