mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 09:08:38 +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];
|
)[0]?.[0];
|
||||||
expect(call?.ctx?.OriginatingChannel).toBe("telegram");
|
expect(call?.ctx?.OriginatingChannel).toBe("telegram");
|
||||||
expect(call?.ctx?.Provider).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 () => {
|
it("awaits session metadata persistence before dispatch", async () => {
|
||||||
|
|||||||
@@ -669,7 +669,7 @@ export const registerTelegramNativeCommands = ({
|
|||||||
WasMentioned: true,
|
WasMentioned: true,
|
||||||
CommandAuthorized: commandAuthorized,
|
CommandAuthorized: commandAuthorized,
|
||||||
CommandSource: "native" as const,
|
CommandSource: "native" as const,
|
||||||
SessionKey: `telegram:slash:${senderId || chatId}`,
|
SessionKey: `agent:${route.agentId}:telegram:slash:${senderId || chatId}`,
|
||||||
AccountId: route.accountId,
|
AccountId: route.accountId,
|
||||||
CommandTargetSessionKey: sessionKey,
|
CommandTargetSessionKey: sessionKey,
|
||||||
MessageThreadId: threadSpec.id,
|
MessageThreadId: threadSpec.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user