mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-17 23:38:19 +00:00
Formatting
This commit is contained in:
parent
9aabff4883
commit
2ce48c1a42
|
@ -56,7 +56,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
!Enum.member?(
|
!Enum.member?(
|
||||||
activity.data["to"],
|
activity.data["to"],
|
||||||
User.get_by_ap_id(activity.data["actor"]).follower_address
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -193,11 +193,18 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
||||||
cc = object["cc"] || []
|
cc = object["cc"] || []
|
||||||
|
|
||||||
cond do
|
cond do
|
||||||
public in to -> "public"
|
public in to ->
|
||||||
public in cc -> "unlisted"
|
"public"
|
||||||
# this should use the sql for the object's activity
|
|
||||||
Enum.any?(to, &String.contains?(&1, "/followers")) -> "private"
|
public in cc ->
|
||||||
true -> "direct"
|
"unlisted"
|
||||||
|
|
||||||
|
# this should use the sql for the object's activity
|
||||||
|
Enum.any?(to, &String.contains?(&1, "/followers")) ->
|
||||||
|
"private"
|
||||||
|
|
||||||
|
true ->
|
||||||
|
"direct"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue