Add addressable lists
This commit is contained in:
parent
8c9227c1f1
commit
a3dc02d282
5 changed files with 92 additions and 38 deletions
|
|
@ -8,6 +8,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
alias Pleroma.Activity
|
||||
alias Pleroma.Config
|
||||
alias Pleroma.Formatter
|
||||
alias Pleroma.List
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.User
|
||||
|
|
@ -102,6 +103,20 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
end
|
||||
end
|
||||
|
||||
def to_for_user_and_mentions(_user, _mentions, _inReplyTo, _), do: {[], []}
|
||||
|
||||
def bcc_for_list(user, {:list, list_id}) do
|
||||
with {_, %List{} = list} <- {:list, List.get(list_id, user)},
|
||||
{:ok, following} <- List.get_following(list) do
|
||||
{:ok, Enum.map(following, & &1.ap_id)}
|
||||
else
|
||||
{:list, _} -> {:error, "List not found"}
|
||||
err -> err
|
||||
end
|
||||
end
|
||||
|
||||
def bcc_for_list(_, _), do: {:ok, []}
|
||||
|
||||
def make_content_html(
|
||||
status,
|
||||
attachments,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue