Pleroma.ModerationLog: fix invalid type
This commit is contained in:
parent
e834343496
commit
6e0945354d
@ -121,7 +121,7 @@ defmodule Pleroma.ModerationLog do
|
|||||||
|
|
||||||
defp prepare_log_data(attrs), do: attrs
|
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
|
def insert_log(%{actor: %User{}, subject: subjects, permission: permission} = attrs) do
|
||||||
data =
|
data =
|
||||||
attrs
|
attrs
|
||||||
@ -248,7 +248,7 @@ defmodule Pleroma.ModerationLog do
|
|||||||
|> insert_log_entry_with_message()
|
|> insert_log_entry_with_message()
|
||||||
end
|
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
|
defp insert_log_entry_with_message(entry) do
|
||||||
entry.data["message"]
|
entry.data["message"]
|
||||||
|> put_in(get_log_entry_message(entry))
|
|> put_in(get_log_entry_message(entry))
|
||||||
|
Loading…
Reference in New Issue
Block a user