diff --git a/mozilla/calendar/base/src/calItipProcessor.js b/mozilla/calendar/base/src/calItipProcessor.js index cc9e7a98de2..d92ac22c7c8 100644 --- a/mozilla/calendar/base/src/calItipProcessor.js +++ b/mozilla/calendar/base/src/calItipProcessor.js @@ -365,6 +365,10 @@ calItipProcessor.prototype = { // TODO: Handle generation properly - Bug 418345 aCalItem.generation = aExistingItem.generation; + // We also have to ensure that the calendar is set properly on + // the new item, or items with alarms will throw during the + // notification process + aCalItem.calendar = aExistingItem.calendar; aTargetCalendar.modifyItem(aCalItem, aExistingItem, aListener); return true; diff --git a/mozilla/calendar/lightning/content/imip-bar.js b/mozilla/calendar/lightning/content/imip-bar.js index bd956ae1150..fff5e656810 100644 --- a/mozilla/calendar/lightning/content/imip-bar.js +++ b/mozilla/calendar/lightning/content/imip-bar.js @@ -411,6 +411,13 @@ function isUpdateMsg() var itemList = gItipItem.getItemList({ }); var newSequence = itemList[0].getProperty("SEQUENCE"); + // Make sure we don't have a pre Outlook 2007 appointment, but if we do + // use Microsoft's Sequence number. I <3 MS + if ((newSequence == "0") && + itemList[0].hasProperty("X-MICROSOFT-CDO-APPT-SEQUENCE")) { + newSequence = itemList[0].getProperty("X-MICROSOFT-CDO-APPT-SEQUENCE"); + } + var onFindItemListener = { processedId: null, onOperationComplete: @@ -426,7 +433,14 @@ function isUpdateMsg() function ogr(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) { if (aCount && aItems[0] && !this.processedId) { this.processedId = true; - determineUpdateType(newSequence, aItems[0].getProperty("SEQUENCE")); + var existingSequence = aItems[0].getProperty("SEQUENCE"); + + // Handle the microsoftism foolishness + if ((existingSequence == "0") && + itemList[0].hasProperty("X-MICROSOFT-CDO-APPT-SEQUENCE")) { + existingSequence = aItems[0].getProperty("X-MICROSOFT-CDO-APPT-SEQUENCE"); + } + determineUpdateType(newSequence, existingSequence); } } };