mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 02:02:19 +00:00
activitypub: utils: rework make_flag_data to accept either activity payloads or IRIs
This commit is contained in:
parent
414d4b8088
commit
f86f7dbb8f
|
@ -621,7 +621,12 @@ defmodule Pleroma.Web.ActivityPub.Utils do
|
|||
#### Flag-related helpers
|
||||
|
||||
def make_flag_data(params, additional) do
|
||||
status_ap_ids = Enum.map(params.statuses || [], & &1.data["id"])
|
||||
status_ap_ids =
|
||||
Enum.map(params.statuses || [], fn
|
||||
act when is_map(act) -> act["id"]
|
||||
act when is_binary(act) -> act
|
||||
end)
|
||||
|
||||
object = [params.account.ap_id] ++ status_ap_ids
|
||||
|
||||
%{
|
||||
|
|
Loading…
Reference in a new issue