Add to your `prod.secret.exs`:
```
-config :pleroma, :instance,
- rewrite_policy: [Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy]
+config :pleroma, :mrf,
+ policies: [Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy]
```
defp create(params) do
%ConfigDB{}
- |> changeset(params, transform?)
+ |> changeset(params)
|> Repo.insert()
end
defp update(%ConfigDB{} = config, %{value: value}) do
config
- |> changeset(%{value: value}, transform?)
+ |> changeset(%{value: value})
|> Repo.update()
end
end
describe "global activity expiration" do
- setup do: clear_config([:instance, :rewrite_policy])
+ setup do: clear_config([:mrf, :policies])
test "creates an activity expiration for local Create activities" do
Pleroma.Config.put(
- [:instance, :rewrite_policy],
+ [:mrf, :policies],
Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy
)
setup do
clear_config([ActivityExpiration, :enabled])
- clear_config([:instance, :rewrite_policy])
end
test "deletes an expiration activity" do
test "works with ActivityExpirationPolicy" do
Pleroma.Config.put([ActivityExpiration, :enabled], true)
- Pleroma.Config.put(
- [:instance, :rewrite_policy],
- Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy
- )
+ clear_config([:mrf, :policies], Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy)
user = insert(:user)