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)