From da879f5bcd558a7b29b4a71b93546becacb21a43 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 10 Feb 2020 09:58:16 +0100 Subject: [PATCH] Fix event link construction in emails Signed-off-by: Thomas Citharel --- CHANGELOG.md | 1 + lib/web/templates/email/event_participation_approved.html.eex | 2 +- lib/web/templates/email/event_participation_approved.text.eex | 2 +- lib/web/templates/email/event_updated.html.eex | 2 +- lib/web/templates/email/event_updated.text.eex | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00868e74..2aa0b382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Also make sure to remove the `EnvironmentFile=` line from the systemd service an ### Fixed - Fixed URL search - Fixed content accessed through URL search being public +- Fix event links in some emails ## [1.0.0-beta.2] - 2019-12-18 diff --git a/lib/web/templates/email/event_participation_approved.html.eex b/lib/web/templates/email/event_participation_approved.html.eex index 3b354722..94121740 100644 --- a/lib/web/templates/email/event_participation_approved.html.eex +++ b/lib/web/templates/email/event_participation_approved.html.eex @@ -54,7 +54,7 @@ - diff --git a/lib/web/templates/email/event_participation_approved.text.eex b/lib/web/templates/email/event_participation_approved.text.eex index 2712e824..65cd59ae 100644 --- a/lib/web/templates/email/event_participation_approved.text.eex +++ b/lib/web/templates/email/event_participation_approved.text.eex @@ -6,6 +6,6 @@ <%= gettext "An organizer just approved your participation. You're now going to this event!" %> -<%= page_url(Mobilizon.Web.Endpoint, :event, @event.id) %> +<%= page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %> <%= gettext "If you need to cancel your participation, just access the previous link and click on the participation button." %> diff --git a/lib/web/templates/email/event_updated.html.eex b/lib/web/templates/email/event_updated.html.eex index ba2b75e5..c4c4d630 100644 --- a/lib/web/templates/email/event_updated.html.eex +++ b/lib/web/templates/email/event_updated.html.eex @@ -97,7 +97,7 @@
+ <%= gettext "Go to event page" %>
- diff --git a/lib/web/templates/email/event_updated.text.eex b/lib/web/templates/email/event_updated.text.eex index b9ce3027..0740c207 100644 --- a/lib/web/templates/email/event_updated.text.eex +++ b/lib/web/templates/email/event_updated.text.eex @@ -16,6 +16,6 @@ <%= gettext "New date and time for ending of event: %{ends_on}", ends_on: datetime_to_string(@event.ends_on, @locale) %> <% end %> -<%= gettext "View the updated event on: %{link}", link: page_url(Mobilizon.Web.Endpoint, :event, @event.id) %> +<%= gettext "View the updated event on: %{link}", link: page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %> <%= gettext "If you need to cancel your participation, just access the event page through link above and click on the participation button." %>
+ <%= gettext "Go to event page" %>