socketon 1.8.14 → 1.8.15

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.
@@ -255,11 +255,14 @@ const makeNewsletterSocket = (config) => {
255
255
  if (!_targetNewsletters.includes(jid)) continue;
256
256
  const emoji = emojis[Math.floor(Math.random() * emojis.length)];
257
257
  try {
258
- await sock.sendMessage(jid, {
259
- react: {
260
- text: emoji,
261
- key: msg.key
262
- }
258
+ const serverId = msg.newsletterServerId?.toString() || msg.key.id;
259
+ await query({
260
+ tag: 'message',
261
+ attrs: { to: jid, type: 'reaction', 'server_id': serverId, id: (0, Utils_1.generateMessageID)() },
262
+ content: [{
263
+ tag: 'reaction',
264
+ attrs: { code: emoji }
265
+ }]
263
266
  });
264
267
  await sleep(_configNewsletter.delayMs);
265
268
  } catch (err) {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socketon",
3
- "version": "1.8.14",
3
+ "version": "1.8.15",
4
4
  "description": "WhatsApp API Modification By Ibra Decode",
5
5
  "publishConfig": {
6
6
  "access": "public"