mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 17:00:23 +00:00
fix: preserve session thread ids in agent send events
This commit is contained in:
@@ -544,12 +544,20 @@ describe("gateway agent handler", () => {
|
||||
updatedAt: Date.now(),
|
||||
fastMode: true,
|
||||
sendPolicy: "deny",
|
||||
lastChannel: "telegram",
|
||||
lastTo: "-100123",
|
||||
lastAccountId: "acct-1",
|
||||
lastThreadId: 42,
|
||||
});
|
||||
mocks.updateSessionStore.mockImplementation(async (_path, updater) => {
|
||||
const store: Record<string, unknown> = {
|
||||
"agent:main:main": buildExistingMainStoreEntry({
|
||||
fastMode: true,
|
||||
sendPolicy: "deny",
|
||||
lastChannel: "telegram",
|
||||
lastTo: "-100123",
|
||||
lastAccountId: "acct-1",
|
||||
lastThreadId: 42,
|
||||
}),
|
||||
};
|
||||
return await updater(store);
|
||||
@@ -557,6 +565,10 @@ describe("gateway agent handler", () => {
|
||||
mocks.loadGatewaySessionRow.mockReturnValue({
|
||||
fastMode: true,
|
||||
sendPolicy: "deny",
|
||||
lastChannel: "telegram",
|
||||
lastTo: "-100123",
|
||||
lastAccountId: "acct-1",
|
||||
lastThreadId: 42,
|
||||
totalTokens: 12,
|
||||
status: "running",
|
||||
});
|
||||
@@ -590,6 +602,10 @@ describe("gateway agent handler", () => {
|
||||
reason: "send",
|
||||
fastMode: true,
|
||||
sendPolicy: "deny",
|
||||
lastChannel: "telegram",
|
||||
lastTo: "-100123",
|
||||
lastAccountId: "acct-1",
|
||||
lastThreadId: 42,
|
||||
totalTokens: 12,
|
||||
status: "running",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user