Ref: fix-local-public
This commit is contained in:
Tusooa Zhu 2022-05-05 11:18:18 -04:00
commit 466568ae36
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 10 additions and 4 deletions

View file

@ -58,7 +58,10 @@ defmodule Pleroma.Activity.Search do
def maybe_restrict_blocked(query, _), do: query
defp restrict_public(q, user) when not is_nil(user) do
intended_recipients = [Pleroma.Constants.as_public(), Pleroma.Web.ActivityPub.Utils.as_local_public()]
intended_recipients = [
Pleroma.Constants.as_public(),
Pleroma.Web.ActivityPub.Utils.as_local_public()
]
from([a, o] in q,
where: fragment("?->>'type' = 'Create'", a.data),