Send Notifications when participation approval

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-08 12:28:19 +02:00
parent 63efea7371
commit 3e74f59ee8
38 changed files with 2500 additions and 973 deletions

View File

@@ -5,7 +5,7 @@ defmodule Mobilizon.Users.Setting do
use Ecto.Schema
import Ecto.Changeset
alias Mobilizon.Users.User
alias Mobilizon.Users.{NotificationPendingNotificationDelay, User}
@required_attrs [:user_id]
@@ -13,7 +13,8 @@ defmodule Mobilizon.Users.Setting do
:timezone,
:notification_on_day,
:notification_each_week,
:notification_before_event
:notification_before_event,
:notification_pending_participation
]
@attrs @required_attrs ++ @optional_attrs
@@ -24,6 +25,11 @@ defmodule Mobilizon.Users.Setting do
field(:notification_on_day, :boolean)
field(:notification_each_week, :boolean)
field(:notification_before_event, :boolean)
field(:notification_pending_participation, NotificationPendingNotificationDelay,
default: :none
)
belongs_to(:user, User, primary_key: true, type: :id, foreign_key: :id, define_field: false)
timestamps()