summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-01-21 18:14:30 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-01-21 18:14:30 (GMT)
commitad344d75cf3a68797bbd225f93b58decbce39b51 (patch)
tree34591b725f273e9e2a75adacca219ddf2cce2bee
parent81573143ab65a2de279b1112e289e8c7d48dae17 (diff)
downloadkolab-freebusy-ad344d75cf3a68797bbd225f93b58decbce39b51.tar.gz
Exclude declined events from free-busy stream
-rw-r--r--lib/Kolab/FreeBusy/SourceIMAP.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Kolab/FreeBusy/SourceIMAP.php b/lib/Kolab/FreeBusy/SourceIMAP.php
index bca241f..6536a4b 100644
--- a/lib/Kolab/FreeBusy/SourceIMAP.php
+++ b/lib/Kolab/FreeBusy/SourceIMAP.php
@@ -170,6 +170,17 @@ class SourceIMAP extends Source
continue;
}
}
+ // skip declined events
+ else if (is_array($event['attendees'])) {
+ foreach ($event['attendees'] as $attendee) {
+ if (in_array($attendee['email'], $user_email)) {
+ if ($attendee['status'] == 'DECLINED') {
+ $log->debug('Skip declined event', array($event['uid'], $event['title']));
+ continue 2;
+ }
+ }
+ }
+ }
// translate all-day dates into absolute UTC times
// FIXME: use server timezone?