Fix listing event groups

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-10-22 16:59:04 +02:00
parent d8185660e3
commit 2c42cf2735
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
3 changed files with 6 additions and 2 deletions

View File

@ -1686,7 +1686,7 @@ defmodule Mobilizon.Actors do
method =
case type do
:remote_members -> &list_remote_members_for_group/3
:events -> &Events.list_organized_events_for_group/3
:events -> &Events.list_simple_organized_events_for_group/3
:posts -> &Mobilizon.Posts.get_posts_for_group/3
:resources -> &Mobilizon.Resources.get_resources_for_group/3
:todo_lists -> &Mobilizon.Todos.get_todo_lists_for_group/3

View File

@ -425,6 +425,10 @@ defmodule Mobilizon.Events do
|> Page.build_page(page, limit)
end
def list_simple_organized_events_for_group(%Actor{} = actor, page, limit) do
list_organized_events_for_group(actor, :all, nil, nil, page, limit)
end
@spec list_organized_events_for_group(
Actor.t(),
DateTime.t() | nil,

View File

@ -96,7 +96,7 @@ defmodule Mobilizon.Web.ActivityPub.ActorView do
end
defp fetch_collection(:events, actor, page) do
Events.list_organized_events_for_group(actor, page)
Events.list_simple_organized_events_for_group(actor, page)
end
defp fetch_collection(:todos, actor, page) do