Internationalise M_TOO_LARGE error from Synapse

This commit is contained in:
Michael Telatynski 2019-12-19 13:25:43 +00:00
parent f30e919f9e
commit 3678e64f5d
3 changed files with 9 additions and 2 deletions

View file

@ -49,6 +49,12 @@ export function messageForResourceLimitError(limitType, adminContact, strings, e
}
}
export function messageForSendError(errorData) {
if (errorData.errcode === "M_TOO_LARGE") {
return _t("The message you are trying to send is too large.");
}
}
export function messageForSyncError(err) {
if (err.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') {
const limitError = messageForResourceLimitError(