From 6e7cb63e7d54ba97a5ab53e76e1efcc358ac28fb Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 24 Jun 2019 13:02:58 -0600 Subject: [PATCH] Check for lazy-loading support in the spec versions instead Fixes https://github.com/vector-im/riot-web/issues/9966 --- src/client.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index e2cbf4a88..920055012 100644 --- a/src/client.js +++ b/src/client.js @@ -3925,9 +3925,13 @@ MatrixClient.prototype.doesServerSupportLazyLoading = async function() { prefix: '', }, ); + + const versions = response["versions"]; const unstableFeatures = response["unstable_features"]; + this._serverSupportsLazyLoading = - unstableFeatures && unstableFeatures["m.lazy_load_members"]; + (versions && versions.includes("r0.5.0")) + || (unstableFeatures && unstableFeatures["m.lazy_load_members"]); } return this._serverSupportsLazyLoading; };