ForceMentionsInContent: don't apply it to top-level posts
This commit is contained in:
parent
2bab9dd175
commit
27cb3d6273
2 changed files with 32 additions and 2 deletions
|
|
@ -72,8 +72,13 @@ defmodule Pleroma.Web.ActivityPub.MRF.ForceMentionsInContent do
|
|||
end
|
||||
|
||||
@impl true
|
||||
def filter(%{"type" => "Create", "object" => %{"type" => "Note", "to" => to}} = object)
|
||||
when is_list(to) do
|
||||
def filter(
|
||||
%{
|
||||
"type" => "Create",
|
||||
"object" => %{"type" => "Note", "to" => to, "inReplyTo" => in_reply_to}
|
||||
} = object
|
||||
)
|
||||
when is_list(to) and is_binary(in_reply_to) do
|
||||
# image-only posts from pleroma apparently reach this MRF without the content field
|
||||
content = object["object"]["content"] || ""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue