Use pseudo ap id of a list in BCC
This commit is contained in:
parent
a3dc02d282
commit
23276e8d68
5 changed files with 92 additions and 24 deletions
|
|
@ -8,7 +8,6 @@ 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
|
||||
|
|
@ -106,16 +105,10 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
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
|
||||
[Pleroma.List.ap_id(user, list_id)]
|
||||
end
|
||||
|
||||
def bcc_for_list(_, _), do: {:ok, []}
|
||||
def bcc_for_list(_, _), do: []
|
||||
|
||||
def make_content_html(
|
||||
status,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue