Merge branch 'issue/2256' into 'develop'

[#2256] added subject actor to moderation log

See merge request pleroma/pleroma!3164
This commit is contained in:
feld 2020-12-04 17:49:05 +00:00
commit 6adad96c79
7 changed files with 328 additions and 280 deletions

View file

@ -194,6 +194,19 @@ defmodule Pleroma.Activity do
end
end
def get_by_id_with_user_actor(id) do
case FlakeId.flake_id?(id) do
true ->
Activity
|> where([a], a.id == ^id)
|> with_preloaded_user_actor()
|> Repo.one()
_ ->
nil
end
end
def get_by_id_with_object(id) do
Activity
|> where(id: ^id)