Add an endpoint to get multiple statuses by IDs

This commit is contained in:
Egor Kislitsyn 2019-09-03 16:23:03 +07:00
commit b40b10b53d
7 changed files with 53 additions and 0 deletions

View file

@ -173,6 +173,13 @@ defmodule Pleroma.Activity do
|> Repo.one()
end
def all_by_ids_with_object(ids) do
Activity
|> where([a], a.id in ^ids)
|> with_preloaded_object()
|> Repo.all()
end
def by_object_ap_id(ap_id) do
from(
activity in Activity,