mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-07 23:31:07 +00:00
fix(telegram): keep topic thread when replying with message tool
This commit is contained in:
@@ -254,6 +254,20 @@ describe("telegramPlugin threading", () => {
|
||||
currentThreadTs: "77",
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps current DM topic threadId even when replyToId is present", () => {
|
||||
const resolved = telegramPlugin.threading?.resolveAutoThreadId?.({
|
||||
cfg: createCfg(),
|
||||
to: "telegram:1234",
|
||||
replyToId: "4103",
|
||||
toolContext: {
|
||||
currentChannelId: "telegram:1234",
|
||||
currentThreadTs: "533274",
|
||||
},
|
||||
});
|
||||
|
||||
expect(resolved).toBe("533274");
|
||||
});
|
||||
});
|
||||
|
||||
describe("telegramPlugin bindings", () => {
|
||||
|
||||
@@ -824,8 +824,8 @@ export const telegramPlugin = createChatChannelPlugin({
|
||||
threading: {
|
||||
topLevelReplyToMode: "telegram",
|
||||
buildToolContext: (params) => buildTelegramThreadingToolContext(params),
|
||||
resolveAutoThreadId: ({ to, toolContext, replyToId }) =>
|
||||
replyToId ? undefined : resolveTelegramAutoThreadId({ to, toolContext }),
|
||||
resolveAutoThreadId: ({ to, toolContext }) =>
|
||||
resolveTelegramAutoThreadId({ to, toolContext }),
|
||||
},
|
||||
outbound: {
|
||||
base: {
|
||||
|
||||
Reference in New Issue
Block a user