1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-11-12 04:15:08 -05:00

Caldav: fix broken inbox, missing instancetype in search request and add is null in search query

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@976 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-03-29 10:45:10 +00:00
parent 5f7226bddf
commit adf3bfaaf4

View File

@ -2491,10 +2491,11 @@ public class ExchangeSession {
public List<Event> getEventMessages(String folderPath) throws IOException {
List<Event> result;
try {
String searchQuery = "Select \"DAV:getetag\", \"http://schemas.microsoft.com/exchange/permanenturl\"" +
String scheduleStatePropertyName = scheduleStateProperty.getNamespace().getURI() + scheduleStateProperty.getName();
String searchQuery = "Select \"DAV:getetag\", \"http://schemas.microsoft.com/exchange/permanenturl\", \"urn:schemas:calendar:instancetype\"" +
" FROM Scope('SHALLOW TRAVERSAL OF \"" + folderPath + "\"')\n" +
" WHERE \"DAV:contentclass\" = 'urn:content-classes:calendarmessage'\n" +
" AND (NOT \"" + scheduleStateProperty.getNamespace().getURI() + scheduleStateProperty.getName() + "\" = 'CALDAV:schedule-processed')\n" +
" AND (\""+scheduleStatePropertyName+"\" IS NULL OR NOT \"" + scheduleStatePropertyName + "\" = 'CALDAV:schedule-processed')\n" +
" ORDER BY \"urn:schemas:calendar:dtstart\" DESC\n";
result = getEvents(folderPath, searchQuery);
} catch (HttpException e) {