mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix: preserve delivery thread fallback (#4911) (thanks @yevhen)
This commit is contained in:
@@ -82,6 +82,7 @@ Status: stable.
|
|||||||
- Telegram: avoid silent empty replies by tracking normalization skips before fallback. (#3796)
|
- Telegram: avoid silent empty replies by tracking normalization skips before fallback. (#3796)
|
||||||
- Telegram: accept numeric messageId/chatId in react action and honor channelId fallback. (#4533) Thanks @Ayush10.
|
- Telegram: accept numeric messageId/chatId in react action and honor channelId fallback. (#4533) Thanks @Ayush10.
|
||||||
- Telegram: scope native skill commands to bound agent per bot. (#4360) Thanks @robhparker.
|
- Telegram: scope native skill commands to bound agent per bot. (#4360) Thanks @robhparker.
|
||||||
|
- Telegram: fall back to session origin thread id for delivery context when missing. (#4911) Thanks @yevhen.
|
||||||
- Mentions: honor mentionPatterns even when explicit mentions are present. (#3303) Thanks @HirokiKobayashi-R.
|
- Mentions: honor mentionPatterns even when explicit mentions are present. (#3303) Thanks @HirokiKobayashi-R.
|
||||||
- Discord: restore username directory lookup in target resolution. (#3131) Thanks @bonald.
|
- Discord: restore username directory lookup in target resolution. (#3131) Thanks @bonald.
|
||||||
- Agents: align MiniMax base URL test expectation with default provider config. (#3131) Thanks @bonald.
|
- Agents: align MiniMax base URL test expectation with default provider config. (#3131) Thanks @bonald.
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function normalizeSessionEntryDelivery(entry: SessionEntry): SessionEntry {
|
|||||||
lastChannel: entry.lastChannel,
|
lastChannel: entry.lastChannel,
|
||||||
lastTo: entry.lastTo,
|
lastTo: entry.lastTo,
|
||||||
lastAccountId: entry.lastAccountId,
|
lastAccountId: entry.lastAccountId,
|
||||||
lastThreadId: entry.lastThreadId ?? entry.origin?.threadId,
|
lastThreadId: entry.lastThreadId ?? entry.deliveryContext?.threadId ?? entry.origin?.threadId,
|
||||||
deliveryContext: entry.deliveryContext,
|
deliveryContext: entry.deliveryContext,
|
||||||
});
|
});
|
||||||
const nextDelivery = normalized.deliveryContext;
|
const nextDelivery = normalized.deliveryContext;
|
||||||
|
|||||||
@@ -88,6 +88,20 @@ describe("delivery context helpers", () => {
|
|||||||
accountId: undefined,
|
accountId: undefined,
|
||||||
threadId: 42,
|
threadId: 42,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(
|
||||||
|
deliveryContextFromSession({
|
||||||
|
channel: "telegram",
|
||||||
|
lastTo: " -1001 ",
|
||||||
|
deliveryContext: { threadId: " 777 " },
|
||||||
|
origin: { threadId: 42 },
|
||||||
|
}),
|
||||||
|
).toEqual({
|
||||||
|
channel: "telegram",
|
||||||
|
to: "-1001",
|
||||||
|
accountId: undefined,
|
||||||
|
threadId: "777",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("normalizes delivery fields and mirrors them on session entries", () => {
|
it("normalizes delivery fields and mirrors them on session entries", () => {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export function deliveryContextFromSession(
|
|||||||
lastChannel: entry.lastChannel,
|
lastChannel: entry.lastChannel,
|
||||||
lastTo: entry.lastTo,
|
lastTo: entry.lastTo,
|
||||||
lastAccountId: entry.lastAccountId,
|
lastAccountId: entry.lastAccountId,
|
||||||
lastThreadId: entry.lastThreadId ?? entry.origin?.threadId,
|
lastThreadId: entry.lastThreadId ?? entry.deliveryContext?.threadId ?? entry.origin?.threadId,
|
||||||
deliveryContext: entry.deliveryContext,
|
deliveryContext: entry.deliveryContext,
|
||||||
};
|
};
|
||||||
return normalizeSessionDeliveryFields(source).deliveryContext;
|
return normalizeSessionDeliveryFields(source).deliveryContext;
|
||||||
|
|||||||
Reference in New Issue
Block a user