mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(telegram): namespace slash SessionKey by agent
Fixes openclaw/openclaw#38648
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user