Send notifications to event organizer when new comment is posted

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-27 11:21:34 +02:00
parent 93297931bb
commit 3ed25bab81
9 changed files with 161 additions and 64 deletions

View File

@@ -214,6 +214,17 @@ defmodule Mobilizon.Events do
|> Repo.exists?()
end
@doc """
Gets an event by its UUID, with all associations loaded.
"""
@spec get_event_by_uuid_with_preload(String.t()) :: Event.t() | nil
def get_event_by_uuid_with_preload(uuid) do
uuid
|> event_by_uuid_query()
|> preload_for_event()
|> Repo.one()
end
@doc """
Gets an event by its UUID, with all associations loaded.
"""