X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fcommon_api%2Futils.ex;h=d4bfdd7e40fd55cec353391f2295d01ed7ceab86;hb=182f7bbb1170c44eac4ab4a9efa4ff0bff991c98;hp=8e482eef7b88f9e9520e40e70b039598e0ee3d01;hpb=f295b9fba9c8e54bd5a92447d55d0c60c0a0cc0c;p=akkoma diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 8e482eef7..d4bfdd7e4 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -100,12 +100,21 @@ defmodule Pleroma.Web.CommonAPI.Utils do end end + def get_to_and_cc(_user, _mentions, _inReplyTo, _), do: {[], []} + def get_addressed_users(_, to) when is_list(to) do User.get_ap_ids_by_nicknames(to) end def get_addressed_users(mentioned_users, _), do: mentioned_users + def bcc_for_list(user, {:list, list_id}) do + list = Pleroma.List.get(list_id, user) + [list.ap_id] + end + + def bcc_for_list(_, _), do: [] + def make_poll_data(%{"poll" => %{"options" => options, "expires_in" => expires_in}} = data) when is_list(options) do %{max_expiration: max_expiration, min_expiration: min_expiration} =