fix(telegram): namespace slash SessionKey by agent

Fixes openclaw/openclaw#38648
This commit is contained in:
john
2026-03-07 15:55:15 +08:00
committed by Ayaan Zaidi
parent 05c240fad6
commit e8f419c4e0
2 changed files with 2 additions and 2 deletions

View File

@@ -198,7 +198,7 @@ describe("registerTelegramNativeCommands — session metadata", () => {
)[0]?.[0];
expect(call?.ctx?.OriginatingChannel).toBe("telegram");
expect(call?.ctx?.Provider).toBe("telegram");
expect(call?.sessionKey).toBeDefined();
expect(call?.sessionKey).toBe("agent:main:telegram:slash:200");
});
it("awaits session metadata persistence before dispatch", async () => {

View File

@@ -669,7 +669,7 @@ export const registerTelegramNativeCommands = ({
WasMentioned: true,
CommandAuthorized: commandAuthorized,
CommandSource: "native" as const,
SessionKey: `telegram:slash:${senderId || chatId}`,
SessionKey: `agent:${route.agentId}:telegram:slash:${senderId || chatId}`,
AccountId: route.accountId,
CommandTargetSessionKey: sessionKey,
MessageThreadId: threadSpec.id,