forked from AkkomaGang/akkoma
Do not pass transient undo-y activities through MRF
This commit is contained in:
parent
9db4c2429f
commit
dcf58a3c53
2 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## Removed
|
## Removed
|
||||||
- FollowBotPolicy
|
- FollowBotPolicy
|
||||||
|
- Passing of undo/block into MRF
|
||||||
|
|
||||||
## Upgrade Notes
|
## Upgrade Notes
|
||||||
- If you have an old instance, you will probably want to run `mix pleroma.database prune_task` in the foreground to catch it up with the history of your instance.
|
- If you have an old instance, you will probably want to run `mix pleroma.database prune_task` in the foreground to catch it up with the history of your instance.
|
||||||
|
|
|
@ -63,6 +63,12 @@ defmodule Pleroma.Web.ActivityPub.MRF do
|
||||||
|
|
||||||
@required_description_keys [:key, :related_policy]
|
@required_description_keys [:key, :related_policy]
|
||||||
|
|
||||||
|
def filter_one(policy, %{"type" => type} = message)
|
||||||
|
when type in ["Undo", "Block", "Delete"] and
|
||||||
|
policy != Pleroma.Web.ActivityPub.MRF.SimplePolicy do
|
||||||
|
{:ok, message}
|
||||||
|
end
|
||||||
|
|
||||||
def filter_one(policy, message) do
|
def filter_one(policy, message) do
|
||||||
should_plug_history? =
|
should_plug_history? =
|
||||||
if function_exported?(policy, :history_awareness, 0) do
|
if function_exported?(policy, :history_awareness, 0) do
|
||||||
|
|
Loading…
Reference in a new issue