diff --git a/NEWS b/NEWS index 3069604c5..6d01c3ea2 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Enhancements - Improve sync speed from Outlook by non-reprocessing already downloaded unread mails Bug fixes + - Weekly recurring events created in SOGo web interface are now shown in Outlook - Fix exception modifications import in recurrence series - Sent mails are not longer in Drafts folder using Outlook - Fix server side crash parsing rtf emails with images (with word97 format) diff --git a/OpenChange/MAPIStoreRecurrenceUtils.m b/OpenChange/MAPIStoreRecurrenceUtils.m index 28b1be22c..9e0bf29c3 100644 --- a/OpenChange/MAPIStoreRecurrenceUtils.m +++ b/OpenChange/MAPIStoreRecurrenceUtils.m @@ -325,15 +325,25 @@ rp->RecurFrequency = RecurFrequency_Weekly; rp->PatternType = PatternType_Week; rp->Period = repeatInterval; + + dayOfWeek = [startDate dayOfWeek]; + mask = 0; byDayMask = [self byDayMask]; - for (count = 0; count < 7; count++) - if ([byDayMask occursOnDay: count]) - mask |= 1 << count; + if (byDayMask) + { + for (count = 0; count < 7; count++) + if ([byDayMask occursOnDay: count]) + mask |= 1 << count; + } + else + { + /* Set the recurrence pattern using start date */ + mask |= 1 << dayOfWeek; + } rp->PatternTypeSpecific.WeekRecurrencePattern = mask; /* FirstDateTime */ - dayOfWeek = [startDate dayOfWeek]; if (dayOfWeek) beginOfWeek = [startDate dateByAddingYears: 0 months: 0 days: -dayOfWeek