From 7a1bfcac49d291dfbf2f266435c29df1fbe01665 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 11 Oct 2023 17:08:31 +0200 Subject: [PATCH] feat(export): add event status in iCalendar exports Signed-off-by: Thomas Citharel --- lib/service/export/icalendar.ex | 1 + test/service/export/icalendar_test.exs | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/service/export/icalendar.ex b/lib/service/export/icalendar.ex index 5bcd67401..d930f3086 100644 --- a/lib/service/export/icalendar.ex +++ b/lib/service/export/icalendar.ex @@ -127,6 +127,7 @@ defmodule Mobilizon.Service.Export.ICalendar do description: HTML.strip_tags(event.description), uid: event.uuid, url: event.url, + status: event.status, organizer: organizer(event) } diff --git a/test/service/export/icalendar_test.exs b/test/service/export/icalendar_test.exs index 2c6dd3676..eca1451e3 100644 --- a/test/service/export/icalendar_test.exs +++ b/test/service/export/icalendar_test.exs @@ -27,6 +27,7 @@ defmodule Mobilizon.Service.ICalendarTest do GEO:#{event.physical_address |> Address.coords() |> Tuple.to_list() |> Enum.join(";")} LOCATION:#{Address.representation(event.physical_address)} ORGANIZER:#{event.organizer_actor.name} + STATUS:#{event.status |> to_string() |> String.upcase()} SUMMARY:#{event.title} UID:#{event.uuid} URL:#{event.url}