feat: allow to filter events by local-only

In addition to internal (self + federated) and global (global external search engine), introduce the
self possibility

Closes #1322

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2024-02-09 10:54:00 +01:00
parent d1b1979ee5
commit 9d99684402
9 changed files with 87 additions and 8 deletions

View File

@@ -581,6 +581,7 @@ defmodule Mobilizon.Events do
|> events_for_bounding_box(args)
|> filter_online(args)
|> filter_draft()
|> filter_local(if Map.get(args, :local_only, nil) == true, do: true, else: nil)
|> filter_local_or_from_followed_instances_events()
|> filter_public_visibility()
|> event_order(Map.get(args, :sort_by, :match_desc), search_string)