mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 11:21:07 +00:00
fix(regression): preserve numeric session thread ids
This commit is contained in:
@@ -23,6 +23,17 @@ describe("sessions-list-tool", () => {
|
||||
threadId: "thread-1",
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "agent:main:telegram:topic",
|
||||
kind: "direct",
|
||||
sessionId: "sess-telegram-topic",
|
||||
deliveryContext: {
|
||||
channel: "telegram",
|
||||
to: "telegram:topic",
|
||||
accountId: "acct-2",
|
||||
threadId: 271,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -61,7 +72,7 @@ describe("sessions-list-tool", () => {
|
||||
channel?: string;
|
||||
to?: string;
|
||||
accountId?: string;
|
||||
threadId?: string;
|
||||
threadId?: string | number;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
@@ -72,6 +83,12 @@ describe("sessions-list-tool", () => {
|
||||
accountId: "acct-1",
|
||||
threadId: "thread-1",
|
||||
});
|
||||
expect(details.sessions?.[1]?.deliveryContext).toEqual({
|
||||
channel: "telegram",
|
||||
to: "telegram:topic",
|
||||
accountId: "acct-2",
|
||||
threadId: 271,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps numeric deliveryContext.threadId in sessions_list results", async () => {
|
||||
|
||||
Reference in New Issue
Block a user