Allow assigning users to reports
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
d6bec8b6b7
commit
80ede85f75
17 changed files with 402 additions and 7 deletions
|
|
@ -13,6 +13,11 @@ defmodule Pleroma.Web.AdminAPI.Report do
|
|||
user = User.get_cached_by_ap_id(actor)
|
||||
account = User.get_cached_by_ap_id(account_ap_id)
|
||||
|
||||
assigned_account =
|
||||
if Map.has_key?(report.data, "assigned_account") do
|
||||
User.get_cached_by_id(report.data["assigned_account"])
|
||||
end
|
||||
|
||||
statuses =
|
||||
status_ap_ids
|
||||
|> Enum.reject(&is_nil(&1))
|
||||
|
|
@ -26,7 +31,13 @@ defmodule Pleroma.Web.AdminAPI.Report do
|
|||
Activity.get_by_ap_id_with_object(act)
|
||||
end)
|
||||
|
||||
%{report: report, user: user, account: account, statuses: statuses}
|
||||
%{
|
||||
report: report,
|
||||
user: user,
|
||||
account: account,
|
||||
statuses: statuses,
|
||||
assigned_account: assigned_account
|
||||
}
|
||||
end
|
||||
|
||||
defp make_fake_activity(act, user) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue