fix(matrix): align forged mention test with route precheck

This commit is contained in:
Vincent Koc
2026-04-06 16:18:55 +01:00
parent 4ef8f4f53c
commit 90d246959b

View File

@@ -488,7 +488,7 @@ describe("matrix monitor handler pairing account scope", () => {
expect(getMemberDisplayName).not.toHaveBeenCalledWith("!room:example.org", "@bot:example.org");
});
it("drops forged metadata-only mentions before agent routing", async () => {
it("drops forged metadata-only mentions before session recording", async () => {
const { handler, recordInboundSession, resolveAgentRoute } = createMatrixHandlerTestHarness({
isDirectMessage: false,
mentionRegexes: [/@bot/i],
@@ -505,7 +505,7 @@ describe("matrix monitor handler pairing account scope", () => {
);
expect(recordInboundSession).not.toHaveBeenCalled();
expect(resolveAgentRoute).not.toHaveBeenCalled();
expect(resolveAgentRoute).toHaveBeenCalledTimes(1);
});
it("skips media downloads for unmentioned group media messages", async () => {