You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
factor out getDehydratedDevice
This commit is contained in:
@@ -498,19 +498,8 @@ MatrixClient.prototype.rehydrateDevice = async function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let getDeviceResult;
|
const getDeviceResult = this.getDehydratedDevice();
|
||||||
try {
|
if (!getDeviceResult) {
|
||||||
getDeviceResult = await this._http.authedRequest(
|
|
||||||
undefined,
|
|
||||||
"GET",
|
|
||||||
"/dehydrated_device",
|
|
||||||
undefined, undefined,
|
|
||||||
{
|
|
||||||
prefix: "/_matrix/client/unstable/org.matrix.msc2697.v2",
|
|
||||||
},
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
logger.info("could not get dehydrated device", e.toString());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user