activitypub: remove contain_timeline()
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 25 Mar 2019 00:10:20 +0000 (00:10 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 15 May 2019 15:53:06 +0000 (15:53 +0000)
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
lib/pleroma/web/twitter_api/twitter_api_controller.ex

index fec1bcd3ef21791dc94c9c32e2a39cd1b4c76923..e544d0c50eb2aaf1a90e183bdf6935b241a7fd5f 100644 (file)
@@ -980,12 +980,4 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
   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
 end
index 87e597074c1b7c8c961603aff51368e07f7039e1..66056a84633a9d65ea8bccf10c26026a1269d16c 100644 (file)
@@ -303,7 +303,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
     activities =
       [user.ap_id | user.following]
       |> ActivityPub.fetch_activities(params)
-      |> ActivityPub.contain_timeline(user)
       |> Enum.reverse()
 
     conn
index 3c5a70be99308e36df2ef524d21d58aa8c160a8a..31e86685a2b0172f073ee4438a33031dcd2f01c4 100644 (file)
@@ -101,9 +101,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
       |> Map.put("blocking_user", user)
       |> Map.put("user", user)
 
-    activities =
-      ActivityPub.fetch_activities([user.ap_id | user.following], params)
-      |> ActivityPub.contain_timeline(user)
+    activities = ActivityPub.fetch_activities([user.ap_id | user.following], params)
 
     conn
     |> put_view(ActivityView)