Skip to content

Commit 8365268

Browse files
committed
fix(telegram): use context cfg in route resolution, fix topic-agentid test harness
1 parent 6f89237 commit 8365268

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/telegram/bot-message-context.topic-agentid.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ describe("buildTelegramMessageContext per-topic agentId routing", () => {
4343
}) {
4444
return await buildTelegramMessageContextForTest({
4545
message: buildForumMessage(params.threadId),
46+
cfg: loadConfig() as never,
4647
options: { forceWasMentioned: true },
4748
resolveGroupActivation: () => true,
4849
resolveTelegramGroupConfig: () => ({
@@ -115,6 +116,7 @@ describe("buildTelegramMessageContext per-topic agentId routing", () => {
115116

116117
it("routes DM topic to specific agent when agentId is set", async () => {
117118
const ctx = await buildTelegramMessageContextForTest({
119+
cfg: loadConfig() as never,
118120
message: {
119121
message_id: 1,
120122
chat: {

src/telegram/bot-message-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const buildTelegramMessageContext = async ({
8282
// Fresh config for bindings lookup; other routing inputs are payload-derived.
8383
const freshCfg = loadConfig();
8484
let { route, configuredBinding, configuredBindingSessionKey } = resolveTelegramConversationRoute({
85-
cfg: freshCfg,
85+
cfg,
8686
accountId: account.accountId,
8787
chatId,
8888
isGroup,

0 commit comments

Comments
 (0)