From 4b6575d94a3be8622f431f1a31d51f17f09e9820 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 7 Jun 2017 11:02:27 +0100 Subject: [PATCH] Fix jsdocs --- src/crypto/algorithms/base.js | 5 +++-- src/crypto/algorithms/megolm.js | 8 ++++++-- src/crypto/index.js | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/crypto/algorithms/base.js b/src/crypto/algorithms/base.js index 749ff99bd..41332c7c5 100644 --- a/src/crypto/algorithms/base.js +++ b/src/crypto/algorithms/base.js @@ -89,6 +89,7 @@ export {EncryptionAlgorithm}; // https://github.com/jsdoc3/jsdoc/issues/1272 /** * base type for decryption implementations * + * @alias module:crypto/algorithms/base.DecryptionAlgorithm * @param {object} params parameters * @param {string} params.userId The UserID for the local user * @param {module:crypto} params.crypto crypto core @@ -144,7 +145,7 @@ class DecryptionAlgorithm { /** * Determine if we have the keys necessary to respond to a room key request * - * @param {module:crypto#RoomKeyRequest} keyRequest + * @param {module:crypto~IncomingRoomKeyRequest} keyRequest * @return {boolean} true if we have the keys and could (theoretically) share * them; else false. */ @@ -155,7 +156,7 @@ class DecryptionAlgorithm { /** * Send the response to a room key request * - * @param {module:crypto#RoomKeyRequest} keyRequest + * @param {module:crypto~IncomingRoomKeyRequest} keyRequest */ shareKeysWithDevice(keyRequest) { throw new Error("shareKeysWithDevice not supported for this DecryptionAlgorithm"); diff --git a/src/crypto/algorithms/megolm.js b/src/crypto/algorithms/megolm.js index 4bd4a4008..0a16c1414 100644 --- a/src/crypto/algorithms/megolm.js +++ b/src/crypto/algorithms/megolm.js @@ -662,7 +662,9 @@ MegolmDecryption.prototype.onRoomKeyEvent = function(event) { this._retryDecryption(senderKey, sessionId); }; - +/** + * @inheritdoc + */ MegolmDecryption.prototype.hasKeysForKeyRequest = function(keyRequest) { const body = keyRequest.requestBody; @@ -674,7 +676,9 @@ MegolmDecryption.prototype.hasKeysForKeyRequest = function(keyRequest) { ); }; - +/** + * @inheritdoc + */ MegolmDecryption.prototype.shareKeysWithDevice = function(keyRequest) { const userId = keyRequest.userId; const deviceId = keyRequest.deviceId; diff --git a/src/crypto/index.js b/src/crypto/index.js index c4f26e0b9..3b76d15cd 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -1277,8 +1277,8 @@ Crypto.prototype._signObject = function(obj) { * @property {string} userId user requesting the key * @property {string} deviceId device requesting the key * @property {string} requestId unique id for the request - * @property {RoomKeyRequestBody} requestBody - * @property {Function} share callback which, when called, will ask + * @property {module:crypto~RoomKeyRequestBody} requestBody + * @property {function()} share callback which, when called, will ask * the relevant crypto algorithm implementation to share the keys for * this request. */