mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-23 01:35:28 +00:00
Do not pass transient undo-y activities through MRF
This commit is contained in:
parent
9db4c2429f
commit
dcf58a3c53
|
@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## Removed
|
||||
- FollowBotPolicy
|
||||
- Passing of undo/block into MRF
|
||||
|
||||
## 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.
|
||||
|
|
|
@ -63,6 +63,12 @@ defmodule Pleroma.Web.ActivityPub.MRF do
|
|||
|
||||
@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
|
||||
should_plug_history? =
|
||||
if function_exported?(policy, :history_awareness, 0) do
|
||||
|
|
Loading…
Reference in a new issue