add request size limit notifications
All checks were successful
Android Build / publish (push) Successful in 53s
Linux Build / publish (push) Successful in 59s

This commit is contained in:
olcxja 2026-07-18 15:06:20 +02:00
commit 5233b4518f
8 changed files with 26 additions and 8 deletions

View file

@ -14,7 +14,9 @@
"dm.key.too.large": "meowchat key too large :o", "dm.key.too.large": "meowchat key too large :o",
"dm.key.not.found": "meowchat key not found :c", "dm.key.not.found": "meowchat key not found :c",
"dm.key.updated": "meowchat key updated successfully :3", "dm.key.updated": "meowchat key updated successfully :3",
"body.too.large": "request too large ><", "body.too.large": "Meow is too big! Max meow is {0} MB.",
"message.too.long": "Meowssage exceeds maximum allowed size ({0}).",
"reaction.too.long": "Re-meow-ction exceeds maximum allowed size ({0}).",
"invite.revoked": "invite revoked successfully", "invite.revoked": "invite revoked successfully",
"invite.declined": "invite declined successfully", "invite.declined": "invite declined successfully",
"account.creation.request.expired": "cat creation request expired. try again", "account.creation.request.expired": "cat creation request expired. try again",

View file

@ -14,7 +14,9 @@
"dm.key.too.large": "DM key too large", "dm.key.too.large": "DM key too large",
"dm.key.not.found": "DM key not found", "dm.key.not.found": "DM key not found",
"dm.key.updated": "DM key updated successfully", "dm.key.updated": "DM key updated successfully",
"body.too.large": "Request too large", "body.too.large": "Request too large. Max limit is {0} MB",
"message.too.long": "Message exceeds maximum allowed size ({0}).",
"reaction.too.long": "Reaction exceeds maximum allowed size ({0}).",
"invite.revoked": "Invite revoked successfully", "invite.revoked": "Invite revoked successfully",
"invite.declined": "Invite declined successfully", "invite.declined": "Invite declined successfully",
"account.creation.request.expired": "Account creation request expired. Try again", "account.creation.request.expired": "Account creation request expired. Try again",

View file

@ -14,7 +14,9 @@
"dm.key.too.large": "Klucz wiadomości prywatnej jest zbyt duży", "dm.key.too.large": "Klucz wiadomości prywatnej jest zbyt duży",
"dm.key.not.found": "Nie znaleziono klucza wiadomości prywatnej", "dm.key.not.found": "Nie znaleziono klucza wiadomości prywatnej",
"dm.key.updated": "Klucz wiadomości prywatnej został pomyślnie zaktualizowany", "dm.key.updated": "Klucz wiadomości prywatnej został pomyślnie zaktualizowany",
"body.too.large": "Treść żądania jest zbyt duża", "body.too.large": "Treść żądania jest zbyt duża. Maksymalny limit to {0} MB",
"message.too.long": "Wiadomość przekracza dozwolony rozmiar ({0}).",
"reaction.too.long": "Reakcja przekracza dozwolony rozmiar ({0}).",
"invite.revoked": "Zaproszenie zostało cofnięte", "invite.revoked": "Zaproszenie zostało cofnięte",
"invite.declined": "Zaproszenie zostało odrzucone", "invite.declined": "Zaproszenie zostało odrzucone",
"account.creation.request.expired": "Żądanie utworzenia konta wygasło. Spróbuj ponownie", "account.creation.request.expired": "Żądanie utworzenia konta wygasło. Spróbuj ponownie",

View file

@ -2900,9 +2900,12 @@ async function sendMessage(sendbutton = document.getElementById("chat-sendmessag
} }
if (res.status === 413) { if (res.status === 413) {
throw new Error("error.body.too.large"); throw new Error("error:body.too.large");
} }
let text = await res.text(); let text = await res.text();
if (text.startsWith("error:")) {
throw new Error(text);
}
let decText; let decText;
try { try {
decText = await decryptString(text, passwordHash); decText = await decryptString(text, passwordHash);

View file

@ -14,7 +14,9 @@
"dm.key.too.large": "meowchat key too large :o", "dm.key.too.large": "meowchat key too large :o",
"dm.key.not.found": "meowchat key not found :c", "dm.key.not.found": "meowchat key not found :c",
"dm.key.updated": "meowchat key updated successfully :3", "dm.key.updated": "meowchat key updated successfully :3",
"body.too.large": "request too large ><", "body.too.large": "Meow is too big! Max meow is {0} MB.",
"message.too.long": "Meowssage exceeds maximum allowed size ({0}).",
"reaction.too.long": "Re-meow-ction exceeds maximum allowed size ({0}).",
"invite.revoked": "invite revoked successfully", "invite.revoked": "invite revoked successfully",
"invite.declined": "invite declined successfully", "invite.declined": "invite declined successfully",
"account.creation.request.expired": "cat creation request expired. try again", "account.creation.request.expired": "cat creation request expired. try again",

View file

@ -14,7 +14,9 @@
"dm.key.too.large": "DM key too large", "dm.key.too.large": "DM key too large",
"dm.key.not.found": "DM key not found", "dm.key.not.found": "DM key not found",
"dm.key.updated": "DM key updated successfully", "dm.key.updated": "DM key updated successfully",
"body.too.large": "Request too large", "body.too.large": "Request too large. Max limit is {0} MB",
"message.too.long": "Message exceeds maximum allowed size ({0}).",
"reaction.too.long": "Reaction exceeds maximum allowed size ({0}).",
"invite.revoked": "Invite revoked successfully", "invite.revoked": "Invite revoked successfully",
"invite.declined": "Invite declined successfully", "invite.declined": "Invite declined successfully",
"account.creation.request.expired": "Account creation request expired. Try again", "account.creation.request.expired": "Account creation request expired. Try again",

View file

@ -14,7 +14,9 @@
"dm.key.too.large": "Klucz wiadomości prywatnej jest zbyt duży", "dm.key.too.large": "Klucz wiadomości prywatnej jest zbyt duży",
"dm.key.not.found": "Nie znaleziono klucza wiadomości prywatnej", "dm.key.not.found": "Nie znaleziono klucza wiadomości prywatnej",
"dm.key.updated": "Klucz wiadomości prywatnej został pomyślnie zaktualizowany", "dm.key.updated": "Klucz wiadomości prywatnej został pomyślnie zaktualizowany",
"body.too.large": "Treść żądania jest zbyt duża", "body.too.large": "Treść żądania jest zbyt duża. Maksymalny limit to {0} MB",
"message.too.long": "Wiadomość przekracza dozwolony rozmiar ({0}).",
"reaction.too.long": "Reakcja przekracza dozwolony rozmiar ({0}).",
"invite.revoked": "Zaproszenie zostało cofnięte", "invite.revoked": "Zaproszenie zostało cofnięte",
"invite.declined": "Zaproszenie zostało odrzucone", "invite.declined": "Zaproszenie zostało odrzucone",
"account.creation.request.expired": "Żądanie utworzenia konta wygasło. Spróbuj ponownie", "account.creation.request.expired": "Żądanie utworzenia konta wygasło. Spróbuj ponownie",

View file

@ -2900,9 +2900,12 @@ async function sendMessage(sendbutton = document.getElementById("chat-sendmessag
} }
if (res.status === 413) { if (res.status === 413) {
throw new Error("error.body.too.large"); throw new Error("error:body.too.large");
} }
let text = await res.text(); let text = await res.text();
if (text.startsWith("error:")) {
throw new Error(text);
}
let decText; let decText;
try { try {
decText = await decryptString(text, passwordHash); decText = await decryptString(text, passwordHash);