X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Factivity%2Fsearch.ex;h=f847ac2381faa0d25678aa79503a8cc1752ba24c;hb=a15b9cbef1b8b06f4fdbfb224f783ea78d1ce27a;hp=0cc3770a70a6b13664242a34b0bd52c558321938;hpb=eae991b06a22bf7fc3eef7a0d5b409c931c1f6cb;p=akkoma diff --git a/lib/pleroma/activity/search.ex b/lib/pleroma/activity/search.ex index 0cc3770a7..f847ac238 100644 --- a/lib/pleroma/activity/search.ex +++ b/lib/pleroma/activity/search.ex @@ -9,6 +9,8 @@ defmodule Pleroma.Activity.Search do alias Pleroma.User alias Pleroma.Web.ActivityPub.Visibility + require Pleroma.Constants + import Ecto.Query def search(user, search_query, options \\ []) do @@ -39,7 +41,7 @@ defmodule Pleroma.Activity.Search do defp restrict_public(q) do from([a, o] in q, where: fragment("?->>'type' = 'Create'", a.data), - where: "https://www.w3.org/ns/activitystreams#Public" in a.recipients + where: ^Pleroma.Constants.as_public() in a.recipients ) end