Send all event reminder notifications

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-09-30 10:45:01 +02:00
parent dc8faa12bd
commit 36cdcaa864
3 changed files with 10 additions and 2 deletions

View File

@@ -10,6 +10,14 @@ defmodule Mobilizon.Service.Notifications.Scheduler do
alias Mobilizon.Users.{Setting, User}
require Logger
@spec trigger_notifications_for_participant(Participant.t()) :: {:ok, nil}
def trigger_notifications_for_participant(%Participant{} = participant) do
before_event_notification(participant)
on_day_notification(participant)
weekly_notification(participant)
{:ok, nil}
end
def before_event_notification(%Participant{
id: participant_id,
event: %Event{begins_on: begins_on},