From 02019a58b3bfa2dfdde9eb1a6e794e66792a9b0b Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 2 Aug 2018 17:09:04 +0100 Subject: [PATCH] Support active user limit on message send For https://github.com/vector-im/riot-web/issues/7091 --- src/components/structures/RoomStatusBar.js | 6 ++++++ src/i18n/strings/en_EN.json | 9 ++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index 9aa77e695a..941cab4dda 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -309,10 +309,14 @@ module.exports = React.createClass({ ); } else { let consentError = null; + let mauError = null; for (const m of unsentMessages) { if (m.error && m.error.errcode === 'M_CONSENT_NOT_GIVEN') { consentError = m.error; break; + } else if (m.error && m.error.errcode === 'M_MAU_LIMIT_EXCEEDED') { + mauError = m.error; + break; } } if (consentError) { @@ -327,6 +331,8 @@ module.exports = React.createClass({ , }, ); + } else if (mauError) { + title = _t("Your message wasn’t sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service."); } else if ( unsentMessages.length === 1 && unsentMessages[0].error && diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9acde2b80c..d3f6300c09 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -33,12 +33,6 @@ "VoIP is unsupported": "VoIP is unsupported", "You cannot place VoIP calls in this browser.": "You cannot place VoIP calls in this browser.", "You cannot place a call with yourself.": "You cannot place a call with yourself.", - "Conference calls are not supported in encrypted rooms": "Conference calls are not supported in encrypted rooms", - "Conference calls are not supported in this client": "Conference calls are not supported in this client", - "Warning!": "Warning!", - "Conference calling is in development and may not be reliable.": "Conference calling is in development and may not be reliable.", - "Failed to set up conference call": "Failed to set up conference call", - "Conference call failed.": "Conference call failed.", "Could not connect to the integration server": "Could not connect to the integration server", "A conference call could not be started because the intgrations server is not available": "A conference call could not be started because the intgrations server is not available", "Call in Progress": "Call in Progress", @@ -211,7 +205,6 @@ "Authentication check failed: incorrect password?": "Authentication check failed: incorrect password?", "Failed to join room": "Failed to join room", "Message Pinning": "Message Pinning", - "Jitsi Conference Calling": "Jitsi Conference Calling", "Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing", "Use compact timeline layout": "Use compact timeline layout", "Hide removed messages": "Hide removed messages", @@ -271,6 +264,7 @@ "No display name": "No display name", "New passwords don't match": "New passwords don't match", "Passwords can't be empty": "Passwords can't be empty", + "Warning!": "Warning!", "Changing password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Changing password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.", "Continue": "Continue", "Export E2E room keys": "Export E2E room keys", @@ -1041,6 +1035,7 @@ "Message not sent due to unknown devices being present": "Message not sent due to unknown devices being present", "Show devices, send anyway or cancel.": "Show devices, send anyway or cancel.", "You can't send any messages until you review and agree to our terms and conditions.": "You can't send any messages until you review and agree to our terms and conditions.", + "Your message wasn’t sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.": "Your message wasn’t sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.", "%(count)s of your messages have not been sent.|other": "Some of your messages have not been sent.", "%(count)s of your messages have not been sent.|one": "Your message was not sent.", "%(count)s Resend all or cancel all now. You can also select individual messages to resend or cancel.|other": "Resend all or cancel all now. You can also select individual messages to resend or cancel.",