summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorPhilippe Daouadi <br@ud2.org>2022-01-18 19:20:24 +0100
committerGitHub <noreply@github.com>2022-01-18 13:20:24 -0500
commit15ffc4143c36593bc3d899fad7fb5db00f4d95ea (patch)
treefe73097bb98041c0e62fb517f50ac4f00078852a /docs
parentMerge branch 'master' into develop (diff)
downloadsynapse-15ffc4143c36593bc3d899fad7fb5db00f4d95ea.tar.xz
Fix preview of imgur and Tenor URLs. (#11669)
By scraping Open Graph information from the HTML even
when an autodiscovery endpoint is found. The results are
then combined to capture as much information as possible
from the page.
Diffstat (limited to 'docs')
-rw-r--r--docs/development/url_previews.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/development/url_previews.md b/docs/development/url_previews.md
index aff3813609..154b9a5e12 100644
--- a/docs/development/url_previews.md
+++ b/docs/development/url_previews.md
@@ -35,7 +35,12 @@ When Synapse is asked to preview a URL it does the following:
    5. If the media is HTML:
       1. Decodes the HTML via the stored file.
       2. Generates an Open Graph response from the HTML.
-      3. If an image exists in the Open Graph response:
+      3. If a JSON oEmbed URL was found in the HTML via autodiscovery:
+         1. Downloads the URL and stores it into a file via the media storage provider
+            and saves the local media metadata.
+         2. Convert the oEmbed response to an Open Graph response.
+         3. Override any Open Graph data from the HTML with data from oEmbed.
+      4. If an image exists in the Open Graph response:
          1. Downloads the URL and stores it into a file via the media storage
             provider and saves the local media metadata.
          2. Generates thumbnails.