From 63e739564fd5af96c5da7277cd1b899573b91de6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 22 Oct 2020 16:59:04 +0200 Subject: [PATCH] Fix listing event groups Signed-off-by: Thomas Citharel --- lib/mobilizon/actors/actors.ex | 2 +- lib/mobilizon/events/events.ex | 4 ++++ lib/web/views/activity_pub/actor_view.ex | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/mobilizon/actors/actors.ex b/lib/mobilizon/actors/actors.ex index 11579fbd8..e43d95fc9 100644 --- a/lib/mobilizon/actors/actors.ex +++ b/lib/mobilizon/actors/actors.ex @@ -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 diff --git a/lib/mobilizon/events/events.ex b/lib/mobilizon/events/events.ex index 904e7ccf8..a323a6ab0 100644 --- a/lib/mobilizon/events/events.ex +++ b/lib/mobilizon/events/events.ex @@ -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, diff --git a/lib/web/views/activity_pub/actor_view.ex b/lib/web/views/activity_pub/actor_view.ex index 7b2ab9b35..9ca6293bc 100644 --- a/lib/web/views/activity_pub/actor_view.ex +++ b/lib/web/views/activity_pub/actor_view.ex @@ -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