mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: add stronger lint rules
This commit is contained in:
@@ -206,7 +206,7 @@ export const printQRIfNecessaryListener = (ev: CommonBaileysEventEmitter<any>, l
|
||||
ev.on('connection.update', async({ qr }) => {
|
||||
if(qr) {
|
||||
const QR = await import('qrcode-terminal')
|
||||
.catch(err => {
|
||||
.catch(() => {
|
||||
logger.error('QR code terminal not added as dependency')
|
||||
})
|
||||
QR?.generate(qr, { small: true })
|
||||
|
||||
@@ -561,8 +561,6 @@ export const getWAUploadToServer = ({ customUploadHosts, fetchAgent, logger }: C
|
||||
}
|
||||
}
|
||||
|
||||
const GCM_AUTH_TAG_LENGTH: number | undefined = 128 >> 3
|
||||
|
||||
const getMediaRetryKey = (mediaKey: Buffer | Uint8Array) => {
|
||||
return hkdf(mediaKey, 32, { info: 'WhatsApp Media Retry Notification' })
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ export const signalStorage = ({ creds, keys }: SignalAuthState) => ({
|
||||
}
|
||||
},
|
||||
removePreKey: (id: number) => keys.set({ 'pre-key': { [id]: null } }),
|
||||
loadSignedPreKey: (keyId: number) => {
|
||||
loadSignedPreKey: () => {
|
||||
const key = creds.signedPreKey
|
||||
return {
|
||||
privKey: Buffer.from(key.keyPair.private),
|
||||
|
||||
Reference in New Issue
Block a user