Fix listing event groups
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
fd711c4d12
commit
63e739564f
@ -1686,7 +1686,7 @@ defmodule Mobilizon.Actors do
|
|||||||
method =
|
method =
|
||||||
case type do
|
case type do
|
||||||
:remote_members -> &list_remote_members_for_group/3
|
: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
|
:posts -> &Mobilizon.Posts.get_posts_for_group/3
|
||||||
:resources -> &Mobilizon.Resources.get_resources_for_group/3
|
:resources -> &Mobilizon.Resources.get_resources_for_group/3
|
||||||
:todo_lists -> &Mobilizon.Todos.get_todo_lists_for_group/3
|
:todo_lists -> &Mobilizon.Todos.get_todo_lists_for_group/3
|
||||||
|
@ -425,6 +425,10 @@ defmodule Mobilizon.Events do
|
|||||||
|> Page.build_page(page, limit)
|
|> Page.build_page(page, limit)
|
||||||
end
|
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(
|
@spec list_organized_events_for_group(
|
||||||
Actor.t(),
|
Actor.t(),
|
||||||
DateTime.t() | nil,
|
DateTime.t() | nil,
|
||||||
|
@ -96,7 +96,7 @@ defmodule Mobilizon.Web.ActivityPub.ActorView do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp fetch_collection(:events, actor, page) do
|
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
|
end
|
||||||
|
|
||||||
defp fetch_collection(:todos, actor, page) do
|
defp fetch_collection(:todos, actor, page) do
|
||||||
|
Loading…
Reference in New Issue
Block a user