Commit f86f7dbb authored by kaniini's avatar kaniini
Browse files

activitypub: utils: rework make_flag_data to accept either activity payloads or IRIs

parent 414d4b80
......@@ -621,7 +621,12 @@ def make_create_data(params, additional) 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
%{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment