Use correct locale for participation emails

For anonymous participations we now use a locale parameter in metadata

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-09 10:07:30 +02:00
parent 164dca8562
commit 8310a3d4b9
7 changed files with 66 additions and 47 deletions

View File

@@ -24,7 +24,7 @@ defmodule Mobilizon.Events.Participant do
@required_attrs [:url, :role, :event_id, :actor_id]
@attrs @required_attrs
@metadata_attrs [:email, :confirmation_token, :cancellation_token, :message]
@metadata_attrs [:email, :confirmation_token, :cancellation_token, :message, :locale]
@timestamps_opts [type: :utc_datetime]
@@ -38,6 +38,7 @@ defmodule Mobilizon.Events.Participant do
field(:confirmation_token, :string)
field(:cancellation_token, :string)
field(:message, :string)
field(:locale, :string)
end
belongs_to(:event, Event, primary_key: true)