diff --git a/TODO.md b/TODO.md index d9c4291f..f50718e2 100644 --- a/TODO.md +++ b/TODO.md @@ -13,7 +13,6 @@ - When qml syntax highlighting supports ES6 string interpolation, use that - Fixes - - 256 min width when a non-image link preview is present - Pressing backspace in composer sometimes doesn't work - Message order isn't preserved when sending a first message in a E2E room, then while keys are being shared sending one with another account, diff --git a/src/python/models/items.py b/src/python/models/items.py index 7eedef4a..5a7cc141 100644 --- a/src/python/models/items.py +++ b/src/python/models/items.py @@ -153,11 +153,13 @@ class Event(ModelItem): if not self.content.strip(): return [] - return [ + links = [ (self._get_preview_type(link[0], link[2]), link[2]) for link in lxml.html.iterlinks(self.content) ] + return [l for l in links if l[0] != "page"] # TODO + @staticmethod def _get_preview_type(el: lxml.html.HtmlElement, link: str) -> str: path = urlparse(link).path.lower()