mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-30 08:18:39 -04:00
Include more information in oEmbed previews. (#10819)
* 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).
This commit is contained in:
parent
9391de3f37
commit
6fc8be9a1b
4 changed files with 68 additions and 14 deletions
|
@ -305,7 +305,7 @@ class PreviewUrlResource(DirectServeJsonResource):
|
|||
with open(media_info.filename, "rb") as file:
|
||||
body = file.read()
|
||||
|
||||
oembed_response = self._oembed.parse_oembed_response(media_info.uri, body)
|
||||
oembed_response = self._oembed.parse_oembed_response(url, body)
|
||||
og = oembed_response.open_graph_result
|
||||
|
||||
# Use the cache age from the oEmbed result, instead of the HTTP response.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue