messages-send: Don't send group skdistMsg to hosted id

This commit is contained in:
Rajeh Taher
2025-10-06 00:46:06 +03:00
parent c5b0001b61
commit 9a8f19461c
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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
+3 -1
View File
@@ -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)