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:
parent
f38e9228ef
commit
cccbd897e8
2 changed files with 5 additions and 0 deletions
1
changelog.d/unknown-mod-log.fix
Normal file
1
changelog.d/unknown-mod-log.fix
Normal file
|
|
@ -0,0 +1 @@
|
|||
Produce "unknown message" instead of an error when the moderation log message is not recognized
|
||||
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue