Pleroma.ModerationLog: fix invalid type

This commit is contained in:
Mark Felder 2024-01-26 20:44:14 -05:00
parent e834343496
commit 6e0945354d
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ defp prepare_log_data(%{actor: actor, action: action} = attrs) do
defp prepare_log_data(attrs), do: attrs
@spec insert_log(log_params()) :: {:ok, ModerationLog} | {:error, any}
@spec insert_log(log_params()) :: {:ok, ModerationLog.t()} | {:error, any}
def insert_log(%{actor: %User{}, subject: subjects, permission: permission} = attrs) do
data =
attrs
@ -248,7 +248,7 @@ def insert_log(%{actor: %User{} = actor, action: "chat_message_delete", subject_
|> insert_log_entry_with_message()
end
@spec insert_log_entry_with_message(ModerationLog) :: {:ok, ModerationLog} | {:error, any}
@spec insert_log_entry_with_message(ModerationLog.t()) :: {:ok, ModerationLog.t()} | {:error, any}
defp insert_log_entry_with_message(entry) do
entry.data["message"]
|> put_in(get_log_entry_message(entry))