## [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.
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
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)