Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@zerone0x
Copy link
Contributor

Summary

Fixes #1675

Adds a channels.telegram.linkPreview config option to control whether link previews are shown in outbound messages. Setting it to false disables URL previews using Telegram's link_preview_options.is_disabled API parameter.

Changes

  • Add linkPreview?: boolean to TelegramAccountConfig type
  • Add Zod schema validation for the new config option
  • Pass link_preview_options to sendMessage API calls when linkPreview: false
  • Propagate linkPreview config through deliverReplies and all callers
  • Add unit tests for link preview behavior

Usage

{
  "channels": {
    "telegram": {
      "linkPreview": false
    }
  }
}

Test plan

  • Build passes (pnpm build)
  • Lint passes (pnpm lint)
  • Unit tests pass with new test cases for linkPreview behavior
  • Manual testing: verify link previews are suppressed with linkPreview: false

🤖 Generated with Claude Code

Add channels.telegram.linkPreview config to control whether link previews
are shown in outbound messages. When set to false, uses Telegram's
link_preview_options.is_disabled to suppress URL previews.

- Add linkPreview to TelegramAccountConfig type
- Add Zod schema validation for linkPreview
- Pass link_preview_options to sendMessage in send.ts and bot/delivery.ts
- Propagate linkPreview config through deliverReplies callers
- Add tests for link preview behavior

Fixes openclaw#1675

Co-Authored-By: Claude <[email protected]>
@steipete steipete merged commit 92ab3f2 into openclaw:main Jan 25, 2026
21 of 22 checks passed
@steipete
Copy link
Contributor

steipete commented Jan 25, 2026

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: 2f6a047
  • Merge commit: 92ab3f2

Thanks @zerone0x!

steipete added a commit that referenced this pull request Jan 25, 2026
* feat: add notice directive parsing

* fix: honor telegram linkPreview config (#1700) (thanks @zerone0x)
jaydenfyi pushed a commit to jaydenfyi/clawdbot that referenced this pull request Jan 25, 2026
* feat: add notice directive parsing

* fix: honor telegram linkPreview config (openclaw#1700) (thanks @zerone0x)
mcinteerj pushed a commit to mcinteerj/moltbot that referenced this pull request Jan 25, 2026
* feat: add notice directive parsing

* fix: honor telegram linkPreview config (openclaw#1700) (thanks @zerone0x)
rodrigouroz pushed a commit to rodrigouroz/moltbot that referenced this pull request Jan 26, 2026
* feat: add notice directive parsing

* fix: honor telegram linkPreview config (openclaw#1700) (thanks @zerone0x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add channels.telegram.linkPreview config option

2 participants