mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:20:43 +00:00
fix(discord): pass config to subagent thread binding
This commit is contained in:
committed by
Peter Steinberger
parent
0c46e8000e
commit
84571e45ce
@@ -193,6 +193,15 @@ describe("discord subagent hook handlers", () => {
|
||||
|
||||
expect(hookMocks.autoBindSpawnedDiscordSubagent).toHaveBeenCalledTimes(1);
|
||||
expect(hookMocks.autoBindSpawnedDiscordSubagent).toHaveBeenCalledWith({
|
||||
cfg: expect.objectContaining({
|
||||
channels: expect.objectContaining({
|
||||
discord: expect.objectContaining({
|
||||
threadBindings: expect.objectContaining({
|
||||
spawnSubagentSessions: true,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
accountId: "work",
|
||||
channel: "discord",
|
||||
to: "channel:123",
|
||||
|
||||
@@ -126,6 +126,7 @@ export async function handleDiscordSubagentSpawning(
|
||||
try {
|
||||
const agentId = event.agentId?.trim() || "subagent";
|
||||
const binding = await autoBindSpawnedDiscordSubagent({
|
||||
cfg: api.config,
|
||||
accountId: event.requester?.accountId,
|
||||
channel: event.requester?.channel,
|
||||
to: event.requester?.to,
|
||||
|
||||
Reference in New Issue
Block a user