diff options
author | clokep <clokep@users.noreply.github.com> | 2021-09-21 16:10:24 +0000 |
---|---|---|
committer | clokep <clokep@users.noreply.github.com> | 2021-09-21 16:10:24 +0000 |
commit | bf98b236d2c7fc64a456e38ebe68b8e3a8db2a74 (patch) | |
tree | e4acb4d9e2bcd74395cb90594b3278c40e9b109a /develop/development | |
parent | deploy: 9ffa787eb243c98a6ca1ecd9eac4a6b5dac2bef0 (diff) | |
download | synapse-bf98b236d2c7fc64a456e38ebe68b8e3a8db2a74.tar.xz |
deploy: ba7a91aea5fd624bf048f0fda0dca80da7a1945e
Diffstat (limited to 'develop/development')
-rw-r--r-- | develop/development/url_previews.html | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/develop/development/url_previews.html b/develop/development/url_previews.html index 7189a53575..3d10262a81 100644 --- a/develop/development/url_previews.html +++ b/develop/development/url_previews.html @@ -213,12 +213,10 @@ is also used to de-duplicate processing of multiple in-flight requests at once.) <ol> <li>Checks the database cache by URL and timestamp and returns the result if it has not expired and was successful (a 2xx return code).</li> -<li>Checks if the URL matches an oEmbed pattern. If it does, fetch the oEmbed -response. If this is an image, replace the URL to fetch and continue. If -if it is HTML content, use the HTML as the document and continue.</li> -<li>If it doesn't match an oEmbed pattern, downloads the URL and stores it -into a file via the media storage provider and saves the local media -metadata.</li> +<li>Checks if the URL matches an <a href="https://oembed.com/">oEmbed</a> pattern. If it +does, update the URL to download.</li> +<li>Downloads the URL and stores it into a file via the media storage provider +and saves the local media metadata.</li> <li>If the media is an image: <ol> <li>Generates thumbnails.</li> @@ -239,6 +237,19 @@ provider and saves the local media metadata.</li> </li> </ol> </li> +<li>If the media is JSON and an oEmbed URL was found: +<ol> +<li>Convert the oEmbed response to an Open Graph response.</li> +<li>If a thumbnail or image is in the oEmbed response: +<ol> +<li>Downloads the URL and stores it into a file via the media storage +provider and saves the local media metadata.</li> +<li>Generates thumbnails.</li> +<li>Updates the Open Graph response based on image properties.</li> +</ol> +</li> +</ol> +</li> <li>Stores the result in the database cache.</li> </ol> </li> |