This commit is contained in:
Ryan Nelson 2026-01-30 14:09:07 +03:00 committed by GitHub
commit cf5c4ecde0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,8 +337,9 @@ export async function prepareSlackMessage(params: {
maxBytes: ctx.mediaMaxBytes,
});
const rawBody = (message.text ?? "").trim() || media?.placeholder || "";
if (!rawBody) return null;
// Handle ack reactions BEFORE checking for message content
// This ensures reactions work even for messages with no text body
const ackReaction = resolveAckReaction(cfg, route.agentId);
const ackReactionValue = ackReaction ?? "";
@ -372,6 +373,8 @@ export async function prepareSlackMessage(params: {
)
: null;
if (!rawBody) return null;
const roomLabel = channelName ? `#${channelName}` : `#${message.channel}`;
const preview = rawBody.replace(/\s+/g, " ").slice(0, 160);
const inboundLabel = isDirectMessage