diff options
author | Alex Gleason <alex@alexgleason.me> | 2022-01-27 19:57:28 +0000 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2022-01-27 19:57:28 +0000 |
commit | a146f6acab5127e9dd7a70ac9dea9bf35a57721e (patch) | |
tree | 2f094d7fc3208eb34a08bbbef8d628bb023e7757 /lib | |
parent | 2bab9dd17529136e497230e286230bb6ae09e595 (diff) | |
parent | 27cb3d62738f6ea174994f72688497db49cef754 (diff) | |
download | pleroma-a146f6acab5127e9dd7a70ac9dea9bf35a57721e.tar.gz |
Merge branch 'mentions-mrf-replies-only' into 'develop'
ForceMentionsInContent: don't apply it to top-level posts
See merge request pleroma/pleroma!3624
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex b/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex index 71c240727..715771d9d 100644 --- a/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex +++ b/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex @@ -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"] || "" |