Merge branch 'fix/check-follower-collection-in-is_private' into 'develop'
properly check for follower address in is_private? See merge request pleroma/pleroma!841
This commit is contained in:
commit
f25a3f4f78
1 changed files with 6 additions and 1 deletions
|
@ -878,7 +878,12 @@ def is_public?(data) do
|
|||
end
|
||||
|
||||
def is_private?(activity) do
|
||||
!is_public?(activity) && Enum.any?(activity.data["to"], &String.contains?(&1, "/followers"))
|
||||
unless is_public?(activity) do
|
||||
follower_address = User.get_cached_by_ap_id(activity.data["actor"]).follower_address
|
||||
Enum.any?(activity.data["to"], &(&1 == follower_address))
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
def is_direct?(%Activity{data: %{"directMessage" => true}}), do: true
|
||||
|
|
Loading…
Reference in a new issue