Poll notification: notify for your own poll even when block_from_strangers is set

This commit is contained in:
Alex Gleason 2021-07-18 10:48:37 -05:00
parent 0114754db2
commit f9eeae3b77
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -635,7 +635,12 @@ defmodule Pleroma.Notification do
) do
actor = activity.data["actor"]
follower = User.get_cached_by_ap_id(actor)
!User.following?(follower, user)
cond do
user.ap_id == actor -> false
!User.following?(follower, user) -> true
true -> false
end
end
# To do: consider defining recency in hours and checking FollowingRelationship with a single SQL