fix: add Discord channel-edit thread params (#5542) (thanks @stumct)

This commit is contained in:
Shadow
2026-02-12 16:45:39 -06:00
parent 61d57be4c2
commit 43b799391a
2 changed files with 24 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ Docs: https://docs.openclaw.ai
- Agents: prevent file descriptor leaks in child process cleanup. (#13565) Thanks @KyleChen26.
- Agents: prevent double compaction caused by cache TTL bypassing guard. (#13514) Thanks @taw0002.
- Agents: use last API call's cache tokens for context display instead of accumulated sum. (#13805) Thanks @akari-musubi.
- Discord: allow channel-edit to archive/lock threads and set auto-archive duration. (#5542) Thanks @stumct.
- Discord tests: use a partial @buape/carbon mock in slash command coverage. (#13262) Thanks @arosstale.
- Tests: update thread ID handling in Slack message collection tests. (#14108) Thanks @swizzmagik.

View File

@@ -32,4 +32,27 @@ describe("handleDiscordMessageAction", () => {
expect.any(Object),
);
});
it("forwards thread edit fields for channel-edit", async () => {
await handleDiscordMessageAction({
action: "channel-edit",
params: {
channelId: "123456789",
archived: true,
locked: false,
autoArchiveDuration: 1440,
},
cfg: {},
});
expect(handleDiscordAction).toHaveBeenCalledWith(
expect.objectContaining({
action: "channelEdit",
channelId: "123456789",
archived: true,
locked: false,
autoArchiveDuration: 1440,
}),
expect.any(Object),
);
});
});