mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:51:25 +00:00
fix(webchat): support image-only sends
This commit is contained in:
@@ -338,6 +338,15 @@ export const chatHandlers: GatewayRequestHandlers = {
|
||||
: undefined,
|
||||
}))
|
||||
.filter((a) => a.content) ?? [];
|
||||
const rawMessage = p.message.trim();
|
||||
if (!rawMessage && normalizedAttachments.length === 0) {
|
||||
respond(
|
||||
false,
|
||||
undefined,
|
||||
errorShape(ErrorCodes.INVALID_REQUEST, "message or attachment required"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
let parsedMessage = p.message;
|
||||
let parsedImages: ChatImageContent[] = [];
|
||||
if (normalizedAttachments.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user