mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 06:41:22 +00:00
fix(discord): pass silent flag through plugin action handler
The Discord send action was going through the plugin handler path which wasn't passing the silent flag to sendMessageDiscord. - Add silent param reading in handle-action.ts - Pass silent to handleDiscordAction - Add silent param in discord-actions-messaging.ts sendMessage case
This commit is contained in:
@@ -236,6 +236,7 @@ export async function handleDiscordMessagingAction(
|
|||||||
const mediaUrl = readStringParam(params, "mediaUrl");
|
const mediaUrl = readStringParam(params, "mediaUrl");
|
||||||
const replyTo = readStringParam(params, "replyTo");
|
const replyTo = readStringParam(params, "replyTo");
|
||||||
const asVoice = params.asVoice === true;
|
const asVoice = params.asVoice === true;
|
||||||
|
const silent = params.silent === true;
|
||||||
const embeds =
|
const embeds =
|
||||||
Array.isArray(params.embeds) && params.embeds.length > 0 ? params.embeds : undefined;
|
Array.isArray(params.embeds) && params.embeds.length > 0 ? params.embeds : undefined;
|
||||||
|
|
||||||
@@ -266,6 +267,7 @@ export async function handleDiscordMessagingAction(
|
|||||||
mediaUrl,
|
mediaUrl,
|
||||||
replyTo,
|
replyTo,
|
||||||
embeds,
|
embeds,
|
||||||
|
silent,
|
||||||
});
|
});
|
||||||
return jsonResult({ ok: true, result });
|
return jsonResult({ ok: true, result });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export async function handleDiscordMessageAction(
|
|||||||
const replyTo = readStringParam(params, "replyTo");
|
const replyTo = readStringParam(params, "replyTo");
|
||||||
const embeds = Array.isArray(params.embeds) ? params.embeds : undefined;
|
const embeds = Array.isArray(params.embeds) ? params.embeds : undefined;
|
||||||
const asVoice = params.asVoice === true;
|
const asVoice = params.asVoice === true;
|
||||||
|
const silent = params.silent === true;
|
||||||
return await handleDiscordAction(
|
return await handleDiscordAction(
|
||||||
{
|
{
|
||||||
action: "sendMessage",
|
action: "sendMessage",
|
||||||
@@ -56,6 +57,7 @@ export async function handleDiscordMessageAction(
|
|||||||
replyTo: replyTo ?? undefined,
|
replyTo: replyTo ?? undefined,
|
||||||
embeds,
|
embeds,
|
||||||
asVoice,
|
asVoice,
|
||||||
|
silent,
|
||||||
},
|
},
|
||||||
cfg,
|
cfg,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user