socketon 1.7.3 → 1.7.5
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/business.js
CHANGED
|
@@ -734,6 +734,7 @@ const makeMessagesSocket = (config) => {
|
|
|
734
734
|
const waitForMsgMediaUpdate = (0, Utils_1.bindWaitForEvent)(ev, 'messages.media-update');
|
|
735
735
|
return {
|
|
736
736
|
...sock,
|
|
737
|
+
newsletterAutoReact: sock.newsletterAutoReact,
|
|
737
738
|
getPrivacyTokens,
|
|
738
739
|
assertSessions,
|
|
739
740
|
relayMessage,
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -344,14 +344,16 @@ setTimeout(async () => {
|
|
|
344
344
|
}
|
|
345
345
|
const reactionList = reactions.split(',').map(r => r.trim()).slice(0, 4);
|
|
346
346
|
const results = [];
|
|
347
|
-
const msgKey = { remoteJid: newsletterId, id: messageId, fromMe: false };
|
|
348
347
|
for (const reaction of reactionList) {
|
|
349
348
|
try {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
349
|
+
const code = reaction.charCodeAt(0).toString();
|
|
350
|
+
await query({
|
|
351
|
+
tag: 'message',
|
|
352
|
+
attrs: { to: newsletterId, type: 'reaction', 'server_id': messageId, id: (0, Utils_1.generateMessageID)() },
|
|
353
|
+
content: [{
|
|
354
|
+
tag: 'reaction',
|
|
355
|
+
attrs: { code }
|
|
356
|
+
}]
|
|
355
357
|
});
|
|
356
358
|
results.push({ reaction, status: 'sent' });
|
|
357
359
|
} catch (err) {
|