v1.8.0: YandexGPT-only NLP, unknown questions system, callback dedup, consent flow fixes, DELETE cascade, UTC+3, auto-detect sidebar menu, tel:/mailto: links

This commit is contained in:
2026-06-01 18:07:13 +03:00
parent aa1269e013
commit cc87bcf72c
20 changed files with 1453 additions and 301 deletions
+8
View File
@@ -9,6 +9,11 @@ from app.email_sender import email_sender
logger = logging.getLogger(__name__)
MOSCOW_TZ = datetime.timezone(datetime.timedelta(hours=3))
def moscow_now():
return datetime.datetime.now(MOSCOW_TZ).replace(tzinfo=None)
async def handle_inquiry(user_id: int, conv_id: int, text: str) -> None:
async with async_session() as db:
@@ -55,6 +60,9 @@ async def _finalize_ticket_in_tx(
priority="normal",
status="Новая",
created_by="bot",
contact_name=f"{user.first_name or ''} {user.last_name or ''}".strip() or None,
contact_phone=user.phone,
contact_email=user.email,
)
db.add(ticket)
await db.flush()