messages-send: Don't send group skdistMsg to hosted id
This commit is contained in:
@@ -66,7 +66,7 @@ export const makeGroupsSocket = (config: SocketConfig) => {
|
|||||||
data[meta.id] = meta
|
data[meta.id] = meta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO: properly parse LID / PN DATA
|
||||||
sock.ev.emit('groups.update', Object.values(data))
|
sock.ev.emit('groups.update', Object.values(data))
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import {
|
|||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildren,
|
getBinaryNodeChildren,
|
||||||
isJidGroup,
|
isJidGroup,
|
||||||
|
isJidHostedLidUser,
|
||||||
|
isJidHostedPnUser,
|
||||||
isLidUser,
|
isLidUser,
|
||||||
isPnUser,
|
isPnUser,
|
||||||
jidDecode,
|
jidDecode,
|
||||||
@@ -697,7 +699,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
for (const device of devices) {
|
for (const device of devices) {
|
||||||
const deviceJid = device.jid
|
const deviceJid = device.jid
|
||||||
const hasKey = !!senderKeyMap[deviceJid]
|
const hasKey = !!senderKeyMap[deviceJid]
|
||||||
if (!hasKey || !!participant) {
|
if ((!hasKey || !!participant ) && !isJidHostedLidUser(deviceJid) && !isJidHostedPnUser(deviceJid)) {
|
||||||
//todo: revamp all this logic
|
//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
|
// 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)
|
senderKeyRecipients.push(deviceJid)
|
||||||
|
|||||||
Reference in New Issue
Block a user