mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
fix(get-reply): include inboundUserContext in empty-body guard (#71489)
The empty-body guard only checked baseBodyFinal (current message body) and softResetTail, ignoring inboundUserContext which includes InboundHistory from group chat context. This caused the bot to reject bare @mentions in Feishu group chats where prior messages provided the conversation context via InboundHistory. Now hasUserBody also checks whether inboundUserContext has content, matching the behavior before the 2026.4.12 refactor.
This commit is contained in:
committed by
Peter Steinberger
parent
1549ded4ac
commit
1559e28d6b
@@ -455,7 +455,10 @@ export async function runPreparedReply(
|
||||
.filter(Boolean)
|
||||
.join("\n\n")
|
||||
: [inboundUserContext, baseBodyFinal].filter(Boolean).join("\n\n");
|
||||
const hasUserBody = baseBodyFinal.trim().length > 0 || softResetTail.length > 0;
|
||||
const hasUserBody =
|
||||
baseBodyFinal.trim().length > 0 ||
|
||||
softResetTail.length > 0 ||
|
||||
(inboundUserContext != null && inboundUserContext.trim().length > 0);
|
||||
const hasMediaAttachment = hasInboundMedia(sessionCtx) || (opts?.images?.length ?? 0) > 0;
|
||||
if (!hasUserBody && !hasMediaAttachment) {
|
||||
// Skip onReplyStart when typing is suppressed (e.g. sendPolicy deny) —
|
||||
|
||||
Reference in New Issue
Block a user