v1.7.1: fix bot_test.html theme (localStorage key + css vars + scrollbar), mock MAX API for test users
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import logging
|
||||
import httpx
|
||||
from typing import Optional
|
||||
from app.config import settings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
TEST_USER_THRESHOLD = 999999000
|
||||
|
||||
|
||||
class MaxAPI:
|
||||
def __init__(self):
|
||||
@@ -58,6 +63,9 @@ class MaxAPI:
|
||||
format: Optional[str] = None,
|
||||
notify: bool = True,
|
||||
) -> dict:
|
||||
if user_id >= TEST_USER_THRESHOLD:
|
||||
logger.info(f"MOCK send_message to test user {user_id}: {text[:50]}")
|
||||
return {"ok": True, "mock": True}
|
||||
payload = {"text": text, "notify": notify}
|
||||
if attachments:
|
||||
payload["attachments"] = attachments
|
||||
|
||||
Reference in New Issue
Block a user