[feat] support Undo events in mrf #1075

Closed
opened 2026-03-01 19:54:03 +00:00 by teidesu · 4 comments

The idea

if we write a custom mrf similar to this:

@impl true
def filter(%{"type" => "Undo"} = message) do
  require Logger
  Logger.error("got Undo: #{inspect(message, pretty: true)}")
  {:ok, message}
end

nothing gets logged. looking at the code it seems that the Undo events for some reason are excluded from the processing at all, except for the default "SimplePolicy":

https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/activity_pub/mrf.ex#L66-L70

  def filter_one(policy, %{"type" => type} = message)
      when type in ["Undo", "Block", "Delete"] and
             policy != Pleroma.Web.ActivityPub.MRF.SimplePolicy do
    {:ok, message}
  end

(although i might be dumb and didn't understand something correctly :>)

The reasoning

this would allow adding e.g. external logging/processing of some kind to the Undo events, like deleted posts and un-follows

Have you searched for this feature request?

  • I have double-checked and have not found this feature request mentioned anywhere.
  • This feature is related to the Akkoma backend specifically, and not pleroma-fe.
### The idea if we write a custom mrf similar to this: ```elixir @impl true def filter(%{"type" => "Undo"} = message) do require Logger Logger.error("got Undo: #{inspect(message, pretty: true)}") {:ok, message} end ``` nothing gets logged. looking at the code it seems that the `Undo` events for some reason are excluded from the processing at all, except for the default "SimplePolicy": https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/activity_pub/mrf.ex#L66-L70 ```elixir def filter_one(policy, %{"type" => type} = message) when type in ["Undo", "Block", "Delete"] and policy != Pleroma.Web.ActivityPub.MRF.SimplePolicy do {:ok, message} end ``` (although i might be dumb and didn't understand something correctly :>) ### The reasoning this would allow adding e.g. external logging/processing of some kind to the `Undo` events, like deleted posts and un-follows ### Have you searched for this feature request? - [x] I have double-checked and have not found this feature request mentioned anywhere. - [x] This feature is related to the Akkoma backend specifically, and not pleroma-fe.

this is actually fully intentional! this functionality was abused in the past to reject deletes from remote users and was removed

we ideally don't want to make it easy to misuse the system

this is actually fully intentional! this functionality was abused in the past to reject deletes from remote users and was removed we ideally don't want to make it easy to misuse the system
Author

oh lol bruh. and i guess implementing it in a way so that the custom mrfs aren't able to interfere with the default behavior isn't viable either, right?

sad

oh lol bruh. and i guess implementing it in a way so that the custom mrfs aren't able to interfere with the default behavior isn't viable either, right? sad

yeah it sucks a bit
but the friction is there to stop people abusing it easily - you know where the safety release is and could adjust it if you needed this functionality for something

yeah it sucks a bit but the friction is there to stop people abusing it easily - you know where the safety release is and could adjust it if you needed this functionality for something
Owner

i guess, since this is an intentional limitation this means this can be closed?

i guess, since this is an intentional limitation this means this can be closed?
Oneric 2026-03-19 13:15:41 +00:00
  • closed this issue
  • added the
    wontfix
    label
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma#1075
No description provided.