lib/Kolab

Thomas Brüderli bruederli at kolabsys.com
Wed Jan 21 19:14:34 CET 2015


 lib/Kolab/FreeBusy/SourceIMAP.php |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit ad344d75cf3a68797bbd225f93b58decbce39b51
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Jan 21 19:14:30 2015 +0100

    Exclude declined events from free-busy stream

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?




More information about the commits mailing list