fix(userbot): encode absent pyrogram raw payloads as empty json

This commit is contained in:
hh committed 2026-09-06 21:26:13 +02:00
1 parent 6a6e63ff75
commit 676680319b
15 files changed
+63 -25

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
from pyrogram.raw.core import TLObject
from pyrogram.types import Object
EMPTY_JSON = "{}"
def raw_json(obj: Object | TLObject | None) -> str:
return EMPTY_JSON if obj is None else str(obj)