mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat(users): кнопка «Отправить сообщение» в карточке пользователя
Паритет с бот-кнопкой «✉️ Отправить сообщение»: в блоке действий карточки
юзера появляется кнопка (RBAC users:send_message), открывающая модалку с
текстом (HTML, лимит 4096) — бот отправляет юзеру прямое сообщение через
POST /admin/users/{id}/send-message.
Для email-only юзеров без telegram_id кнопка задизейблена с подсказкой;
коды ошибок бэкенда (no_telegram_id / forbidden / bad_request) маппятся
в честные локализованные сообщения. Локали ru/en/fa/zh.
This commit is contained in:
@@ -3342,6 +3342,20 @@
|
||||
"confirm": {
|
||||
"block": "Block this user?"
|
||||
},
|
||||
"sendMessage": {
|
||||
"button": "✉️ Send message",
|
||||
"title": "Send message to user",
|
||||
"placeholder": "Text the bot will send to the user (HTML supported)",
|
||||
"send": "Send",
|
||||
"sending": "Sending...",
|
||||
"success": "Message sent to user",
|
||||
"noTelegram": "This user is registered by email only and cannot receive Telegram messages",
|
||||
"errors": {
|
||||
"no_telegram_id": "This user is registered by email only and cannot receive Telegram messages",
|
||||
"forbidden": "The user has blocked the bot or cannot receive messages",
|
||||
"bad_request": "Telegram rejected the message. Check the text (HTML markup) and try again"
|
||||
}
|
||||
},
|
||||
"userActions": {
|
||||
"delete": "Delete user",
|
||||
"resetTrial": "Reset trial",
|
||||
|
||||
Reference in New Issue
Block a user