libsignal: Fix sending to hosted devices

This commit is contained in:
Rajeh Taher
2025-10-18 20:27:06 +03:00
parent 08f1d816d1
commit 9f787c51d3
+1 -2
View File
@@ -360,8 +360,7 @@ function signalStorage(
const pnJid = `${user!}${device !== '0' ? `:${device}` : ''}@${domainType == WAJIDDomains.HOSTED ? 'hosted' : 's.whatsapp.net'}`
let lidForPN = await lidMapping.getLIDForPN(pnJid)
if (lidForPN?.includes('@lid')) {
if (domainType === WAJIDDomains.HOSTED) lidForPN = `${lidForPN.split('@')[0]}@hosted.lid`
if (lidForPN) {
const lidAddr = jidToSignalProtocolAddress(lidForPN)
return lidAddr.toString()
}