Commit 96dcacad authored by rinpatch's avatar rinpatch

properly check for follower address in is_private?

parent 1ce1b7b5
...@@ -876,7 +876,12 @@ def is_public?(data) do ...@@ -876,7 +876,12 @@ def is_public?(data) do
end end
def is_private?(activity) do def is_private?(activity) do
!is_public?(activity) && Enum.any?(["to"], &String.contains?(&1, "/followers")) unless is_public?(activity) do
follower_address = User.get_cached_by_ap_id(["actor"]).follower_address
Enum.any?(["to"], &(&1 == follower_address))
end end
def is_direct?(%Activity{data: %{"directMessage" => true}}), do: true def is_direct?(%Activity{data: %{"directMessage" => true}}), do: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment