惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
雷峰网
雷峰网
博客园_首页
WordPress大学
WordPress大学
博客园 - 司徒正美
爱范儿
爱范儿
博客园 - 聂微东
IT之家
IT之家
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
博客园 - Franky
V
V2EX
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(channels): preserve Telegram SecretRef prompt config ...
lonexreb · 2026-05-28 · via Recent Commits to openclaw:main

@@ -130,6 +130,16 @@ function inspectTokenValue(params: { cfg: OpenClawConfig; value: unknown }): {

130130

return null;

131131

}

132132133+

function hasConfiguredTelegramAccounts(cfg: OpenClawConfig): boolean {

134+

const accounts = cfg.channels?.telegram?.accounts;

135+

return (

136+

!!accounts &&

137+

typeof accounts === "object" &&

138+

!Array.isArray(accounts) &&

139+

Object.keys(accounts).length > 0

140+

);

141+

}

142+133143

function inspectTelegramAccountPrimary(params: {

134144

cfg: OpenClawConfig;

135145

accountId: string;

@@ -140,6 +150,10 @@ function inspectTelegramAccountPrimary(params: {

140150

const enabled = params.cfg.channels?.telegram?.enabled !== false && merged.enabled !== false;

141151142152

const accountConfig = resolveTelegramAccountConfig(params.cfg, accountId);

153+

const allowChannelCredentialFallback =

154+

accountId === DEFAULT_ACCOUNT_ID ||

155+

!!accountConfig ||

156+

!hasConfiguredTelegramAccounts(params.cfg);

143157

const accountTokenFile = inspectTokenFile(accountConfig?.tokenFile);

144158

if (accountTokenFile) {

145159

return {

@@ -168,35 +182,37 @@ function inspectTelegramAccountPrimary(params: {

168182

};

169183

}

170184171-

const channelTokenFile = inspectTokenFile(params.cfg.channels?.telegram?.tokenFile);

172-

if (channelTokenFile) {

173-

return {

174-

accountId,

175-

enabled,

176-

name: normalizeOptionalString(merged.name),

177-

token: channelTokenFile.token,

178-

tokenSource: channelTokenFile.tokenSource,

179-

tokenStatus: channelTokenFile.tokenStatus,

180-

configured: channelTokenFile.tokenStatus !== "missing",

181-

config: merged,

182-

};

183-

}

185+

if (allowChannelCredentialFallback) {

186+

const channelTokenFile = inspectTokenFile(params.cfg.channels?.telegram?.tokenFile);

187+

if (channelTokenFile) {

188+

return {

189+

accountId,

190+

enabled,

191+

name: normalizeOptionalString(merged.name),

192+

token: channelTokenFile.token,

193+

tokenSource: channelTokenFile.tokenSource,

194+

tokenStatus: channelTokenFile.tokenStatus,

195+

configured: channelTokenFile.tokenStatus !== "missing",

196+

config: merged,

197+

};

198+

}

184199185-

const channelToken = inspectTokenValue({

186-

cfg: params.cfg,

187-

value: params.cfg.channels?.telegram?.botToken,

188-

});

189-

if (channelToken) {

190-

return {

191-

accountId,

192-

enabled,

193-

name: normalizeOptionalString(merged.name),

194-

token: channelToken.token,

195-

tokenSource: channelToken.tokenSource,

196-

tokenStatus: channelToken.tokenStatus,

197-

configured: channelToken.tokenStatus !== "missing",

198-

config: merged,

199-

};

200+

const channelToken = inspectTokenValue({

201+

cfg: params.cfg,

202+

value: params.cfg.channels?.telegram?.botToken,

203+

});

204+

if (channelToken) {

205+

return {

206+

accountId,

207+

enabled,

208+

name: normalizeOptionalString(merged.name),

209+

token: channelToken.token,

210+

tokenSource: channelToken.tokenSource,

211+

tokenStatus: channelToken.tokenStatus,

212+

configured: channelToken.tokenStatus !== "missing",

213+

config: merged,

214+

};

215+

}

200216

}

201217202218

const allowEnv = accountId === DEFAULT_ACCOUNT_ID;