Merge branch 'develop' into conversations-import
authorMark Felder <feld@FreeBSD.org>
Thu, 16 May 2019 18:11:17 +0000 (13:11 -0500)
committerMark Felder <feld@FreeBSD.org>
Thu, 16 May 2019 18:11:17 +0000 (13:11 -0500)
1  2 
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/activity_pub/visibility.ex

index 96cb4209bccb62c5a397e07b5230b85e41d6cc9d,7cd5b889b895332297faafc12766e127039551b4..92d1fab6ee7b1cd618d7c30360bb878fdcf40d1e
@@@ -955,19 -974,4 +974,11 @@@ defmodule Pleroma.Web.ActivityPub.Activ
    def contain_activity(%Activity{} = activity, %User{} = user) do
      contain_broken_threads(activity, user)
    end
-   # do post-processing on a timeline
-   def contain_timeline(timeline, user) do
-     timeline
-     |> Enum.filter(fn activity ->
-       contain_activity(activity, user)
-     end)
-   end
 +
 +  def fetch_direct_messages_query do
 +    Activity
 +    |> restrict_type(%{"type" => "Create"})
 +    |> restrict_visibility(%{visibility: "direct"})
 +    |> order_by([activity], asc: activity.id)
 +  end
  end