Fix exception with missing key
This commit is contained in:
parent
61ec929a7d
commit
8b04a985bf
@ -89,6 +89,8 @@ class CallbackSession extends MemorySession {
|
||||
.keys(this._authKeys)
|
||||
.forEach((dcId) => {
|
||||
const authKey = this._authKeys[dcId];
|
||||
if (!authKey._key) return;
|
||||
|
||||
sessionData.keys[dcId] = authKey._key.toString('hex');
|
||||
sessionData.hashes[dcId] = authKey._hash.toString('hex');
|
||||
});
|
||||
|
||||
@ -110,6 +110,8 @@ class StorageSession extends MemorySession {
|
||||
.keys(this._authKeys)
|
||||
.forEach((dcId) => {
|
||||
const authKey = this._authKeys[dcId];
|
||||
if (!authKey._key) return;
|
||||
|
||||
sessionData.keys[dcId] = asHex ? authKey._key.toString('hex') : authKey._key;
|
||||
sessionData.hashes[dcId] = asHex ? authKey._hash.toString('hex') : authKey._hash;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user