Skip to content

Incorrect preview URL for Mastodon posts #18444

@mistydemeo

Description

@mistydemeo

Description

When fetching the preview for a Mastodon URL, the URL previewer produces an unhelpful preview that doesn't contain the actual post text.

Image

It looks like Mastodon provides the post content in its opengraph metadata - the og:description is the post text. However, Mastodon also provides an oembed, and that's the source of the generic "Post by" content. It seems that this oembed config is intended to render the post dynamically using JavaScript and only contains a static placeholder, but Matrix is previewing the static content.

Steps to reproduce

  1. Generate a preview for the post https://mastodon.online/@BathysphereHat/114518324643941427

Homeserver

576i.ca

Synapse Version

v1.129.0

Installation Method

I don't know

Database

I don't know

Workers

Single process

Platform

VM

Configuration

No response

Relevant log output

I don't currently have access to the logs from this, sorry. Seems clear from context what's happened though.

Anything else that would be useful to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions