diff --git a/src/tg_bot.py b/src/tg_bot.py index 04f046f..fcd9eaf 100644 --- a/src/tg_bot.py +++ b/src/tg_bot.py @@ -453,7 +453,8 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict): def _handle_message(tg_cfg: TelegramConfig, cfg: Config, msg: dict): chat_id = msg["chat"]["id"] - text = msg.get("text", "").strip() + text = msg.get("text") or msg.get("caption") or "" + text = text.strip() conv = load_conversation(chat_id) if not conv: