Commit 9af89c1f authored by Mickaël Guessant's avatar Mickaël Guessant

Caldav: fix #98 Support of Contacts in CardDav REPORT

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2323 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 29d4e5f9
......@@ -771,15 +771,20 @@ public class CaldavConnection extends AbstractConnection {
events = session.getEventMessages(request.getFolderPath());
appendEventsResponses(response, request, events);
} else {
// TODO: handle contacts ?
if (request.vTodoOnly) {
events = session.searchTasksOnly(request.getFolderPath());
} else if (request.vEventOnly) {
events = session.searchEventsOnly(request.getFolderPath(), request.timeRangeStart, request.timeRangeEnd);
ExchangeSession.Folder folder = session.getFolder(folderPath);
if (folder.isContact()) {
List<ExchangeSession.Contact> contacts = session.getAllContacts(folderPath);
appendContactsResponses(response, request, contacts);
} else {
events = session.searchEvents(request.getFolderPath(), request.timeRangeStart, request.timeRangeEnd);
if (request.vTodoOnly) {
events = session.searchTasksOnly(request.getFolderPath());
} else if (request.vEventOnly) {
events = session.searchEventsOnly(request.getFolderPath(), request.timeRangeStart, request.timeRangeEnd);
} else {
events = session.searchEvents(request.getFolderPath(), request.timeRangeStart, request.timeRangeEnd);
}
appendEventsResponses(response, request, events);
}
appendEventsResponses(response, request, events);
}
// send not found events errors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment