1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Merge pull request #1632 from matrix-org/matthew/rework-cross-signing-login

Expose APIs needed for reworked cross-signing login flow
This commit is contained in:
J. Ryan Stinnett
2021-03-11 12:54:18 +00:00
committed by GitHub
4 changed files with 42 additions and 15 deletions

View File

@@ -1518,6 +1518,21 @@ MatrixBaseApis.prototype.getDevices = function() {
);
};
/**
* Gets specific device details for the logged-in user
* @param {string} device_id device to query
* @return {Promise} Resolves: result object
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixBaseApis.prototype.getDevice = function(device_id) {
const path = utils.encodeUri("/devices/$device_id", {
$device_id: device_id,
});
return this._http.authedRequest(
undefined, 'GET', path, undefined, undefined,
);
};
/**
* Update the given device
*