Skip to content

feat: add --no-preview flag to send text - #14

Merged
dapi merged 4 commits into
mainfrom
feat/no-preview-flag
Mar 8, 2026
Merged

feat: add --no-preview flag to send text#14
dapi merged 4 commits into
mainfrom
feat/no-preview-flag

Conversation

@dapi

@dapi dapi commented Mar 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add --no-preview boolean flag to tgcli send text to disable automatic link preview via MTProto noWebpage parameter
  • Add noPreview parameter to MCP messagesSend tool
  • Document flag in docs/cli.md and SKILL.md

Closes #10

Changes

  • cli.js: --no-preview option on send text command
  • telegram-client.js: pass noWebpage: true to gramjs sendText() when flag is set
  • mcp-server.js: noPreview boolean in zod schema + handler
  • docs/cli.md: synopsis and explanation
  • SKILL.md: usage example

Test plan

  • tgcli send text --to <chat> --message "https://example.com test" --no-preview — verify no link preview
  • tgcli send text --to <chat> --message "https://example.com test" — verify link preview still works without flag
  • MCP messagesSend with noPreview: true — verify no link preview
  • Verify --reply-to and --topic still work correctly after params refactor

🤖 Generated with Claude Code

dapi and others added 4 commits March 8, 2026 20:33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoid passing empty {} to gramjs sendText when neither replyTo
nor noPreview are set, maintaining original behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dapi

dapi commented Mar 8, 2026

Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@dapi
dapi merged commit 66a0a84 into main Mar 8, 2026
1 check passed
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.

Add --no-preview flag to send text

1 participant