Skip to content

Commit

Permalink
fix(calendar): ensure alarms have a DESCRIPTION property
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Jan 6, 2022
1 parent cabba35 commit b817048
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions SoObjects/Appointments/iCalAlarm+SOGo.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* iCalAlarm+SOGo.m - this file is part of SOGo
*
* Copyright (C) 2015-2017 Inverse inc.
* Copyright (C) 2015-2022 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -89,6 +89,13 @@ + (id) alarmForEvent: (iCalEntityObject *) theEntity
if ([reminderAction length] > 0 && [reminderUnit length] > 0)
{
[anAlarm setAction: [reminderAction uppercaseString]];
[anAlarm setSummary: [theEntity summary]];
if ([[theEntity comment] length])
[anAlarm setComment: [theEntity comment]];
else
// RFC 5545 requires the DESCRIPTION (comment) field to be defined for a VALARM
[anAlarm setComment: [theEntity summary]];

if ([reminderAction isEqualToString: @"email"])
{
[anAlarm removeAllAttendees];
Expand All @@ -97,8 +104,6 @@ + (id) alarmForEvent: (iCalEntityObject *) theEntity
toEmailAlarm: anAlarm];
if (reminderEmailOrganizer)
[anAlarm _appendOrganizerToEmailAlarm: anAlarm owner: theOwner];
[anAlarm setSummary: [theEntity summary]];
[anAlarm setComment: [theEntity comment]];
}

if ([reminderReference caseInsensitiveCompare: @"BEFORE"] == NSOrderedSame)
Expand Down

0 comments on commit b817048

Please sign in to comment.