1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-07 05:22:15 +03:00

Document checking crypto state before using hasUnverifiedDevices

It's unclear what `hasUnverifiedDevices` should do when crypto is disabled on
the current device. Let's at least document that callers should first check
crypto status.
This commit is contained in:
J. Ryan Stinnett
2019-04-08 16:24:25 +01:00
parent f585c80491
commit 58b752c63b

View File

@@ -598,6 +598,11 @@ Room.prototype._fixUpLegacyTimelineFields = function() {
/**
* Returns whether there are any devices in the room that are unverified
*
* Note: Callers should first check if crypto is enabled on this device. If it is
* disabled, then we aren't tracking room devices at all, so we can't answer this, and an
* error will be thrown.
*
* @return {bool} the result
*/
Room.prototype.hasUnverifiedDevices = async function() {