fix: omit parse_mode from payload when None instead of sending null
This commit is contained in:
@@ -69,8 +69,10 @@ def edit_message(tg_cfg: TelegramConfig, chat_id: str, msg_id: int,
|
||||
text: str, reply_markup: dict = None, parse_mode: str = "MarkdownV2"):
|
||||
payload = {
|
||||
"chat_id": chat_id, "message_id": msg_id,
|
||||
"text": text, "parse_mode": parse_mode,
|
||||
"text": text,
|
||||
}
|
||||
if parse_mode:
|
||||
payload["parse_mode"] = parse_mode
|
||||
if reply_markup:
|
||||
payload["reply_markup"] = reply_markup
|
||||
_tg_req(tg_cfg, "editMessageText", payload)
|
||||
|
||||
Reference in New Issue
Block a user