fix(notifications): skip the filter check for objects without content
Regex.match? raised on objects without content (for example posts with only attachments), so no notifications were created for them when the recipient had an irreversible filter.
This commit is contained in:
parent
90eb5e4015
commit
21a5d1dca2
3 changed files with 21 additions and 0 deletions
|
|
@ -821,6 +821,9 @@ defmodule Pleroma.Notification do
|
|||
object.data["actor"] == user.ap_id ->
|
||||
false
|
||||
|
||||
not is_binary(object.data["content"]) ->
|
||||
false
|
||||
|
||||
not is_nil(regex = Pleroma.Filter.compose_regex(user, :re)) ->
|
||||
Regex.match?(regex, object.data["content"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue