v1.8.2: AGENTS.md, consent revocation, delete bot users, dialogues fix, intent improvements, CI for max_bot
Tests / test (push) Has been cancelled
Tests / test-max-bot (push) Has been cancelled

This commit is contained in:
2026-06-02 18:22:45 +03:00
parent a64a274829
commit 4c3026a80f
17 changed files with 572 additions and 54 deletions
+13
View File
@@ -63,6 +63,7 @@ class MaxAPI:
attachments: Optional[list] = None,
format: Optional[str] = None,
notify: bool = True,
conversation_id: int = None,
) -> dict:
if user_id >= TEST_USER_THRESHOLD:
logger.info(f"MOCK send_message to test user {user_id}: {text[:50]}")
@@ -79,6 +80,18 @@ class MaxAPI:
json=payload,
)
r.raise_for_status()
if conversation_id:
from app.database import async_session
from app.models import BotMessage
from app.handlers.greeting import moscow_now
async with async_session() as db:
db.add(BotMessage(
conversation_id=conversation_id,
direction="outgoing",
text=text,
created_at=moscow_now(),
))
await db.commit()
return r.json()
async def answer_callback(