Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed May 24, 2024
1 parent 6562d85 commit 5f79cfb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/bolt_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def respond_to_app_mention(
}
content = [message_text_item]

if can_send_image_url_to_openai(context):
if reply.get("bot_id") is None and can_send_image_url_to_openai(
context
):
append_image_content_if_exists(
bot_token=context.bot_token,
files=reply.get("files"),
Expand Down Expand Up @@ -168,7 +170,7 @@ def respond_to_app_mention(
}
content = [message_text_item]

if can_send_image_url_to_openai(context):
if payload.get("bot_id") is None and can_send_image_url_to_openai(context):
append_image_content_if_exists(
bot_token=context.bot_token,
files=payload.get("files"),
Expand Down Expand Up @@ -398,7 +400,7 @@ def respond_to_new_message(
+ format_openai_message_content(reply_text, TRANSLATE_MARKDOWN),
}
]
if can_send_image_url_to_openai(context):
if reply.get("bot_id") is None and can_send_image_url_to_openai(context):
append_image_content_if_exists(
bot_token=context.bot_token,
files=reply.get("files"),
Expand Down

0 comments on commit 5f79cfb

Please sign in to comment.