turn inlineQuotePolicy on by default
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
f6304cfd78
commit
6c80977b06
3 changed files with 26 additions and 18 deletions
|
@ -95,7 +95,11 @@ def pipeline_filter(%{} = message, meta) do
|
||||||
def get_policies do
|
def get_policies do
|
||||||
Pleroma.Config.get([:mrf, :policies], [])
|
Pleroma.Config.get([:mrf, :policies], [])
|
||||||
|> get_policies()
|
|> get_policies()
|
||||||
|> Enum.concat([Pleroma.Web.ActivityPub.MRF.HashtagPolicy])
|
|> Enum.concat([
|
||||||
|
Pleroma.Web.ActivityPub.MRF.HashtagPolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
|
||||||
|
])
|
||||||
|
|> Enum.uniq()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_policies(policy) when is_atom(policy), do: [policy]
|
defp get_policies(policy) when is_atom(policy), do: [policy]
|
||||||
|
|
|
@ -82,7 +82,11 @@ test "custom emoji" do
|
||||||
test "remote custom emoji" do
|
test "remote custom emoji" do
|
||||||
user = insert(:user)
|
user = insert(:user)
|
||||||
other_user = insert(:user, local: false)
|
other_user = insert(:user, local: false)
|
||||||
note = insert(:note, data: %{"reactions" => [["wow", [other_user.ap_id], "https://remote/emoji/wow"]]})
|
|
||||||
|
note =
|
||||||
|
insert(:note,
|
||||||
|
data: %{"reactions" => [["wow", [other_user.ap_id], "https://remote/emoji/wow"]]}
|
||||||
|
)
|
||||||
|
|
||||||
assert {:ok,
|
assert {:ok,
|
||||||
%{
|
%{
|
||||||
|
|
|
@ -77,7 +77,7 @@ test "it works as expected with noop policy" do
|
||||||
clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.NoOpPolicy])
|
clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.NoOpPolicy])
|
||||||
|
|
||||||
expected = %{
|
expected = %{
|
||||||
mrf_policies: ["NoOpPolicy", "HashtagPolicy"],
|
mrf_policies: ["NoOpPolicy", "HashtagPolicy", "InlineQuotePolicy"],
|
||||||
mrf_hashtag: %{
|
mrf_hashtag: %{
|
||||||
federated_timeline_removal: [],
|
federated_timeline_removal: [],
|
||||||
reject: [],
|
reject: [],
|
||||||
|
@ -93,7 +93,7 @@ test "it works as expected with mock policy" do
|
||||||
clear_config([:mrf, :policies], [MRFModuleMock])
|
clear_config([:mrf, :policies], [MRFModuleMock])
|
||||||
|
|
||||||
expected = %{
|
expected = %{
|
||||||
mrf_policies: ["MRFModuleMock", "HashtagPolicy"],
|
mrf_policies: ["MRFModuleMock", "HashtagPolicy", "InlineQuotePolicy"],
|
||||||
mrf_module_mock: "some config data",
|
mrf_module_mock: "some config data",
|
||||||
mrf_hashtag: %{
|
mrf_hashtag: %{
|
||||||
federated_timeline_removal: [],
|
federated_timeline_removal: [],
|
||||||
|
|
Loading…
Reference in a new issue