Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Link preview duplicate url filter considers anchor #10088

Closed
eras opened this issue May 28, 2021 · 2 comments
Closed

Link preview duplicate url filter considers anchor #10088

eras opened this issue May 28, 2021 · 2 comments

Comments

@eras
Copy link

eras commented May 28, 2021

Description

When sending a URL to a room, a link preview is generated. If the same URL is sent twice, only one preview is generated. However, if the second link is the same but with an #anchor, the link preview is generated twice for the same content (I assume Synapse will not consider the anchor at all for the actual preview generation process).

Steps to reproduce

  • Send a URL that produces a link preview twice to a room, but add #anchor to the end of the second URL, e.g. https://github.com/matrix-org/synapse/issues/10088 and https://github.com/matrix-org/synapse/issues/10088#foo
  • Witness Synapse generating two link preview for the same content

Expected behaviour: only one link preview is generated.

Version information

  • Homeserver: matrix.org
@tulir
Copy link
Member

tulir commented May 28, 2021

This is a client-side problem (i.e. element web). Synapse doesn't scan messages to generate URL previews, it just fetches previews for whatever URLs the client asks for.

Synapse could optimize caching URL previews by ignoring fragments, but that doesn't really affect what users see.

@eras
Copy link
Author

eras commented May 28, 2021

Added issue to Element/Web.

@eras eras closed this as completed May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants