From 5608628e71edc1bc891683cafb732eb47228fea8 Mon Sep 17 00:00:00 2001 From: BadStorm Developer Date: Sat, 5 Sep 2026 17:06:39 +0200 Subject: [PATCH] fix(talkbot): reply to image messages with translated captions --- containers/talkbot/server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/containers/talkbot/server.py b/containers/talkbot/server.py index 0091f37..483e673 100644 --- a/containers/talkbot/server.py +++ b/containers/talkbot/server.py @@ -1241,6 +1241,11 @@ def process_event(job: dict) -> None: preserve_original = job.get("preserve_original", False) reply_to_message_id = job.get("reply_to_message_id") + # A caption attached to an image is not itself an inReplyTo event. In + # that case the translation must reply to the image message itself. + if preserve_original and reply_to_message_id is None: + reply_to_message_id = message_id + try: recipients = get_target_user_ids( token,