Сервер: уточнить правила имён каналов и поиск треда

This commit is contained in:
AidarKC
2026-07-25 21:16:15 +04:00
parent 8ddf592ffc
commit 1dddb5fb3c
7 changed files with 34 additions and 35 deletions
+2 -1
View File
@@ -86,11 +86,12 @@ export function toUserMessage(error, fallback = 'Действие не выпо
code === 'BAD_CHANNEL_NAME' ||
text.includes('channel name must match') ||
text.includes('channelname contains unsupported') ||
text.includes('channelname must not contain only digits') ||
text.includes('channelname length must be 3..32') ||
text.includes('channelname length must be 1..32') ||
text.includes('bad_channel_name')
) {
return 'Некорректное название канала. Разрешены кириллица, латиница, цифры, пробел, _ и - (1..32 символа).';
return 'Некорректное название канала. Разрешены только латинские буквы, цифры, _ и -. Длина: 3..32. Название не должно состоять только из цифр.';
}
if (text.includes('channel name is required') || text.includes('введите имя канала')) {