Support MAU limit error on register too
This commit is contained in:
parent
cc58b06226
commit
bb9a3eb33d
1 changed files with 6 additions and 1 deletions
|
@ -164,7 +164,12 @@ module.exports = React.createClass({
|
||||||
if (!success) {
|
if (!success) {
|
||||||
let msg = response.message || response.toString();
|
let msg = response.message || response.toString();
|
||||||
// can we give a better error message?
|
// 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 = <div>
|
||||||
|
<p>{_t("This homeserver has hit its Monthly Active User limit")}</p>
|
||||||
|
<p>{_t("Please contact your service administrator to continue using this service.")}</p>
|
||||||
|
</div>;
|
||||||
|
} else if (response.required_stages && response.required_stages.indexOf('m.login.msisdn') > -1) {
|
||||||
let msisdnAvailable = false;
|
let msisdnAvailable = false;
|
||||||
for (const flow of response.available_flows) {
|
for (const flow of response.available_flows) {
|
||||||
msisdnAvailable |= flow.stages.indexOf('m.login.msisdn') > -1;
|
msisdnAvailable |= flow.stages.indexOf('m.login.msisdn') > -1;
|
||||||
|
|
Loading…
Reference in a new issue