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

Merge pull request #965 from matrix-org/travis/detect-ll-r0.5

Check for lazy-loading support in the spec versions instead
This commit is contained in:
Travis Ralston
2019-06-25 09:02:20 -06:00
committed by GitHub

View File

@@ -3925,9 +3925,13 @@ MatrixClient.prototype.doesServerSupportLazyLoading = async function() {
prefix: '', prefix: '',
}, },
); );
const versions = response["versions"];
const unstableFeatures = response["unstable_features"]; const unstableFeatures = response["unstable_features"];
this._serverSupportsLazyLoading = this._serverSupportsLazyLoading =
unstableFeatures && unstableFeatures["m.lazy_load_members"]; (versions && versions.includes("r0.5.0"))
|| (unstableFeatures && unstableFeatures["m.lazy_load_members"]);
} }
return this._serverSupportsLazyLoading; return this._serverSupportsLazyLoading;
}; };