diff --git a/src/calendar/mod.rs b/src/calendar/mod.rs index 921c6a6..5a1fa45 100644 --- a/src/calendar/mod.rs +++ b/src/calendar/mod.rs @@ -122,7 +122,7 @@ pub async fn parse_calendar(cal_to_parse: &[u8]) -> Vec { } match name { - "SUMMARY" => summary = Some(value), + "SUMMARY" => summary = parse_summary(value), "DTSTART" => start_time = parse_date(value).await, "DTEND" => end_time = parse_date(value).await, _ => (), @@ -161,3 +161,11 @@ pub async fn parse_date(date_string: String) -> Option> { chrono::LocalResult::Ambiguous(a, _) => Some(a), } } + +fn parse_summary(mut summary: String) -> Option { + if summary.starts_with("Avvist: ") { + Some(summary.split_off(8)) + } else { + Some(summary) + } +}