mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(slack): remove update message incorrect canonical param (#1964)
* fix(slack): send message tool * add logging * add more logs * add more logs * fix canonical param
This commit is contained in:
committed by
GitHub
parent
d50aefcc68
commit
07e803cfdd
@@ -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',
|
||||
@@ -316,6 +315,7 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
|
||||
operation,
|
||||
channel,
|
||||
manualChannel,
|
||||
text,
|
||||
title,
|
||||
content,
|
||||
limit,
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user