bug 361635 Make update invitations work by working around outlook issues r=Fallen

git-svn-id: svn://10.0.0.236/trunk@246854 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ctalbert%mozilla.com 2008-03-02 00:23:56 +00:00
parent d50120aeb8
commit 60e694d3b8
2 changed files with 19 additions and 1 deletions

View File

@ -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;

View File

@ -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);
}
}
};