summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorAchim Königs <garfonso@tratschtante.de>2016-03-22 23:47:34 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-23 23:21:10 +0100
commit4b2f9e40275826c36bc1b225f321274f3b3bc2f1 (patch)
treec6baefca3e39a9ad6ae48850595ec726cb59aeed /apps/dav/lib
parent6fc92453f3ade9bfdb5286b74bf64457e88e8917 (diff)
downloadnextcloud-server-4b2f9e40275826c36bc1b225f321274f3b3bc2f1.tar.gz
nextcloud-server-4b2f9e40275826c36bc1b225f321274f3b3bc2f1.zip
add VALARM for birthday events
ACTION=DISPLAY *should* prevents audible alarms.
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/caldav/birthdayservice.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/caldav/birthdayservice.php b/apps/dav/lib/caldav/birthdayservice.php
index 274341949b3..e03a630fed8 100644
--- a/apps/dav/lib/caldav/birthdayservice.php
+++ b/apps/dav/lib/caldav/birthdayservice.php
@@ -147,6 +147,11 @@ class BirthdayService {
$vEvent->{'RRULE'} = 'FREQ=YEARLY';
$vEvent->{'SUMMARY'} = $title . ' (*' . $date->format('Y') . ')';
$vEvent->{'TRANSP'} = 'TRANSPARENT';
+ $alarm = $vCal->createComponent('VALARM');
+ $alarm->add($vCal->createProperty('TRIGGER', '-PT0M', ['VALUE' => 'DURATION']));
+ $alarm->add($vCal->createProperty('ACTION', 'DISPLAY'));
+ $alarm->add($vCal->createProperty('DESCRIPTION', $vEvent->{'SUMMARY'}));
+ $vEvent->add($alarm);
$vCal->add($vEvent);
return $vCal;
}