Add fetching of activities in context.
This commit is contained in:
parent
ae50b165cc
commit
866a2663d4
2 changed files with 18 additions and 0 deletions
|
|
@ -60,4 +60,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
Repo.all(query)
|
||||
|> Enum.reverse
|
||||
end
|
||||
|
||||
def fetch_activities_for_context(context) do
|
||||
query = from activity in Activity,
|
||||
where: fragment("? @> ?", activity.data, ^%{ context: context })
|
||||
Repo.all(query)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue