From bb9a3eb33db4fb7aab9316ac6a51565dee5eee49 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 2 Aug 2018 16:09:57 +0100 Subject: [PATCH] Support MAU limit error on register too --- src/components/structures/login/Registration.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index 462063406f..1f6a2fbcdb 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -164,7 +164,12 @@ module.exports = React.createClass({ if (!success) { let msg = response.message || response.toString(); // can we give a better error message? - if (response.required_stages && response.required_stages.indexOf('m.login.msisdn') > -1) { + if (response.errcode == 'M_MAU_LIMIT_EXCEEDED') { + msg =
+

{_t("This homeserver has hit its Monthly Active User limit")}

+

{_t("Please contact your service administrator to continue using this service.")}

+
; + } else if (response.required_stages && response.required_stages.indexOf('m.login.msisdn') > -1) { let msisdnAvailable = false; for (const flow of response.available_flows) { msisdnAvailable |= flow.stages.indexOf('m.login.msisdn') > -1;