Add .ics to the event files names attached to email
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
66cf03dd9b
commit
3c2dfba880
|
@ -46,7 +46,7 @@ defmodule Mobilizon.Web.Email do
|
||||||
with {:ok, %Event{} = event} <- Events.get_event_with_preload(event_id),
|
with {:ok, %Event{} = event} <- Events.get_event_with_preload(event_id),
|
||||||
{:ok, event_ics_data} <- ICalendar.export_event(event) do
|
{:ok, event_ics_data} <- ICalendar.export_event(event) do
|
||||||
put_attachment(email, %Bamboo.Attachment{
|
put_attachment(email, %Bamboo.Attachment{
|
||||||
filename: Slugger.slugify_downcase(event.title),
|
filename: "#{Slugger.slugify_downcase(event.title)}.ics",
|
||||||
content_type: "text/calendar",
|
content_type: "text/calendar",
|
||||||
data: event_ics_data
|
data: event_ics_data
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue