We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b6fadc commit db18b88Copy full SHA for db18b88
1 file changed
apps/sim/app/api/tools/slack/utils.ts
@@ -153,9 +153,11 @@ async function completeSlackFileUpload(
153
body: JSON.stringify({
154
files: uploadedFileIds.map((id) => ({ id })),
155
channel_id: channel,
156
- initial_comment: text,
+ // Per Slack docs for files.completeUploadExternal: if `initial_comment`
157
+ // is provided, `blocks` is silently ignored. So when blocks are present
158
+ // we omit initial_comment and let blocks render instead.
159
+ ...(blocks && blocks.length > 0 ? { blocks } : { initial_comment: text }),
160
...(threadTs && { thread_ts: threadTs }),
- ...(blocks && blocks.length > 0 && { blocks }),
161
}),
162
})
163
0 commit comments