Formatting

This commit is contained in:
csaurus 2018-05-13 15:36:41 -04:00
parent 9aabff4883
commit 2ce48c1a42
2 changed files with 14 additions and 6 deletions

View File

@ -56,7 +56,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
!Enum.member?(
activity.data["to"],
User.get_by_ap_id(activity.data["actor"]).follower_address
), do: Pleroma.Web.Streamer.stream("direct", activity)
),
do: Pleroma.Web.Streamer.stream("direct", activity)
end
end
end

View File

@ -193,11 +193,18 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
cc = object["cc"] || []
cond do
public in to -> "public"
public in cc -> "unlisted"
public in to ->
"public"
public in cc ->
"unlisted"
# this should use the sql for the object's activity
Enum.any?(to, &String.contains?(&1, "/followers")) -> "private"
true -> "direct"
Enum.any?(to, &String.contains?(&1, "/followers")) ->
"private"
true ->
"direct"
end
end
end