This commit is contained in:
parent
b44db9d71b
commit
3fa732efbc
@ -116,6 +116,15 @@ def build_req_v1(update: Dict[str, Any], bot_name: str) -> Dict[str, Any]:
|
||||
elif cbq and isinstance(cbq.get("data"), str):
|
||||
raw_cmd = None # callbacks carry 'data' instead
|
||||
|
||||
# --- NEW: pseudo-commands for media so we can route from Admin ---
|
||||
if not raw_cmd:
|
||||
if media and isinstance(media, dict):
|
||||
mtype = (media.get("type") or "").lower()
|
||||
if mtype in {"voice", "audio", "video", "photo", "document", "animation", "video_note"}:
|
||||
raw_cmd = f"__{mtype}__"
|
||||
elif location:
|
||||
raw_cmd = "__location__"
|
||||
|
||||
env = {
|
||||
"schema_version": schema_version,
|
||||
"bot": {"username": bot_name},
|
||||
|
Loading…
x
Reference in New Issue
Block a user