decode-wa-message, process-message: Fix @hosted lids processing
This commit is contained in:
@@ -1122,7 +1122,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
decrypt
|
||||
} = decryptMessageNode(node, authState.creds.me!.id, authState.creds.me!.lid || '', signalRepository, logger)
|
||||
|
||||
|
||||
const alt = msg.key.participantAlt || msg.key.remoteJidAlt
|
||||
// store new mappings we didn't have before
|
||||
if (!!alt) {
|
||||
@@ -1235,7 +1234,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
|
||||
cleanMessage(msg, authState.creds.me!.id)
|
||||
|
||||
|
||||
await upsertMessage(msg, node.attrs.offline ? 'append' : 'notify')
|
||||
})
|
||||
])
|
||||
|
||||
@@ -295,8 +295,9 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
const lidResults = result.list.filter(a => !!a.lid)
|
||||
if (lidResults.length > 0) {
|
||||
logger.trace('Storing LID maps from device call')
|
||||
await signalRepository.lidMapping.storeLIDPNMappings(lidResults.map(a => ({lid: a.lid as string, pn: a.id})))
|
||||
await signalRepository.lidMapping.storeLIDPNMappings(lidResults.map(a => ({ lid: a.lid as string, pn: a.id })))
|
||||
}
|
||||
|
||||
const extracted = extractDeviceJids(result?.list, authState.creds.me!.id, ignoreZeroDevices)
|
||||
const deviceMap: { [_: string]: FullJid[] } = {}
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ export const makeSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
const pnFromLIDUSync = async (jids: string[]): Promise<LIDMapping[] | undefined> => {
|
||||
let usyncQuery = new USyncQuery().withLIDProtocol().withContext('background')
|
||||
const usyncQuery = new USyncQuery().withLIDProtocol().withContext('background')
|
||||
|
||||
for (const jid of jids) {
|
||||
if (isLidUser(jid)) {
|
||||
|
||||
Reference in New Issue
Block a user