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,