Improve related events

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-10-03 14:02:25 +02:00
parent 4a16f572d8
commit ca9826e299
2 changed files with 53 additions and 4 deletions

View File

@@ -211,10 +211,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Event do
# We get the organizer's next public event
events =
event
|> organizer_next_public_event()
# We find similar events with the same tags
|> similar_events_common_tags(event)
# TODO: We should use tag_relations to find more appropriate events
|> Events.related_events()
# We've considered all recommended events, so we fetch the latest events
|> add_latest_events()
# We remove the same event from the results