diff options
author | William Pitcock <nenolod@dereferenced.org> | 2019-03-14 19:04:52 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2019-03-14 19:05:42 +0000 |
commit | f86f7dbb8f7bd72bd4037b03224b2840de4a4292 (patch) | |
tree | b21220a1921b6066fbbffbe80d0fcaa59a655649 /lib | |
parent | 414d4b80883a37b0d323522112680d11b49cbb28 (diff) | |
download | pleroma-f86f7dbb8f7bd72bd4037b03224b2840de4a4292.tar.gz |
activitypub: utils: rework make_flag_data to accept either activity payloads or IRIs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/utils.ex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 182f9cacb..9881b7bbb 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -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 %{ |