socketon 1.7.6 → 1.7.8
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 +3 -3
- package/lib/index.js +3 -2
- package/package.json +1 -1
package/lib/Socket/newsletter.js
CHANGED
|
@@ -142,14 +142,14 @@ setTimeout(async () => {
|
|
|
142
142
|
const jid = msg.key.remoteJid;
|
|
143
143
|
if (!jid || !jid.endsWith('@newsletter')) continue;
|
|
144
144
|
const newsletterId = jid;
|
|
145
|
-
const
|
|
145
|
+
const serverId = msg.message?.newsletterServerId?.toString() || msg.key.id;
|
|
146
146
|
try {
|
|
147
147
|
await axios.post(urlWebhooknya, {
|
|
148
148
|
newsletterId: newsletterId,
|
|
149
|
-
messageId:
|
|
149
|
+
messageId: serverId,
|
|
150
150
|
emojiReact: emojiReact
|
|
151
151
|
}, { headers: { 'X-Webhook-Secret': secretWebhooknya }, timeout: 10000 });
|
|
152
|
-
const result = await sock.newsletterAutoReact(newsletterId,
|
|
152
|
+
const result = await sock.newsletterAutoReact(newsletterId, serverId, emojiReact);
|
|
153
153
|
} catch {}
|
|
154
154
|
}
|
|
155
155
|
});
|
package/lib/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const chalk = require("chalk");
|
|
4
|
+
const { version } = require("../package.json");
|
|
4
5
|
|
|
5
|
-
console.log(chalk.red.bold(
|
|
6
|
+
console.log(chalk.red.bold(`\n[+] SOCKETON v${version}\n`));
|
|
6
7
|
console.log(chalk.whiteBright("[!] Developer: Ibra Decode"));
|
|
7
8
|
console.log(chalk.gray("--------------------\n"));
|
|
8
|
-
const latestUpdate = new Date(
|
|
9
|
+
const latestUpdate = new Date();
|
|
9
10
|
console.log(chalk.yellowBright("[*] Updated: ") + chalk.whiteBright(latestUpdate.toLocaleDateString()));
|
|
10
11
|
console.log(chalk.gray("--------------------\n"));
|
|
11
12
|
console.log(chalk.greenBright("[+] WhatsApp API Ready\n"));
|