Users are reporting an issue where Telegram previews for Discourse post links display incorrect or outdated content, despite the actual post link showing the correct excerpt in other tools like Open Graph testers or on different Discourse instances pmusaraj. MarcP suspects the problem may lie in how Telegram interprets the canonical URL, which currently points to a page-level URL (e.g., ?page=3) rather than the specific post anchor (e.g., #post_123). This behavior is not observed in Discord, suggesting Telegram may handle canonical tags differently. MarcP references a 2022 post suggesting that canonical links should include the post anchor to ensure correct preview targeting. The issue appears to stem from how Discourse generates canonical URLs for individual posts, potentially causing Telegram to fetch metadata from the wrong page context. Adding random query parameters (e.g., ?v=3333) forces Telegram to re-fetch metadata, confirming it’s not a caching issue on Telegram’s end, but rather a mismatch in URL targeting. Further investigation is needed to determine if this is a Telegram-specific parsing quirk or a Discourse-side canonical URL generation issue.
For example, I can randomly /?v=3333 to my link, and can see that Telegram fetches new metadata for the URL, but in case of a specific post, the same is shown, makes me wonder if the issue is on Discourse side?
I’m not sure this is Discourse-specific, I tested the URL above in a) a different Discourse instance and b) an Open Graph tester like opengraph.xyz, and both show the correct excerpt.