Merge 377c40378d into fa9ec6e854
This commit is contained in:
commit
cf5c4ecde0
@ -337,8 +337,9 @@ export async function prepareSlackMessage(params: {
|
|||||||
maxBytes: ctx.mediaMaxBytes,
|
maxBytes: ctx.mediaMaxBytes,
|
||||||
});
|
});
|
||||||
const rawBody = (message.text ?? "").trim() || media?.placeholder || "";
|
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 ackReaction = resolveAckReaction(cfg, route.agentId);
|
||||||
const ackReactionValue = ackReaction ?? "";
|
const ackReactionValue = ackReaction ?? "";
|
||||||
|
|
||||||
@ -372,6 +373,8 @@ export async function prepareSlackMessage(params: {
|
|||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
if (!rawBody) return null;
|
||||||
|
|
||||||
const roomLabel = channelName ? `#${channelName}` : `#${message.channel}`;
|
const roomLabel = channelName ? `#${channelName}` : `#${message.channel}`;
|
||||||
const preview = rawBody.replace(/\s+/g, " ").slice(0, 160);
|
const preview = rawBody.replace(/\s+/g, " ").slice(0, 160);
|
||||||
const inboundLabel = isDirectMessage
|
const inboundLabel = isDirectMessage
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user