skylerss 2.0.0 → 2.0.2

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.
@@ -284,22 +284,18 @@ const makeChatsSocket = (config) => {
284
284
 
285
285
  if ((0, WABinary_1.isLidUser)(normalizedJid)) {
286
286
  lid = normalizedJid;
287
- // Se for LID, idealmente precisaríamos do PN para bloquear
288
- // Como não temos Store, tentamos sem pn_jid primeiro ou buscamos via USync
289
287
  } else if ((0, WABinary_1.isPnUser)(normalizedJid)) {
290
- // Se for PN, o WhatsApp exige o LID para o campo 'jid' e o PN para 'pn_jid'
291
288
  const result = await onWhatsApp(normalizedJid);
292
289
  if (result && result[0] && result[0].lid) {
293
290
  lid = result[0].lid;
294
291
  pn_jid = normalizedJid;
295
292
  } else {
296
- // Fallback: se não achar LID, tenta enviar o JID original (pode falhar com 400 em contas novas)
297
293
  lid = normalizedJid;
298
294
  }
299
295
  }
300
296
 
301
297
  const itemAttrs = { action, jid: lid };
302
- if (action === 'block' && pn_jid) {
298
+ if (action === 'block' && pn_jid && lid !== pn_jid) {
303
299
  itemAttrs.pn_jid = pn_jid;
304
300
  }
305
301
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skylerss",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "skylerss - API WhatsApp Web Moderna baseada em Baileys",
5
5
  "keywords": [
6
6
  "skylerss",