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

Allow a device key upload request without auth

This is useful for querying the supported auth methods.
This commit is contained in:
David Baker
2020-01-21 11:35:49 +00:00
parent 22e6cfaebb
commit 7f208ed44e

View File

@@ -1816,7 +1816,8 @@ MatrixBaseApis.prototype.getKeyChanges = function(oldToken, newToken) {
}; };
MatrixBaseApis.prototype.uploadDeviceSigningKeys = function(auth, keys) { MatrixBaseApis.prototype.uploadDeviceSigningKeys = function(auth, keys) {
const data = Object.assign({}, keys, {auth}); const data = Object.assign({}, keys);
if (auth) Object.assign(data, {auth});
return this._http.authedRequest( return this._http.authedRequest(
undefined, "POST", "/keys/device_signing/upload", undefined, data, { undefined, "POST", "/keys/device_signing/upload", undefined, data, {
prefix: PREFIX_UNSTABLE, prefix: PREFIX_UNSTABLE,