Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop
[akkoma] / lib / pleroma / web / twitter_api / twitter_api.ex
index 30362ef7049590efdfa9aa2e63dd86a52c5e097d..c12cd7f8aa14a8912e89b69e04609a9e31897b38 100644 (file)
@@ -193,6 +193,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
       from(
         a in Activity,
         where: fragment("?->>'type' = 'Create'", a.data),
+        where: "https://www.w3.org/ns/activitystreams#Public" in a.recipients,
         where:
           fragment(
             "to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)",
@@ -212,6 +213,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
     DateTime.utc_now() |> DateTime.to_iso8601()
   end
 
+  # DEPRECATED mostly, context objects are now created at insertion time.
   def context_to_conversation_id(context) do
     with %Object{id: id} <- Object.get_cached_by_ap_id(context) do
       id