chore: surface media URL in command prompts and tests

This commit is contained in:
Peter Steinberger
2025-11-25 05:20:50 +01:00
parent 6d41df2941
commit 54c763a679
2 changed files with 25 additions and 6 deletions

View File

@@ -94,8 +94,8 @@ describe("config and templating", () => {
const cfg = {
inbound: {
reply: {
mode: "text" as const,
text: "{{MediaPath}} {{MediaType}} {{MediaUrl}}",
mode: "command" as const,
command: ["echo", "{{Body}}"],
},
},
};
@@ -111,7 +111,9 @@ describe("config and templating", () => {
undefined,
cfg,
);
expect(result?.text).toBe("/tmp/a.jpg image/jpeg http://example.com/a.jpg");
expect(result?.text).toContain("/tmp/a.jpg");
expect(result?.text).toContain("image/jpeg");
expect(result?.text).toContain("http://example.com/a.jpg");
});
it("getReplyFromConfig runs command and manages session store", async () => {