Formatting

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

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"
# this should use the sql for the object's activity
Enum.any?(to, &String.contains?(&1, "/followers")) -> "private"
true -> "direct"
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"
end
end
end