mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Merge pull request #576 from vector-im/bwindels/setup-new-dehydrated-device-when-claiming
Setup new dehydrated device when claiming
This commit is contained in:
commit
d40037ef49
@ -248,6 +248,7 @@ export class SessionContainer {
|
||||
await this._session.load(log);
|
||||
if (dehydratedDevice) {
|
||||
await log.wrap("dehydrateIdentity", log => this._session.dehydrateIdentity(dehydratedDevice, log));
|
||||
await this._session.setupDehydratedDevice(dehydratedDevice.key, log);
|
||||
} else if (!this._session.hasIdentity) {
|
||||
this._status.set(LoadStatus.SessionSetup);
|
||||
await log.wrap("createIdentity", log => this._session.createIdentity(log));
|
||||
|
@ -36,7 +36,7 @@ export async function uploadAccountAsDehydratedDevice(account, hsApi, key, devic
|
||||
const response = await hsApi.createDehydratedDevice({
|
||||
device_data: {
|
||||
algorithm: DEHYDRATION_LIBOLM_PICKLE_ALGORITHM,
|
||||
account: account.pickleWithKey(key.binaryKey),
|
||||
account: account.pickleWithKey(key.binaryKey.slice()),
|
||||
passphrase: key.description?.passphraseParams || {},
|
||||
},
|
||||
initial_device_display_name: deviceDisplayName
|
||||
|
Loading…
Reference in New Issue
Block a user