summary refs log tree commit diff
path: root/synapse/rest/media/v1/oembed.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Be more lenient when parsing the version for oEmbed responses. (#11065)Patrick Cloke2021-10-131-7/+6
|
* Fix formatting string when oEmbed errors occur. (#11061)Patrick Cloke2021-10-121-1/+1
|
* Autodiscover oEmbed endpoint from returned HTML (#10822)Patrick Cloke2021-10-081-0/+26
| | | | | Searches the returned HTML for an oEmbed endpoint using the autodiscovery mechanism (`<link rel=...>`), and will request it to generate the preview.
* Include more information in oEmbed previews. (#10819)Patrick Cloke2021-09-221-4/+45
| | | | | | | * Improved titles (fall back to the author name if there's not title) and include the site name. * Handle photo/video payloads. * Include the original URL in the Open Graph response. * Fix the expiration time (by properly converting from seconds to milliseconds).
* Refactor oEmbed previews (#10814)Patrick Cloke2021-09-211-57/+88
| | | | | | | | | | | | | 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.
* Request JSON for oEmbed requests (and ignore XML only providers). (#10759)Patrick Cloke2021-09-081-3/+23
| | | | | | | | This adds the format to the request arguments / URL to ensure that JSON data is returned (which is all that Synapse supports). This also adds additional error checking / filtering to the configuration file to ignore XML-only providers.
* Allow configuration of the oEmbed URLs. (#10714)Patrick Cloke2021-08-311-0/+135
This adds configuration options (under an `oembed` section) to configure which URLs are matched to use oEmbed for URL previews.