fix: mark slack channel system events untrusted

This commit is contained in:
Peter Steinberger
2026-05-13 10:52:40 +01:00
parent 66cce180c3
commit 743cbc2f13
2 changed files with 6 additions and 1 deletions

View File

@@ -78,6 +78,10 @@ describe("registerSlackChannelEvents", () => {
});
expect(trackEvent).toHaveBeenCalledTimes(1);
expect(enqueueSystemEventMock).toHaveBeenCalledTimes(1);
expect(enqueueSystemEventMock).toHaveBeenCalledWith("Slack channel created: #general.", {
sessionKey: "agent:main:main",
contextKey: "slack:channel:created:C1",
trusted: false,
});
});
});

View File

@@ -46,6 +46,7 @@ export function registerSlackChannelEvents(params: {
enqueueSystemEvent(`Slack channel ${params.kind}: ${label}.`, {
sessionKey,
contextKey: `slack:channel:${params.kind}:${params.channelId ?? params.channelName ?? "unknown"}`,
trusted: false,
});
};