summary refs log tree commit diff
path: root/synapse/media/oembed.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-02-06 15:27:17 +0000
committerErik Johnston <erik@matrix.org>2024-02-06 15:27:17 +0000
commitf7a8fafbc1c13c930686f9d8feaaa03a56a67553 (patch)
tree12132265317205cca849c95283c3284cb016b8e3 /synapse/media/oembed.py
parentMerge branch 'release-v1.100' into matrix-org-hotfixes (diff)
parentAccept unprefixed form of MSC3981 recurse parameter (#16842) (diff)
downloadsynapse-f7a8fafbc1c13c930686f9d8feaaa03a56a67553.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/media/oembed.py')
-rw-r--r--synapse/media/oembed.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/media/oembed.py b/synapse/media/oembed.py

index 94ece30459..16d613d271 100644 --- a/synapse/media/oembed.py +++ b/synapse/media/oembed.py
@@ -256,12 +256,11 @@ def calc_description_and_urls(open_graph_response: JsonDict, html_body: str) -> parser = etree.HTMLParser(recover=True, encoding="utf-8") # Attempt to parse the body. If this fails, log and return no metadata. - # TODO Develop of lxml-stubs has this correct. - tree = etree.fromstring(html_body, parser) # type: ignore[arg-type] + tree = etree.fromstring(html_body, parser) # The data was successfully parsed, but no tree was found. if tree is None: - return # type: ignore[unreachable] + return # Attempt to find interesting URLs (images, videos, embeds). if "og:image" not in open_graph_response: