From: Mark Felder Date: Thu, 16 May 2019 18:11:17 +0000 (-0500) Subject: Merge branch 'develop' into conversations-import X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ebb04821161e4377f311af7192168e2c01e8c1bb;p=akkoma Merge branch 'develop' into conversations-import --- ebb04821161e4377f311af7192168e2c01e8c1bb diff --cc lib/pleroma/web/activity_pub/activity_pub.ex index 96cb4209b,7cd5b889b..92d1fab6e --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@@ -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