-
- Downloads
Refactor oEmbed previews (#10814)
The major change is moving the decision of whether to use oEmbed further up the call-stack. This reverts the _download_url method to being a "dumb" functionwhich takes a single URL and downloads it (as it was before #7920). This also makes more minor refactorings: * Renames internal variables for clarity. * Factors out shared code between the HTML and rich oEmbed previews. * Fixes tests to preview an oEmbed image.
Showing
- changelog.d/10814.feature 1 addition, 0 deletionschangelog.d/10814.feature
- docs/development/url_previews.md 13 additions, 8 deletionsdocs/development/url_previews.md
- synapse/rest/media/v1/oembed.py 88 additions, 57 deletionssynapse/rest/media/v1/oembed.py
- synapse/rest/media/v1/preview_url_resource.py 184 additions, 142 deletionssynapse/rest/media/v1/preview_url_resource.py
- tests/rest/media/v1/test_url_preview.py 13 additions, 13 deletionstests/rest/media/v1/test_url_preview.py
Loading
Please register or sign in to comment