1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-21 15:32:32 +00:00

Add .ics to the event files names attached to email

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-06-16 17:42:50 +02:00
parent 66cf03dd9b
commit 3c2dfba880
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -46,7 +46,7 @@ defmodule Mobilizon.Web.Email do
with {:ok, %Event{} = event} <- Events.get_event_with_preload(event_id),
{:ok, event_ics_data} <- ICalendar.export_event(event) do
put_attachment(email, %Bamboo.Attachment{
filename: Slugger.slugify_downcase(event.title),
filename: "#{Slugger.slugify_downcase(event.title)}.ics",
content_type: "text/calendar",
data: event_ics_data
})