@zetagoaurum-socket/wasocket 2.1.5 → 2.1.6
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/lib/Socket/messages-send.js +4 -13
- package/package.json +1 -1
|
@@ -312,10 +312,9 @@ const makeMessagesSocket = (config) => {
|
|
|
312
312
|
const devices = [];
|
|
313
313
|
const meMsg = {
|
|
314
314
|
deviceSentMessage: {
|
|
315
|
+
destinationJid,
|
|
315
316
|
destinationJid,
|
|
316
317
|
message,
|
|
317
|
-
phash: '2:1:a', // Fake enterprise phash
|
|
318
|
-
metaVerified: true // Fake Meta Verified attribute
|
|
319
318
|
}
|
|
320
319
|
};
|
|
321
320
|
const extraAttrs = {}
|
|
@@ -585,13 +584,7 @@ const makeMessagesSocket = (config) => {
|
|
|
585
584
|
stanza.content.push(...additionalNodes);
|
|
586
585
|
}
|
|
587
586
|
|
|
588
|
-
|
|
589
|
-
if (!stanza.content.find(c => c.tag === 'bot')) {
|
|
590
|
-
stanza.content.push({
|
|
591
|
-
tag: 'bot',
|
|
592
|
-
attrs: { biz_bot: '1' }
|
|
593
|
-
});
|
|
594
|
-
}
|
|
587
|
+
|
|
595
588
|
|
|
596
589
|
logger.debug({ msgId }, `sending message to ${participants.length} devices`);
|
|
597
590
|
await sendNode(stanza);
|
|
@@ -881,14 +874,12 @@ const makeMessagesSocket = (config) => {
|
|
|
881
874
|
...options
|
|
882
875
|
});
|
|
883
876
|
|
|
884
|
-
|
|
885
|
-
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
886
|
-
await delay(Math.floor(Math.random() * 1000) + 500);
|
|
877
|
+
|
|
887
878
|
|
|
888
879
|
const isDeleteMsg = 'delete' in content && !!content.delete;
|
|
889
880
|
const isEditMsg = 'edit' in content && !!content.edit;
|
|
890
881
|
// FORCE AI BADGES FOR ALL MESSAGES
|
|
891
|
-
const isAiMsg =
|
|
882
|
+
const isAiMsg = 'ai' in content && !!content.ai;
|
|
892
883
|
|
|
893
884
|
const additionalAttributes = {};
|
|
894
885
|
const additionalNodes = [];
|