mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
Slack: support blocks in plugin edit action
This commit is contained in:
@@ -130,13 +130,18 @@ export async function handleSlackMessageAction(params: {
|
||||
const messageId = readStringParam(actionParams, "messageId", {
|
||||
required: true,
|
||||
});
|
||||
const content = readStringParam(actionParams, "message", { required: true });
|
||||
const content = readStringParam(actionParams, "message", { allowEmpty: true });
|
||||
const blocks = readSlackBlocksParam(actionParams);
|
||||
if (!content && !blocks) {
|
||||
throw new Error("Slack edit requires message or blocks.");
|
||||
}
|
||||
return await invoke(
|
||||
{
|
||||
action: "editMessage",
|
||||
channelId: resolveChannelId(),
|
||||
messageId,
|
||||
content,
|
||||
content: content ?? "",
|
||||
blocks,
|
||||
accountId,
|
||||
},
|
||||
cfg,
|
||||
|
||||
Reference in New Issue
Block a user