Admin API: Error when trying to update reports in the "old" format
This commit is contained in:
parent
09b4f7269e
commit
c506cc48ef
2 changed files with 8 additions and 1 deletions
|
|
@ -903,7 +903,13 @@ defmodule Pleroma.Web.ActivityPub.Utils do
|
|||
|
||||
def strip_report_status_data(activity) do
|
||||
[actor | reported_activities] = activity.data["object"]
|
||||
stripped_activities = Enum.map(reported_activities, & &1["id"])
|
||||
|
||||
stripped_activities =
|
||||
Enum.map(reported_activities, fn
|
||||
act when is_map(act) -> act["id"]
|
||||
act when is_binary(act) -> act
|
||||
end)
|
||||
|
||||
new_data = put_in(activity.data, ["object"], [actor | stripped_activities])
|
||||
|
||||
{:ok, %{activity | data: new_data}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue