fix: remove duplicate Telegram DM thread helper · openclaw/openclaw@a7d2953
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
File tree
extensions/telegram/src/bot
| Original file line number | Diff line number | Diff line change |
|---|
@@ -273,24 +273,6 @@ export function resolveTelegramThreadSpec(params: {
|
273 | 273 | }; |
274 | 274 | } |
275 | 275 | |
276 | | -export function shouldUseTelegramDmThreadSession(params: { |
277 | | -dmThreadId?: number; |
278 | | -directConfig?: TelegramDirectConfig; |
279 | | -topicConfig?: TelegramTopicConfig; |
280 | | -}): boolean { |
281 | | -if (params.dmThreadId == null) { |
282 | | -return false; |
283 | | -} |
284 | | -const explicitPolicy = params.directConfig?.threadReplies; |
285 | | -if (explicitPolicy === "off") { |
286 | | -return false; |
287 | | -} |
288 | | -if (explicitPolicy === "inbound" || explicitPolicy === "always") { |
289 | | -return true; |
290 | | -} |
291 | | -return params.directConfig?.requireTopic === true || params.topicConfig !== undefined; |
292 | | -} |
293 | | - |
294 | 276 | /** |
295 | 277 | * Build thread params for Telegram API calls (messages, media). |
296 | 278 | * |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。