mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-12-26 18:35:40 +01:00
activitypub: remove contain_timeline()
This commit is contained in:
parent
0387f52138
commit
de114ffbb0
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user