Also match with HTML in Content

This commit is contained in:
Peter Stuifzand 2018-04-25 22:46:36 +02:00
parent 58d0179a35
commit 28e8ce6f78

View File

@ -338,7 +338,7 @@ func (b *memoryBackend) ProcessContent(channel, fetchURL, contentType string, bo
b.channelAddItem(channel, item)
// Add items to notifications that match my name and websites
if item.Content != nil && len(item.Content.Text) > 0 && nameRegex.MatchString(item.Content.Text) {
if item.Content != nil && (len(item.Content.Text) > 0 && nameRegex.MatchString(item.Content.Text) || item.Content != nil && len(item.Content.HTML) > 0 && nameRegex.MatchString(item.Content.HTML)) {
b.channelAddItem("notifications", item)
}
}