mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-11 20:05:03 -05:00
Caldav: fix regression in getItem, allow urn:content-classes:calendarmessage contentClass
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1044 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
2f28151a64
commit
42023dd69a
@ -3097,7 +3097,7 @@ public class ExchangeSession {
|
|||||||
} catch (HttpNotFoundException hnfe) {
|
} catch (HttpNotFoundException hnfe) {
|
||||||
// failover for Exchange 2007 plus encoding issue
|
// failover for Exchange 2007 plus encoding issue
|
||||||
String decodedEventName = convertItemNameToEML(itemName).replaceAll("_xF8FF_", "/").replaceAll("_x003F_", "?").replaceAll("'", "''");
|
String decodedEventName = convertItemNameToEML(itemName).replaceAll("_xF8FF_", "/").replaceAll("_x003F_", "?").replaceAll("'", "''");
|
||||||
LOGGER.debug("Item not found at "+itemPath+", search by displayname: '"+decodedEventName+ '\'');
|
LOGGER.debug("Item not found at " + itemPath + ", search by displayname: '" + decodedEventName + '\'');
|
||||||
ExchangeSession.MessageList messages = searchMessages(folderPath, " AND \"DAV:displayname\"='" + decodedEventName + '\'');
|
ExchangeSession.MessageList messages = searchMessages(folderPath, " AND \"DAV:displayname\"='" + decodedEventName + '\'');
|
||||||
if (!messages.isEmpty()) {
|
if (!messages.isEmpty()) {
|
||||||
item = getItem(messages.get(0).getPermanentUrl());
|
item = getItem(messages.get(0).getPermanentUrl());
|
||||||
@ -3125,7 +3125,8 @@ public class ExchangeSession {
|
|||||||
"contentclass", DAV);
|
"contentclass", DAV);
|
||||||
if ("urn:content-classes:person".equals(contentClass)) {
|
if ("urn:content-classes:person".equals(contentClass)) {
|
||||||
return new Contact(responses[0]);
|
return new Contact(responses[0]);
|
||||||
} else if ("urn:content-classes:appointment".equals(contentClass)) {
|
} else if ("urn:content-classes:appointment".equals(contentClass)
|
||||||
|
|| "urn:content-classes:calendarmessage".equals(contentClass)) {
|
||||||
return new Event(responses[0]);
|
return new Event(responses[0]);
|
||||||
} else {
|
} else {
|
||||||
throw new DavMailException("EXCEPTION_EVENT_NOT_FOUND");
|
throw new DavMailException("EXCEPTION_EVENT_NOT_FOUND");
|
||||||
|
Loading…
Reference in New Issue
Block a user