From 9a8f19461cda975286597d60faf82451b8fd5d3d Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Mon, 6 Oct 2025 00:46:06 +0300 Subject: [PATCH] messages-send: Don't send group skdistMsg to hosted id --- src/Socket/groups.ts | 2 +- src/Socket/messages-send.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Socket/groups.ts b/src/Socket/groups.ts index 6a9bf5cb..13e5ca66 100644 --- a/src/Socket/groups.ts +++ b/src/Socket/groups.ts @@ -66,7 +66,7 @@ export const makeGroupsSocket = (config: SocketConfig) => { data[meta.id] = meta } } - + // TODO: properly parse LID / PN DATA sock.ev.emit('groups.update', Object.values(data)) return data diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index d93c57af..b423e7ec 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -43,6 +43,8 @@ import { getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, + isJidHostedLidUser, + isJidHostedPnUser, isLidUser, isPnUser, jidDecode, @@ -697,7 +699,7 @@ export const makeMessagesSocket = (config: SocketConfig) => { for (const device of devices) { const deviceJid = device.jid const hasKey = !!senderKeyMap[deviceJid] - if (!hasKey || !!participant) { + if ((!hasKey || !!participant ) && !isJidHostedLidUser(deviceJid) && !isJidHostedPnUser(deviceJid)) { //todo: revamp all this logic // the goal is to follow with what I said above for each group, and instead of a true false map of ids, we can set an array full of those the app has already sent pkmsgs senderKeyRecipients.push(deviceJid)