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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user