@areumtecnologia/baileys 1.1.1 → 1.1.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.
package/index.js CHANGED
@@ -336,7 +336,7 @@ class Client extends EventEmitter {
336
336
  }
337
337
  }
338
338
  } catch (error) {
339
- this.emit(ClientEvent.ERROR, error);
339
+ this.emit(ClientEvent.ERROR, { error, event });
340
340
  }
341
341
 
342
342
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@areumtecnologia/baileys",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "More baileys Wrapper",
5
5
  "license": "ISC",
6
6
  "author": "Áreum Tecnologia",
@@ -36,7 +36,7 @@ class MessageNormalizer {
36
36
  const fromMe = rawMessage.key.fromMe;
37
37
  const chatLid = [rawMessage.key.remoteJid, rawMessage.key.remoteJidAlt].find(jid => jid && jid.includes('@lid'))?.replace(/:.*?@/, "@");
38
38
  const chatId = [rawMessage.key.remoteJid, rawMessage.key.remoteJidAlt].find(jid => jid && !jid.includes('@lid'))?.replace(/:.*?@/, "@");
39
- const isGroup = chatId.endsWith('@g.us');
39
+ const isGroup = chatId?.endsWith('@g.us');
40
40
  const groupMetadata = isGroup ? await client.groups.getMetadata(chatId) : null;
41
41
  const groupParticipants = groupMetadata?.participants;
42
42
  const from = fromMe ? clientJid : chatId;