1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2026-02-15 17:16:57 +00:00

Produce at least something for unknown moderation log messages

The reason for this is some people might be migrating back from
Rebased or even Akkoma, which may have their own moderation log
messages that pleroma does not support. We should at least produce
something instead of erroring out.
This commit is contained in:
Ekaterina Vaartis 2025-06-15 16:33:55 +03:00
parent f38e9228ef
commit cccbd897e8
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1 @@
Produce "unknown message" instead of an error when the moderation log message is not recognized

View file

@ -575,6 +575,10 @@ defmodule Pleroma.ModerationLog do
"@#{actor_nickname} requested account backup for @#{user_nickname}"
end
def get_log_entry_message(%ModerationLog{} = data) do
"Unknown log entry: #{inspect(data)}"
end
defp nicknames_to_string(nicknames) do
nicknames
|> Enum.map(&"@#{&1}")