diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 09910a18aa..218b7be28d 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -84,10 +84,21 @@ class calendar_hooks */ static public function prepareEventPush($event) { - $event = array_intersect_key($event, array_flip(['id','owner','participants','start','end'])); + $send_keys = ['id', 'owner', 'participants', 'start', 'end']; + if($event['recur_type']) + { + // If it's a recurring event, we're only sending the first instance, which may be outside of the current + // view and therefore would be ignored by the client. Include range for additional check. + $send_keys[] = 'range_start'; + $send_keys[] = 'range_end'; + } + $event = array_intersect_key($event, array_flip($send_keys)); foreach($event['participants'] as $uid => $status) { - if ($uid[0] === 'e') unset($event['participants'][$uid]); + if($uid[0] === 'e') + { + unset($event['participants'][$uid]); + } } return $event; } diff --git a/calendar/js/app.ts b/calendar/js/app.ts index a093e3fa6a..9e6253b38a 100644 --- a/calendar/js/app.ts +++ b/calendar/js/app.ts @@ -649,8 +649,13 @@ export class CalendarApp extends EgwApp // Check if we're interested by date? if(cal_event.end <= new Date(this.state.first).valueOf() /1000 || cal_event.start > new Date(this.state.last).valueOf()/1000) { - // The event is outside our current view - return; + // The event is outside our current view, but check if it's just one of a recurring event + if(!cal_event.range_end && !cal_event.range_start || + cal_event.range_end <= new Date(this.state.first).valueOf() / 1000 || + cal_event.range_start > new Date(this.state.last).valueOf() / 1000) + { + return; + } } // Do we already have "fresh" data? Most user actions give fresh data in response