Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2243 from matrix-org/matthew/fix-url-preview-leng…
Browse files Browse the repository at this point in the history
…th-again

actually trim oversize og:description meta
  • Loading branch information
erikjohnston authored May 23, 2017
2 parents fbbc40f + 836d5c4 commit 9a804b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions synapse/rest/media/v1/preview_url_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ def _calc_og(tree, media_uri):
for el in _iterate_over_text(tree.find("body"), *TAGS_TO_REMOVE)
)
og['og:description'] = summarize_paragraphs(text_nodes)
else:
og['og:description'] = summarize_paragraphs([og['og:description']])

# TODO: delete the url downloads to stop diskfilling,
# as we only ever cared about its OG
Expand Down

0 comments on commit 9a804b2

Please sign in to comment.