mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 00:46:14 +00:00
fix(discord): honor threadId for thread-reply
This commit is contained in:
@@ -393,11 +393,17 @@ export async function tryHandleDiscordMessageActionGuildAdmin(params: {
|
||||
});
|
||||
const mediaUrl = readStringParam(actionParams, "media", { trim: false });
|
||||
const replyTo = readStringParam(actionParams, "replyTo");
|
||||
|
||||
// `message.thread-reply` (tool) uses `threadId`, while the CLI historically used `to`/`channelId`.
|
||||
// Prefer `threadId` when present to avoid accidentally replying in the parent channel.
|
||||
const threadId = readStringParam(actionParams, "threadId");
|
||||
const channelId = threadId ?? resolveChannelId();
|
||||
|
||||
return await handleDiscordAction(
|
||||
{
|
||||
action: "threadReply",
|
||||
accountId: accountId ?? undefined,
|
||||
channelId: resolveChannelId(),
|
||||
channelId,
|
||||
content,
|
||||
mediaUrl: mediaUrl ?? undefined,
|
||||
replyTo: replyTo ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user