























@@ -123,11 +123,11 @@ describe("deliverMattermostReplyPayload", () => {
123123expect(sendMessage).toHaveBeenCalledWith(
124124"channel:town-square",
125125"Intro line\nReasoning: appears in content but is not a prefix",
126-expect.objectContaining({
126+{
127127 cfg,
128128accountId: "default",
129129replyToId: "root-post",
130-}),
130+},
131131);
132132});
133133@@ -158,17 +158,20 @@ describe("deliverMattermostReplyPayload", () => {
158158});
159159160160expect(sendMessage).toHaveBeenCalledTimes(1);
161-expect(sendMessage).toHaveBeenCalledWith(
162-"channel:town-square",
163-"caption",
164-expect.objectContaining({
165- cfg,
166-accountId: "default",
167- mediaUrl,
168-replyToId: "root-post",
169-mediaLocalRoots: expect.arrayContaining([path.join(stateDir, `workspace-${agentId}`)]),
170-}),
171-);
161+expect(sendMessage).toHaveBeenCalledWith("channel:town-square", "caption", {
162+ cfg,
163+accountId: "default",
164+ mediaUrl,
165+replyToId: "root-post",
166+mediaLocalRoots: [
167+path.join(os.tmpdir(), "openclaw"),
168+path.join(stateDir, "media"),
169+path.join(stateDir, "canvas"),
170+path.join(stateDir, "workspace"),
171+path.join(stateDir, "sandboxes"),
172+path.join(stateDir, `workspace-${agentId}`),
173+],
174+});
172175} finally {
173176if (previousStateDir === undefined) {
174177delete process.env.OPENCLAW_STATE_DIR;
@@ -199,14 +202,10 @@ describe("deliverMattermostReplyPayload", () => {
199202});
200203201204expect(sendMessage).toHaveBeenCalledTimes(1);
202-expect(sendMessage).toHaveBeenCalledWith(
203-"channel:town-square",
204-"hello",
205-expect.objectContaining({
206- cfg,
207-accountId: "default",
208-replyToId: "root-post",
209-}),
210-);
205+expect(sendMessage).toHaveBeenCalledWith("channel:town-square", "hello", {
206+ cfg,
207+accountId: "default",
208+replyToId: "root-post",
209+});
211210});
212211});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。