mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
Caldav: Fix 3567364, regression on from/to/cc handling in calendar related to IMAP search enhancement. Separate mapping for message fields/headers
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2020 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
83e44f777a
commit
4f0ee846fe
@ -617,6 +617,8 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
String lastmodified = convertDateFromExchange(response.get(Field.get("lastmodified").getResponseName()));
|
||||
message.recent = !message.read && lastmodified != null && lastmodified.equals(message.date);
|
||||
|
||||
message.keywords = response.get(Field.get("keywords").getResponseName());
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("Message");
|
||||
@ -865,10 +867,11 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
@Override
|
||||
public Condition headerIsEqualTo(String headerName, String value) {
|
||||
if (serverVersion.startsWith("Exchange2010")) {
|
||||
if ("message-id".equals(headerName)
|
||||
|| "from".equals(headerName)
|
||||
if ("from".equals(headerName)
|
||||
|| "to".equals(headerName)
|
||||
|| "cc".equals(headerName)
|
||||
|| "cc".equals(headerName)) {
|
||||
return new AttributeCondition("msg"+headerName, Operator.Contains, value, ContainmentMode.Substring, ContainmentComparison.IgnoreCase);
|
||||
} else if ("message-id".equals(headerName)
|
||||
|| "bcc".equals(headerName)) {
|
||||
return new AttributeCondition(headerName, Operator.Contains, value, ContainmentMode.Substring, ContainmentComparison.IgnoreCase);
|
||||
} else {
|
||||
|
@ -74,15 +74,22 @@ public final class Field {
|
||||
FIELD_MAP.put("iconIndex", new ExtendedFieldURI(0x1080, ExtendedFieldURI.PropertyType.Integer));// PR_ICON_INDEX
|
||||
FIELD_MAP.put("datereceived", new ExtendedFieldURI(0x0e06, ExtendedFieldURI.PropertyType.SystemTime));// PR_MESSAGE_DELIVERY_TIME
|
||||
|
||||
FIELD_MAP.put("to", new UnindexedFieldURI("message:ToRecipients"));
|
||||
FIELD_MAP.put("cc", new UnindexedFieldURI("message:CcRecipients"));
|
||||
FIELD_MAP.put("from", new UnindexedFieldURI("message:From"));
|
||||
FIELD_MAP.put("msgfrom", new UnindexedFieldURI("message:From"));
|
||||
FIELD_MAP.put("msgto", new UnindexedFieldURI("message:ToRecipients"));
|
||||
FIELD_MAP.put("msgcc", new UnindexedFieldURI("message:CcRecipients"));
|
||||
|
||||
FIELD_MAP.put("from", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, "from"));
|
||||
FIELD_MAP.put("to", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, "to"));
|
||||
FIELD_MAP.put("cc", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, "cc"));
|
||||
FIELD_MAP.put("bcc", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, "bcc"));
|
||||
|
||||
FIELD_MAP.put("message-id", new UnindexedFieldURI("message:InternetMessageId"));
|
||||
FIELD_MAP.put("bcc", new UnindexedFieldURI("message:BccRecipients"));
|
||||
|
||||
FIELD_MAP.put("messageheaders", new ExtendedFieldURI(0x007D, ExtendedFieldURI.PropertyType.String)); // PR_TRANSPORT_MESSAGE_HEADERS
|
||||
|
||||
FIELD_MAP.put("contentclass", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, "content-class"));
|
||||
FIELD_MAP.put("message-id", new UnindexedFieldURI("message:InternetMessageId"));
|
||||
|
||||
|
||||
FIELD_MAP.put("body", new UnindexedFieldURI("item:Body"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user