Don't show links with data-mautrix-exclude-plaintext attribute

This commit is contained in:
Tulir Asokan 2021-08-02 21:46:21 +03:00
parent e17822e2f7
commit f6326f69df

View File

@ -193,7 +193,7 @@ func (parser *htmlParser) linkToEntity(node *html.Node) Entity {
Children: parser.nodeToEntities(node.FirstChild),
}
if len(href) == 0 {
if len(href) == 0 || parser.hasAttribute(node, "data-mautrix-exclude-plaintext") {
return entity
}