Skip to content

Add bot option to disable link previews in operator topics - #97

Merged
remdex merged 1 commit into
LiveHelperChat:masterfrom
mysubcult:feat/topic-disable-link-preview
Oct 26, 2026
Merged

remdex merged 1 commit into
LiveHelperChat:masterfrom
mysubcult:feat/topic-disable-link-preview

Conversation

@mysubcult

Copy link
Copy Markdown
Contributor

Follow-up to #93 (disable_link_preview for messages sent to visitors).

Operators who work from Telegram group topics get a link preview card under every message with a URL (new chat notice with the referrer, visitor messages, bot replies). For support chats these cards mostly take space, so this adds a per-bot switch for the operators group.

  • New checkbox Disable link previews in topic messages in the bot edit form (lhc_telegram_bot.disable_link_preview, default 0, added to structure.json / install.sql).
  • TelegramLiveHelperChatOperator::sendMessage() wraps Request::sendMessage() and adds link_preview_options.is_disabled when the bot of that group has the option on. Calls that already pass a preview option are left alone.
  • The option is read on every send (no static cache), so long running background workers pick up a change without a restart.
  • README: note next to the visitor option.

Default is off, so nothing changes for existing installs.

🤖 Generated with Claude Code

New per-bot checkbox "Disable link previews in topic messages"
(lhc_telegram_bot.disable_link_preview, default 0). When it is set, every
sendMessage to the bot's operators group gets link_preview_options.is_disabled,
unless the caller already set a preview option. Visitor messages keep using
the disable_link_preview attribute of the incoming webhook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mysubcult added a commit to mysubcult/telegram that referenced this pull request Oct 24, 2026
Both PRs add a column to lhc_telegram_bot; this resolves the overlap so LiveHelperChat#99 merges cleanly after LiveHelperChat#97.
@remdex
remdex merged commit 482cf34 into LiveHelperChat:master Oct 26, 2026
mysubcult added a commit to mysubcult/telegram that referenced this pull request Oct 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mysubcult added a commit to mysubcult/telegram that referenced this pull request Oct 26, 2026
…perChat#98, LiveHelperChat#100, LiveHelperChat#101, LiveHelperChat#104 accepted upstream; fork already had them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mysubcult
mysubcult deleted the feat/topic-disable-link-preview branch October 26, 2026 17:45
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.

2 participants