Expose person follows

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-25 13:18:46 +02:00
parent f315685deb
commit d0b45de175
3 changed files with 68 additions and 2 deletions

View File

@@ -1030,6 +1030,14 @@ defmodule Mobilizon.Actors do
|> Repo.delete()
end
@spec list_paginated_follows_for_actor(Actor.t(), integer | nil, integer | nil) ::
Page.t(Follower.t())
def list_paginated_follows_for_actor(%Actor{id: actor_id}, page \\ nil, limit \\ nil) do
actor_id
|> followings_for_actor_query
|> Page.build_page(page, limit)
end
@doc """
Returns the list of external followers for an actor.
"""