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
30 changes: 10 additions & 20 deletions apps/sim/blocks/blocks/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
'get_user_presence',
'edit_canvas',
'get_canvas',
'list_canvases',
'lookup_canvas_sections',
'delete_canvas',
'create_conversation',
Expand All @@ -168,7 +167,11 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
},
}
},
required: true,
required: {
field: 'operation',
value: 'list_canvases',
not: true,
},
},
{
id: 'manualChannel',
Expand All @@ -191,7 +194,6 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
'get_user_presence',
'edit_canvas',
'get_canvas',
'list_canvases',
'lookup_canvas_sections',
'delete_canvas',
'create_conversation',
Expand All @@ -208,7 +210,11 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
},
}
},
required: true,
required: {
field: 'operation',
value: 'list_canvases',
not: true,
},
},
{
id: 'dmUserId',
Expand Down Expand Up @@ -845,17 +851,6 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
required: true,
},
// List Canvases specific fields
{
id: 'canvasListChannel',
title: 'Channel ID',
type: 'short-input',
placeholder: 'Optional channel filter (e.g., C1234567890)',
condition: {
field: 'operation',
value: 'list_canvases',
},
mode: 'advanced',
},
{
id: 'canvasListCount',
title: 'Canvas Limit',
Expand Down Expand Up @@ -1315,7 +1310,6 @@ Do not include any explanations, markdown formatting, or other text outside the
channelCanvasTitle,
channelCanvasContent,
getCanvasId,
canvasListChannel,
canvasListCount,
canvasListPage,
canvasListUser,
Expand Down Expand Up @@ -1509,9 +1503,6 @@ Do not include any explanations, markdown formatting, or other text outside the
break

case 'list_canvases':
if (canvasListChannel) {
baseParams.channel = String(canvasListChannel).trim()
}
Comment thread
icecrasher321 marked this conversation as resolved.
if (canvasListCount) {
const parsedCount = Number.parseInt(canvasListCount, 10)
if (!Number.isNaN(parsedCount) && parsedCount > 0) {
Expand Down Expand Up @@ -1667,7 +1658,6 @@ Do not include any explanations, markdown formatting, or other text outside the
channelCanvasContent: { type: 'string', description: 'Content for channel canvas' },
// Canvas management inputs
getCanvasId: { type: 'string', description: 'Canvas ID to retrieve' },
canvasListChannel: { type: 'string', description: 'Optional channel filter for canvases' },
canvasListCount: { type: 'string', description: 'Maximum number of canvases to return' },
canvasListPage: { type: 'string', description: 'Canvas list page number' },
canvasListUser: { type: 'string', description: 'Optional canvas creator user filter' },
Expand Down
Loading