Merge branch 'develop' into global-status-expiration
authorEgor Kislitsyn <egor@kislitsyn.com>
Fri, 20 Mar 2020 18:08:34 +0000 (22:08 +0400)
committerEgor Kislitsyn <egor@kislitsyn.com>
Fri, 20 Mar 2020 18:08:34 +0000 (22:08 +0400)
1  2 
CHANGELOG.md
config/config.exs
config/description.exs
docs/configuration/cheatsheet.md
test/web/activity_pub/activity_pub_test.exs
test/workers/cron/purge_expired_activities_worker_test.exs

diff --cc CHANGELOG.md
index 77cd35990b5bbd4cb6fc3a4fc139e4323ee682b0,15a073c6488eb714d26ef4f6c25b706e7f7344e8..79b4bbb5318c5b3ce1fa78fd1bbeb114f7252d0f
@@@ -6,8 -6,18 +6,19 @@@ The format is based on [Keep a Changelo
  ## [unreleased]
  ### Changed
  - **Breaking:** BBCode and Markdown formatters will no longer return any `\n` and only use `<br/>` for newlines
 +- MFR policy to set global expiration for all local Create activities
  
+ ### Removed
+ - **Breaking:** removed `with_move` parameter from notifications timeline.
+ ### Added
+ - NodeInfo: `pleroma:api/v1/notifications:include_types_filter` to the `features` list.
+ - Configuration: `:restrict_unauthenticated` setting, restrict access for unauthenticated users to timelines (public and federate), user profiles and statuses.
+ <details>
+   <summary>API Changes</summary>
+ - Mastodon API: Support for `include_types` in `/api/v1/notifications`.
+ </details>
  ## [2.0.0] - 2019-03-08
  ### Security
  - Mastodon API: Fix being able to request enourmous amount of statuses in timelines leading to DoS. Now limited to 40 per request.
Simple merge
Simple merge
Simple merge
index 8c599faf3a5d3075d08eb9f2a4514e696b7b35aa,a43dd34f01fa79ddb0889f05eb8d40243e9cfe58..31d441d38c20482d33eda4950f23fc51728da8e1
@@@ -1970,20 -1968,4 +1968,20 @@@ defmodule Pleroma.Web.ActivityPub.Activ
                 ActivityPub.move(old_user, new_user)
      end
    end
-     clear_config([:instance, :rewrite_policy])
 +
 +  describe "global activity expiration" do
++    setup do: clear_config([:instance, :rewrite_policy])
 +
 +    test "creates an activity expiration for local Create activities" do
 +      Pleroma.Config.put(
 +        [:instance, :rewrite_policy],
 +        Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy
 +      )
 +
 +      {:ok, %{id: id_create}} = ActivityBuilder.insert(%{"type" => "Create", "context" => "3hu"})
 +      {:ok, _follow} = ActivityBuilder.insert(%{"type" => "Follow", "context" => "3hu"})
 +
 +      assert [%{activity_id: ^id_create}] = Pleroma.ActivityExpiration |> Repo.all()
 +    end
 +  end
  end
index 11b696bd80b1f3cdf10969e691060bc7b95e6f49,5864f9e5f675f2d420cad8ac39de3b1b3ec8b94e..85ae1e5ef4e9972f6323d22424fc1bdf5ef127f1
@@@ -11,8 -11,7 +11,10 @@@ defmodule Pleroma.Workers.Cron.PurgeExp
    import Pleroma.Factory
    import ExUnit.CaptureLog
  
-   clear_config([ActivityExpiration, :enabled])
-   clear_config([:instance, :rewrite_policy])
 -  setup do: clear_config([ActivityExpiration, :enabled])
++  setup do 
++      clear_config([ActivityExpiration, :enabled])
++    clear_config([:instance, :rewrite_policy])
++  end
  
    test "deletes an expiration activity" do
      Pleroma.Config.put([ActivityExpiration, :enabled], true)