diff --git a/lib/service/export/icalendar.ex b/lib/service/export/icalendar.ex index 9a75c308a..a514648d9 100644 --- a/lib/service/export/icalendar.ex +++ b/lib/service/export/icalendar.ex @@ -3,6 +3,7 @@ defmodule Mobilizon.Service.Export.ICalendar do Export an event to iCalendar format. """ + alias Mobilizon.Actors.Actor alias Mobilizon.Addresses.Address alias Mobilizon.{Config, Events} alias Mobilizon.Events.{Event, EventOptions} @@ -119,7 +120,8 @@ defmodule Mobilizon.Service.Export.ICalendar do dtend: ends_on(event), description: HTML.strip_tags(event.description), uid: event.uuid, - url: event.url + url: event.url, + organizer: organizer(event) } icalendar_event = @@ -161,4 +163,12 @@ defmodule Mobilizon.Service.Export.ICalendar do end defp shift_tz(%DateTime{} = date, _), do: date + + defp organizer(%Event{attributed_to: %Actor{} = group}) do + Actor.display_name(group) + end + + defp organizer(%Event{organizer_actor: %Actor{} = profile}) do + Actor.display_name(profile) + end end diff --git a/lib/web/templates/email/email.html.heex b/lib/web/templates/email/email.html.heex index 6f4802614..789baa6f5 100644 --- a/lib/web/templates/email/email.html.heex +++ b/lib/web/templates/email/email.html.heex @@ -141,12 +141,14 @@
- <%= if @offer_unsupscription do %> + <%= if @offer_unsupscription do %> +
<%= gettext("Manage your notification settings") %> - <% end %> +
+ <% end %> +
<%= gettext("%{instance} is powered by Mobilizon.", instance: @instance_name) |> raw %>
<%= gettext "Learn more about Mobilizon here!" %>