mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
EWS: store X-MOZ-SEND-INVITATIONS property to fix no notification issue with Lightning
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1584 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
1615f4991b
commit
f8823f36a6
@ -1191,6 +1191,11 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
} else {
|
} else {
|
||||||
updates.add(Field.createFieldUpdate("apptstateflags", "0"));
|
updates.add(Field.createFieldUpdate("apptstateflags", "0"));
|
||||||
}
|
}
|
||||||
|
// store mozilla invitations option
|
||||||
|
String xMozSendInvitations = vCalendar.getFirstVeventPropertyValue("X-MOZ-SEND-INVITATIONS");
|
||||||
|
if (xMozSendInvitations != null) {
|
||||||
|
updates.add(Field.createFieldUpdate("xmozsendinvitations", xMozSendInvitations));
|
||||||
|
}
|
||||||
// handle mozilla alarm
|
// handle mozilla alarm
|
||||||
String xMozLastack = vCalendar.getFirstVeventPropertyValue("X-MOZ-LASTACK");
|
String xMozLastack = vCalendar.getFirstVeventPropertyValue("X-MOZ-LASTACK");
|
||||||
if (xMozLastack != null) {
|
if (xMozLastack != null) {
|
||||||
@ -1270,6 +1275,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
getItemMethod.addAdditionalProperty(Field.get("optionalattendees"));
|
getItemMethod.addAdditionalProperty(Field.get("optionalattendees"));
|
||||||
getItemMethod.addAdditionalProperty(Field.get("xmozlastack"));
|
getItemMethod.addAdditionalProperty(Field.get("xmozlastack"));
|
||||||
getItemMethod.addAdditionalProperty(Field.get("xmozsnoozetime"));
|
getItemMethod.addAdditionalProperty(Field.get("xmozsnoozetime"));
|
||||||
|
getItemMethod.addAdditionalProperty(Field.get("xmozsendinvitations"));
|
||||||
}
|
}
|
||||||
|
|
||||||
executeMethod(getItemMethod);
|
executeMethod(getItemMethod);
|
||||||
@ -1292,21 +1298,27 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
VProperty attendeeProperty = new VProperty("ATTENDEE", "mailto:" + attendee.email);
|
VProperty attendeeProperty = new VProperty("ATTENDEE", "mailto:" + attendee.email);
|
||||||
attendeeProperty.addParam("CN", attendee.name);
|
attendeeProperty.addParam("CN", attendee.name);
|
||||||
attendeeProperty.addParam("PARTSTAT", attendee.partstat);
|
attendeeProperty.addParam("PARTSTAT", attendee.partstat);
|
||||||
|
//attendeeProperty.addParam("RSVP", "TRUE");
|
||||||
attendeeProperty.addParam("ROLE", attendee.role);
|
attendeeProperty.addParam("ROLE", attendee.role);
|
||||||
localVCalendar.addFirstVeventProperty(attendeeProperty);
|
localVCalendar.addFirstVeventProperty(attendeeProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// restore mozilla invitations option
|
||||||
|
localVCalendar.setFirstVeventPropertyValue("X-MOZ-SEND-INVITATIONS",
|
||||||
|
getItemMethod.getResponseItem().get(Field.get("xmozsendinvitations").getResponseName()));
|
||||||
// restore mozilla alarm status
|
// restore mozilla alarm status
|
||||||
localVCalendar.setFirstVeventPropertyValue("X-MOZ-LASTACK",
|
localVCalendar.setFirstVeventPropertyValue("X-MOZ-LASTACK",
|
||||||
getItemMethod.getResponseItem().get(Field.get("xmozlastack").getResponseName()));
|
getItemMethod.getResponseItem().get(Field.get("xmozlastack").getResponseName()));
|
||||||
localVCalendar.setFirstVeventPropertyValue("X-MOZ-SNOOZE-TIME",
|
localVCalendar.setFirstVeventPropertyValue("X-MOZ-SNOOZE-TIME",
|
||||||
getItemMethod.getResponseItem().get(Field.get("xmozsnoozetime").getResponseName()));
|
getItemMethod.getResponseItem().get(Field.get("xmozsnoozetime").getResponseName()));
|
||||||
|
// overwrite method
|
||||||
|
// localVCalendar.setPropertyValue("METHOD", "REQUEST");
|
||||||
content = localVCalendar.toString().getBytes("UTF-8");
|
content = localVCalendar.toString().getBytes("UTF-8");
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw buildHttpException(e);
|
throw buildHttpException(e);
|
||||||
} catch (MessagingException e) {
|
} catch (MessagingException e) {
|
||||||
throw buildHttpException(e);
|
throw buildHttpException(e);
|
||||||
}
|
}
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
@ -1575,7 +1587,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
} else {
|
} else {
|
||||||
int end = line.lastIndexOf("\" selected>");
|
int end = line.lastIndexOf("\" selected>");
|
||||||
int start = line.lastIndexOf('\"', end - 1);
|
int start = line.lastIndexOf('\"', end - 1);
|
||||||
result = line.substring(start+1, end);
|
result = line.substring(start + 1, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -200,6 +200,7 @@ public final class Field {
|
|||||||
|
|
||||||
FIELD_MAP.put("xmozlastack", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.PublicStrings, "xmozlastack"));
|
FIELD_MAP.put("xmozlastack", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.PublicStrings, "xmozlastack"));
|
||||||
FIELD_MAP.put("xmozsnoozetime", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.PublicStrings, "xmozsnoozetime"));
|
FIELD_MAP.put("xmozsnoozetime", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.PublicStrings, "xmozsnoozetime"));
|
||||||
|
FIELD_MAP.put("xmozsendinvitations", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.PublicStrings, "xmozsendinvitations"));
|
||||||
|
|
||||||
// attachments
|
// attachments
|
||||||
FIELD_MAP.put("attachments", new UnindexedFieldURI("item:Attachments"));
|
FIELD_MAP.put("attachments", new UnindexedFieldURI("item:Attachments"));
|
||||||
|
Loading…
Reference in New Issue
Block a user