Add Push notifications backend support

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-05-06 12:27:04 +02:00
parent 4f6e203ced
commit 9f5e3a39ec
14 changed files with 321 additions and 26 deletions

View File

@@ -14,6 +14,8 @@ defmodule Mobilizon.Users.Setting do
notification_before_event: boolean,
notification_pending_participation: NotificationPendingNotificationDelay.t(),
notification_pending_membership: NotificationPendingNotificationDelay.t(),
group_notifications: NotificationPendingNotificationDelay.t(),
last_notification_sent: DateTime.t(),
user: User.t()
}
@@ -25,7 +27,9 @@ defmodule Mobilizon.Users.Setting do
:notification_each_week,
:notification_before_event,
:notification_pending_participation,
:notification_pending_membership
:notification_pending_membership,
:group_notifications,
:last_notification_sent
]
@attrs @required_attrs ++ @optional_attrs
@@ -47,6 +51,9 @@ defmodule Mobilizon.Users.Setting do
default: :one_day
)
field(:group_notifications, NotificationPendingNotificationDelay, default: :one_day)
field(:last_notification_sent, :utc_datetime)
embeds_one :location, Location, on_replace: :update, primary_key: false do
field(:name, :string)
field(:range, :integer)