You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Namespace default secret storage key methods
This commit is contained in:
@@ -168,7 +168,7 @@ describe("Secrets", function() {
|
||||
);
|
||||
// we don't await on this because it waits for the event to come down the sync
|
||||
// which won't happen in the test setup
|
||||
alice.setDefaultKeyId(newKeyId);
|
||||
alice.setDefaultSecretStorageKeyId(newKeyId);
|
||||
await alice.storeSecret("foo", "bar");
|
||||
|
||||
const accountData = alice.getAccountData('foo');
|
||||
|
||||
@@ -1115,7 +1115,7 @@ MatrixClient.prototype.checkEventSenderTrust = async function(event) {
|
||||
* Get the current default key ID for encrypting secrets.
|
||||
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
||||
*
|
||||
* @function module:client~MatrixClient#getDefaultKeyId
|
||||
* @function module:client~MatrixClient#getDefaultSecretStorageKeyId
|
||||
*
|
||||
* @return {string} The default key ID or null if no default key ID is set
|
||||
*/
|
||||
@@ -1124,7 +1124,7 @@ MatrixClient.prototype.checkEventSenderTrust = async function(event) {
|
||||
* Set the current default key ID for encrypting secrets.
|
||||
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
||||
*
|
||||
* @function module:client~MatrixClient#setDefaultKeyId
|
||||
* @function module:client~MatrixClient#setDefaultSecretStorageKeyId
|
||||
* @param {string} keyId The new default key ID
|
||||
*/
|
||||
|
||||
@@ -1134,8 +1134,8 @@ wrapCryptoFuncs(MatrixClient, [
|
||||
"getSecret",
|
||||
"isSecretStored",
|
||||
"requestSecret",
|
||||
"getDefaultKeyId",
|
||||
"setDefaultKeyId",
|
||||
"getDefaultSecretStorageKeyId",
|
||||
"setDefaultSecretStorageKeyId",
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
@@ -299,11 +299,11 @@ Crypto.prototype.requestSecret = function(name, devices) {
|
||||
return this._secretStorage.request(name, devices);
|
||||
};
|
||||
|
||||
Crypto.prototype.getDefaultKeyId = function() {
|
||||
Crypto.prototype.getDefaultSecretStorageKeyId = function() {
|
||||
return this._secretStorage.getDefaultKeyId();
|
||||
};
|
||||
|
||||
Crypto.prototype.setDefaultKeyId = function(k) {
|
||||
Crypto.prototype.setDefaultSecretStorageKeyId = function(k) {
|
||||
return this._secretStorage.setDefaultKeyId(k);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user