Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(dav): fix event birthday alarms not being updated
In #33251 the default offset for
a birthday event alarm was changed to 9AM on the day of the event.

However the birthdayEvenChanged method did not account for alarm
changes, so it was never propagated to existing birthday events, which
were kept on midnight.

Signed-off-by: Thomas Citharel <[email protected]>
  • Loading branch information
tcitworld committed Feb 1, 2024
commit 8939a2edcd10ec79c11f62cd6e993c960b62fa2e
8 changes: 7 additions & 1 deletion apps/dav/lib/CalDAV/BirthdayService.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ public function syncUser(string $user):void {
}

/**
* The birthday event is considered changed if either
* - the start date has changed
* - the title has changed
* - the time for the alarm has changed
*
* @param string $existingCalendarData
* @param VCalendar $newCalendarData
* @return bool
Expand All @@ -331,7 +336,8 @@ public function birthdayEvenChanged(string $existingCalendarData,

return (
$newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() ||
$newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue()
$newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() ||

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch

Cannot get property on possibly null variable $newCalendarData->VEVENT of type Sabre\VObject\Property|null

Check notice

Code scanning / Psalm

UndefinedPropertyFetch

Instance property Sabre\VObject\Property::$SUMMARY is not defined

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getValue on possibly null value

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch

Cannot get property on possibly null variable $existingBirthday->VEVENT of type Sabre\VObject\Property|null

Check notice

Code scanning / Psalm

UndefinedPropertyFetch

Instance property Sabre\VObject\Property::$SUMMARY is not defined

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getValue on possibly null value
($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue())

Check failure

Code scanning / Psalm

UndefinedPropertyFetch

Instance property Sabre\VObject\Property::$VALARM is not defined

Check failure

Code scanning / Psalm

UndefinedPropertyFetch

Instance property Sabre\VObject\Property::$VALARM is not defined

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch

Cannot get property on possibly null variable $newCalendarData->VEVENT of type Sabre\VObject\Property|null

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch

Cannot get property on possibly null variable $existingBirthday->VEVENT of type Sabre\VObject\Property|null
);
}

Expand Down