Skip to content

feat: telegram instant view for instagram and facebook share links - #13

Merged
musingfox merged 4 commits into
mainfrom
feat/telegram-instant-view
Oct 19, 2026
Merged

musingfox merged 4 commits into
mainfrom
feat/telegram-instant-view

Conversation

@musingfox

Copy link
Copy Markdown
Owner

Summary

  • Crawler og pages for Instagram and Facebook now carry the whole post in an <article> body (full caption, every image as a carousel, videos). The <head> is unchanged.
  • GET /?url=<url>&iv=<rhash> wraps Instagram and Facebook share links in https://t.me/iv?url=...&rhash=..., which opens with the user's own Instant View template without Telegram's approval. Other links come back as the plain share link, since their previews come from fix services the template cannot cover. iv is ignored with raw=1; a non-hex iv is a 400.
  • tg_rhash, which Telegram appends when its Instant View bot fetches the share link, is now cleaned like a tracking parameter (spec updated).
  • docs/telegram-instant-view.iv holds the template; both READMEs describe the setup.

No bindings, variables or config changes: the rhash is supplied by the caller.

Test plan

  • bun run check (unit tests for the article body, &iv=, and tg_rhash)
  • Deployed to a throwaway Worker: the Instant View bot's UA is TelegramBot (like TwitterBot) (matched by isCrawler), and 302'd /media/ images and videos render in Instant View
  • On a phone, t.me/iv links for an Instagram carousel, reel and single image, and a Facebook post and reel, all show text, slideshow and playable video

🤖 Generated with Claude Code

musingfox and others added 4 commits October 19, 2026 17:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…&iv=

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@musingfox
musingfox force-pushed the feat/telegram-instant-view branch from c1d244d to a7aaee6 Compare October 19, 2026 10:20
@musingfox
musingfox merged commit c427bfa into main Oct 19, 2026
1 check passed
@musingfox
musingfox deleted the feat/telegram-instant-view branch October 19, 2026 10:21
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: musingfox/better-link/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 16c13680-f742-4b00-a31f-7a4758c2cb2b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant