amiudmodz 5.0.3 → 5.0.5

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.
@@ -856,6 +856,10 @@ const makeMessagesRecvSocket = (config) => {
856
856
  if (!(0, WABinary_1.isJidGroup)(msg.key.remoteJid) && (0, WABinary_1.isLidUser)(msg.key.remoteJid)) {
857
857
  msg.key.remoteJid = node.attrs.sender_pn || node.attrs.peer_recipient_pn;
858
858
  }
859
+
860
+ if (msg.key.fromMe && (0, WABinary_1.isJidUser)(msg.key.remoteJid) && node.attrs.recipient && (0, WABinary_1.isJidGroup)(node.attrs.recipient)) {
861
+ msg.key.remoteJid = node.attrs.recipient;
862
+ }
859
863
  let participant = msg.key.participant;
860
864
  if (category === 'peer') {
861
865
  type = 'peer_msg';
@@ -485,7 +485,14 @@ const makeMessagesSocket = (config) => {
485
485
  logger.debug({ msgId }, `sending message to ${participants.length} devices`);
486
486
  await sendNode(stanza);
487
487
  });
488
- return msgId;
488
+ return {
489
+ key: {
490
+ remoteJid: jid,
491
+ fromMe: true,
492
+ id: msgId,
493
+ participant: isGroup ? meId : undefined
494
+ }
495
+ }
489
496
  };
490
497
  const getTypeMessage = (msg) => {
491
498
  const message = Utils_1.normalizeMessageContent(msg);
@@ -27,11 +27,12 @@ function decodeMessageNode(stanza, meId, meLid) {
27
27
  throw new boom_1.Boom('receipient present, but msg not from me', { data: stanza });
28
28
  }
29
29
  chatId = recipient;
30
+ msgType = (0, WABinary_1.isJidGroup)(chatId) ? 'group' : (0, WABinary_1.isJidBroadcast)(chatId) ? 'broadcast' : (0, WABinary_1.isJidNewsLetter)(chatId) ? 'newsletter' : 'chat';
30
31
  }
31
32
  else {
32
33
  chatId = from;
34
+ msgType = 'chat';
33
35
  }
34
- msgType = 'chat';
35
36
  author = from;
36
37
  }
37
38
  else if ((0, WABinary_1.isLidUser)(from)) {
@@ -40,11 +41,12 @@ function decodeMessageNode(stanza, meId, meLid) {
40
41
  throw new boom_1.Boom('receipient present, but msg not from me', { data: stanza });
41
42
  }
42
43
  chatId = recipient;
44
+ msgType = (0, WABinary_1.isJidGroup)(chatId) ? 'group' : (0, WABinary_1.isJidBroadcast)(chatId) ? 'broadcast' : (0, WABinary_1.isJidNewsLetter)(chatId) ? 'newsletter' : 'chat';
43
45
  }
44
46
  else {
45
47
  chatId = from;
48
+ msgType = 'chat';
46
49
  }
47
- msgType = 'chat';
48
50
  author = from;
49
51
  }
50
52
  else if ((0, WABinary_1.isJidGroup)(from)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amiudmodz",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "description": "WhatsApp Baileys mod Powered by UDMODZ",
5
5
  "keywords": [
6
6
  "whatsapp",
@@ -98,10 +98,10 @@
98
98
  },
99
99
  "packageManager": "yarn@1.22.19",
100
100
  "resolutions": {
101
- "entities": "^7.1.1"
101
+ "entities": "latest"
102
102
  },
103
103
  "overrides": {
104
- "entities": "^7.1.1"
104
+ "entities": "latest"
105
105
  },
106
106
  "engines": {
107
107
  "node": ">=20.0.0"