core: filter all messages with links in text when link content filter is used (#6591)

* core: change msg_content_tag stored as blob to text

* track if items have links and use has_link when searching for links (MCLink_ MsgContentTag is passed)

* fix test (broken in master)

* merge migrations, update api and schema

* minor fixes

* tests

* update plans

* update migrations
This commit is contained in:
Evgeny authored and GitHub committed 2026-01-23 12:31:42 +00:00
1 parent d08202ee2d
commit 5453d8875c
21 files changed
+355 -82

No files matched your search

+10
View File
@@ -178,6 +178,16 @@ isSimplexLink = \case
SimplexLink {} -> True
_ -> False
isLink :: Format -> Bool
isLink = \case
Uri -> True
HyperLink {} -> True
SimplexLink {} -> True
_ -> False
hasLinks :: MarkdownList -> Bool
hasLinks = any $ \(FormattedText f _) -> maybe False isLink f
markdownP :: Parser Markdown
markdownP = mconcat <$> A.many' fragmentP
where