summary refs log tree commit diff
path: root/synapse/media
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-09-08 11:24:36 -0400
committerGitHub <noreply@github.com>2023-09-08 11:24:36 -0400
commitaa483cb4c905bbe483ffe8e8a8f439655a57481b (patch)
tree4c361dd18b1731e371e55975350d408ddfa96efe /synapse/media
parentLog values at DEBUG level with execute_values (#16281) (diff)
downloadsynapse-aa483cb4c905bbe483ffe8e8a8f439655a57481b.tar.xz
Update ruff config (#16283)
Enable additional checks & clean-up unneeded configuration.
Diffstat (limited to 'synapse/media')
-rw-r--r--synapse/media/url_previewer.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/media/url_previewer.py b/synapse/media/url_previewer.py
index 70b32cee17..9b5a3dd5f4 100644
--- a/synapse/media/url_previewer.py
+++ b/synapse/media/url_previewer.py
@@ -846,9 +846,7 @@ def _is_media(content_type: str) -> bool:
 
 def _is_html(content_type: str) -> bool:
     content_type = content_type.lower()
-    return content_type.startswith("text/html") or content_type.startswith(
-        "application/xhtml"
-    )
+    return content_type.startswith(("text/html", "application/xhtml"))
 
 
 def _is_json(content_type: str) -> bool: