chore: lint and re-organize

This commit is contained in:
Rajeh Taher
2025-10-20 00:16:51 +03:00
parent cc3cd17392
commit 29318cf6c2
6 changed files with 34 additions and 40 deletions
+11 -2
View File
@@ -5,7 +5,15 @@ import type { LIDMapping, SignalAuthState, SignalKeyStoreWithTransaction } from
import type { SignalRepositoryWithLIDStore } from '../Types/Signal'
import { generateSignalPubKey } from '../Utils'
import type { ILogger } from '../Utils/logger'
import { isHostedLidUser, isHostedPnUser, isLidUser, isPnUser, jidDecode, transferDevice, WAJIDDomains } from '../WABinary'
import {
isHostedLidUser,
isHostedPnUser,
isLidUser,
isPnUser,
jidDecode,
transferDevice,
WAJIDDomains
} from '../WABinary'
import type { SenderKeyStore } from './Group/group_cipher'
import { SenderKeyName } from './Group/sender-key-name'
import { SenderKeyRecord } from './Group/sender-key-record'
@@ -223,9 +231,10 @@ export function makeLibSignalRepository(
if (!deviceStr) continue
const deviceNum = parseInt(deviceStr)
let jid = deviceNum === 0 ? `${user}@s.whatsapp.net` : `${user}:${deviceNum}@s.whatsapp.net`
if (deviceNum == 99) {
if (deviceNum === 99) {
jid = `${user}:99@hosted`
}
deviceJids.push(jid)
}
}
+1 -9
View File
@@ -1,15 +1,7 @@
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 { isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, WAJIDDomains } from '../WABinary'
export class LIDMappingStore {
private readonly mappingCache = new LRUCache<string, string>({