Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/sim/blocks/blocks/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
id: 'updateText',
title: 'New Message Text',
type: 'long-input',
canonicalParamId: 'text',
placeholder: 'Enter new message text (supports Slack mrkdwn)',
condition: {
field: 'operation',
Expand Down Expand Up @@ -316,6 +315,7 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
operation,
channel,
manualChannel,
text,
title,
content,
limit,
Expand Down Expand Up @@ -359,10 +359,10 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
// Handle operation-specific params
switch (operation) {
case 'send': {
if (!rest.text) {
if (!text || text.trim() === '') {
throw new Error('Message text is required for send operation')
}
baseParams.text = rest.text
baseParams.text = text
// Add thread_ts if provided
if (threadTs) {
baseParams.thread_ts = threadTs
Expand Down