chore: lint

This commit is contained in:
Rajeh Taher
2025-10-18 20:35:36 +03:00
parent 07536dedfc
commit 7ee0b61716
6 changed files with 19 additions and 10 deletions
+2 -2
View File
@@ -357,9 +357,9 @@ function signalStorage(
if (domainType === WAJIDDomains.LID || domainType === WAJIDDomains.HOSTED_LID) return id
const pnJid = `${user!}${device !== '0' ? `:${device}` : ''}@${domainType == WAJIDDomains.HOSTED ? 'hosted' : 's.whatsapp.net'}`
const pnJid = `${user!}${device !== '0' ? `:${device}` : ''}@${domainType === WAJIDDomains.HOSTED ? 'hosted' : 's.whatsapp.net'}`
let lidForPN = await lidMapping.getLIDForPN(pnJid)
const lidForPN = await lidMapping.getLIDForPN(pnJid)
if (lidForPN) {
const lidAddr = jidToSignalProtocolAddress(lidForPN)
return lidAddr.toString()
+10 -2
View File
@@ -1,7 +1,15 @@
import { LRUCache } from 'lru-cache'
import type { LIDMapping, SignalKeyStoreWithTransaction } from '../Types'
import type { ILogger } from '../Utils/logger'
import { isHostedLidUser, isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, WAJIDDomains } from '../WABinary'
import {
isHostedLidUser,
isHostedPnUser,
isLidUser,
isPnUser,
jidDecode,
jidNormalizedUser,
WAJIDDomains
} from '../WABinary'
export class LIDMappingStore {
private readonly mappingCache = new LRUCache<string, string>({
@@ -201,7 +209,7 @@ export class LIDMappingStore {
// Construct device-specific PN JID
const lidDevice = decoded.device !== undefined ? decoded.device : 0
const pnJid = `${pnUser}:${lidDevice}@${decoded.domainType == WAJIDDomains.HOSTED_LID ? 'hosted' : 's.whatsapp.net'}`
const pnJid = `${pnUser}:${lidDevice}@${decoded.domainType === WAJIDDomains.HOSTED_LID ? 'hosted' : 's.whatsapp.net'}`
this.logger.trace(`Found reverse mapping: ${lid}${pnJid}`)
return pnJid