1 # Pleroma: A lightweight social networking server
2 # Copyright © 2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicy do
6 @moduledoc "Ensure no content placeholder is present (such as the dot from mastodon)"
7 @behaviour Pleroma.Web.ActivityPub.MRF
13 "object" => %{"content" => content, "attachment" => _} = _child_object
16 when content in [".", "<p>.</p>"] do
17 {:ok, put_in(object, ["object", "content"], "")}
21 def filter(object), do: {:ok, object}
24 def describe, do: {:ok, %{}}