Don't return blocked users' activities in contexts.
This commit is contained in:
parent
a47727adde
commit
8ef58a266b
2 changed files with 6 additions and 2 deletions
|
|
@ -93,10 +93,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
end
|
||||
end
|
||||
|
||||
def fetch_activities_for_context(context) do
|
||||
def fetch_activities_for_context(context, opts \\ %{}) do
|
||||
query = from activity in Activity,
|
||||
where: fragment("?->>'type' = ? and ?->>'context' = ?", activity.data, "Create", activity.data, ^context),
|
||||
order_by: [desc: :id]
|
||||
query = restrict_blocked(query, opts)
|
||||
Repo.all(query)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue