mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 17:31:52 -05:00
EWS: fix regression in deleted flag handling
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1096 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
9a2149ef93
commit
a038a0a61f
@ -926,7 +926,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
}
|
||||
|
||||
protected String getPropertyIfExists(DavPropertySet properties, String alias) {
|
||||
DavProperty property = properties.get(Field.getPropertyName(alias));
|
||||
DavProperty property = properties.get(Field.getResponsePropertyName(alias));
|
||||
if (property == null) {
|
||||
return null;
|
||||
} else {
|
||||
@ -1256,7 +1256,6 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
} else if ("draft".equals(entry.getKey())) {
|
||||
list.add(Field.createDavProperty("messageFlags", entry.getValue()));
|
||||
} else if ("deleted".equals(entry.getKey())) {
|
||||
// TODO: need to test this
|
||||
list.add(Field.createDavProperty("writedeleted", entry.getValue()));
|
||||
} else if ("datereceived".equals(entry.getKey())) {
|
||||
list.add(Field.createDavProperty("datereceived", entry.getValue()));
|
||||
|
@ -44,6 +44,7 @@ public class Field {
|
||||
distinguishedPropertySetMap.put(DistinguishedPropertySetType.Task, "00062003-0000-0000-c000-000000000046");
|
||||
}
|
||||
|
||||
protected static final Namespace EMPTY = Namespace.getNamespace("");
|
||||
protected static final Namespace DAV = Namespace.getNamespace("DAV:");
|
||||
protected static final Namespace URN_SCHEMAS_HTTPMAIL = Namespace.getNamespace("urn:schemas:httpmail:");
|
||||
protected static final Namespace URN_SCHEMAS_MAILHEADER = Namespace.getNamespace("urn:schemas:mailheader:");
|
||||
@ -253,6 +254,8 @@ public class Field {
|
||||
protected final String alias;
|
||||
protected final String uri;
|
||||
protected final String requestPropertyString;
|
||||
protected final DavPropertyName responsePropertyName;
|
||||
|
||||
|
||||
public Field(Namespace namespace, String name) {
|
||||
this(name, namespace, name);
|
||||
@ -268,8 +271,10 @@ public class Field {
|
||||
this.uri = namespace.getURI() + name;
|
||||
if (responseAlias == null) {
|
||||
this.requestPropertyString = '"' + uri + '"';
|
||||
this.responsePropertyName = davPropertyName;
|
||||
} else {
|
||||
this.requestPropertyString = '"' + uri + "\" as " + responseAlias;
|
||||
this.responsePropertyName = DavPropertyName.create(responseAlias, EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,4 +327,8 @@ public class Field {
|
||||
public static String getRequestPropertyString(String alias) {
|
||||
return Field.get(alias).requestPropertyString;
|
||||
}
|
||||
|
||||
public static DavPropertyName getResponsePropertyName(String alias) {
|
||||
return Field.get(alias).responsePropertyName;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user