Check if content != nil before matching content
This commit is contained in:
parent
3590bbdb65
commit
58d0179a35
|
@ -338,7 +338,7 @@ func (b *memoryBackend) ProcessContent(channel, fetchURL, contentType string, bo
|
||||||
b.channelAddItem(channel, item)
|
b.channelAddItem(channel, item)
|
||||||
|
|
||||||
// Add items to notifications that match my name and websites
|
// Add items to notifications that match my name and websites
|
||||||
if len(item.Content.Text) > 0 && nameRegex.MatchString(item.Content.Text) {
|
if item.Content != nil && len(item.Content.Text) > 0 && nameRegex.MatchString(item.Content.Text) {
|
||||||
b.channelAddItem("notifications", item)
|
b.channelAddItem("notifications", item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user