mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 10:21:40 +00:00
fix(telegram): also check caption for bot media replies
Address Greptile review feedback: bot media messages (photo/video) use caption instead of text, so they would be incorrectly classified as system messages. Add !caption guard to the system message check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
8fdd1d2f05
commit
dc2aa1e21d
@@ -478,7 +478,10 @@ export const buildTelegramMessageContext = async ({
|
||||
const replyFromId = msg.reply_to_message?.from?.id;
|
||||
const replyToBotMessage = botId != null && replyFromId === botId;
|
||||
const isReplyToSystemMessage =
|
||||
replyToBotMessage && msg.reply_to_message?.from?.is_bot === true && !msg.reply_to_message?.text;
|
||||
replyToBotMessage &&
|
||||
msg.reply_to_message?.from?.is_bot === true &&
|
||||
!msg.reply_to_message?.text &&
|
||||
!msg.reply_to_message?.caption;
|
||||
const implicitMention = replyToBotMessage && !isReplyToSystemMessage;
|
||||
const canDetectMention = Boolean(botUsername) || mentionRegexes.length > 0;
|
||||
const mentionGate = resolveMentionGatingWithBypass({
|
||||
|
||||
Reference in New Issue
Block a user