From 487b516f8f46054b06457d0b4e92baaaec6ed9b3 Mon Sep 17 00:00:00 2001 From: Ilja Date: Mon, 14 Dec 2020 11:40:29 +0100 Subject: [PATCH] Changes after pull * description is in mrf_simple now * a fix in the quarantine test because 'Pleroma.User.follow' returns two users now instead of only one --- lib/pleroma/web/activity_pub/mrf/simple_policy.ex | 134 +++++++++++----------- test/pleroma/web/activity_pub/publisher_test.exs | 4 +- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index 322402bdf..72ee0542b 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -273,73 +273,73 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do label: "MRF Simple", description: "Simple ingress policies", children: [ - %{ - key: :media_removal, - type: {:list, :tuple}, - description: - "List of instances to strip media attachments from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :media_nsfw, - label: "Media NSFW", - type: {:list, :tuple}, - description: - "List of instances to tag all media as NSFW (sensitive) from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :federated_timeline_removal, - type: {:list, :tuple}, - description: - "List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :reject, - type: {:list, :tuple}, - description: - "List of instances to reject activities (except deletes) from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :accept, - type: {:list, :tuple}, - description: - "List of instances to only accept activities (except deletes) from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :followers_only, - type: {:list, :tuple}, - description: - "Force posts from the given instances to be visible by followers only and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :report_removal, - type: {:list, :tuple}, - description: "List of instances to reject reports from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :avatar_removal, - type: {:list, :tuple}, - description: "List of instances to strip avatars from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :banner_removal, - type: {:list, :tuple}, - description: "List of instances to strip banners from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - }, - %{ - key: :reject_deletes, - type: {:list, :tuple}, - description: "List of instances to reject deletions from and the reason for doing so", - suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] - } + %{ + key: :media_removal, + type: {:list, :tuple}, + description: + "List of instances to strip media attachments from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :media_nsfw, + label: "Media NSFW", + type: {:list, :tuple}, + description: + "List of instances to tag all media as NSFW (sensitive) from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :federated_timeline_removal, + type: {:list, :tuple}, + description: + "List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :reject, + type: {:list, :tuple}, + description: + "List of instances to reject activities (except deletes) from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :accept, + type: {:list, :tuple}, + description: + "List of instances to only accept activities (except deletes) from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :followers_only, + type: {:list, :tuple}, + description: + "Force posts from the given instances to be visible by followers only and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :report_removal, + type: {:list, :tuple}, + description: "List of instances to reject reports from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :avatar_removal, + type: {:list, :tuple}, + description: "List of instances to strip avatars from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :banner_removal, + type: {:list, :tuple}, + description: "List of instances to strip banners from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + }, + %{ + key: :reject_deletes, + type: {:list, :tuple}, + description: "List of instances to reject deletions from and the reason for doing so", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + } ] } end diff --git a/test/pleroma/web/activity_pub/publisher_test.exs b/test/pleroma/web/activity_pub/publisher_test.exs index 61dec1e26..24e373e04 100644 --- a/test/pleroma/web/activity_pub/publisher_test.exs +++ b/test/pleroma/web/activity_pub/publisher_test.exs @@ -282,7 +282,7 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do actor = insert(:user, follower_address: follower.ap_id) - {:ok, _follower_one} = Pleroma.User.follow(follower, actor) + {:ok, follower, actor} = Pleroma.User.follow(follower, actor) actor = refresh_record(actor) note_activity = @@ -319,7 +319,7 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do actor = insert(:user, follower_address: follower.ap_id) - {:ok, _follower_one} = Pleroma.User.follow(follower, actor) + {:ok, follower, actor} = Pleroma.User.follow(follower, actor) actor = refresh_record(actor) note_activity =