diff --git a/backend/app/config.py b/backend/app/config.py index fe62d4a..ac20869 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -256,6 +256,21 @@ class Settings(BaseSettings): n8n_max_auth_webhook: str = "" # Webhook n8n: max_user_id → unified_id, contact_id, has_drafts n8n_auth_webhook: str = "" # Универсальный auth: channel + channel_user_id + init_data → unified_id, phone, contact_id, has_drafts + # ============================================ + # ПОДДЕРЖКА (чат, треды, n8n webhook) + # ============================================ + n8n_support_webhook: str = "" # N8N_SUPPORT_WEBHOOK — URL webhook n8n (multipart). Обязателен для отправки сообщений. + support_attachments_max_count: int = 0 # 0 = без ограничений + support_attachments_max_size_mb: int = 0 # 0 = без ограничений + support_attachments_allowed_types: str = "" # пусто = любые (например: .pdf,.jpg,image/*) + support_incoming_secret: str = "" # Секрет для POST /api/v1/support/incoming (n8n → backend) + + @property + def support_attachments_max_size_bytes(self) -> int: + if self.support_attachments_max_size_mb <= 0: + return 0 + return self.support_attachments_max_size_mb * 1024 * 1024 + # ============================================ # LOGGING # ============================================ diff --git a/frontend/index.html b/frontend/index.html index b43178d..604778c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,7 +3,7 @@
- +