mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: handle potential null values when creating Buffers from signing keys (#1558)
This commit is contained in:
committed by
GitHub
parent
42112ac389
commit
210338c747
@@ -98,7 +98,7 @@ export class SenderKeyState {
|
||||
return Buffer.from(publicKey, 'base64')
|
||||
}
|
||||
|
||||
return Buffer.from(publicKey)
|
||||
return Buffer.from(publicKey || [])
|
||||
}
|
||||
|
||||
public getSigningKeyPrivate(): Buffer | undefined {
|
||||
@@ -113,7 +113,7 @@ export class SenderKeyState {
|
||||
return Buffer.from(privateKey, 'base64')
|
||||
}
|
||||
|
||||
return Buffer.from(privateKey)
|
||||
return Buffer.from(privateKey || [])
|
||||
}
|
||||
|
||||
public hasSenderMessageKey(iteration: number): boolean {
|
||||
|
||||
Reference in New Issue
Block a user