mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
Prepare message keywords/categories support
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2021 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4f0ee846fe
commit
c5a7918843
@ -788,6 +788,7 @@ public abstract class ExchangeSession {
|
||||
IMAP_MESSAGE_ATTRIBUTES.add("lastmodified");
|
||||
// OSX IMAP requests content-class
|
||||
IMAP_MESSAGE_ATTRIBUTES.add("contentclass");
|
||||
IMAP_MESSAGE_ATTRIBUTES.add("keywords");
|
||||
}
|
||||
|
||||
protected static final Set<String> UID_MESSAGE_ATTRIBUTES = new HashSet<String>();
|
||||
@ -1695,6 +1696,10 @@ public abstract class ExchangeSession {
|
||||
* Message content class.
|
||||
*/
|
||||
public String contentClass;
|
||||
/**
|
||||
* Message keywords (categories).
|
||||
*/
|
||||
public String keywords;
|
||||
/**
|
||||
* Message IMAP uid, unique in folder (x0e230003).
|
||||
*/
|
||||
@ -1817,6 +1822,11 @@ public abstract class ExchangeSession {
|
||||
if (forwarded) {
|
||||
buffer.append("$Forwarded ");
|
||||
}
|
||||
if (keywords != null) {
|
||||
for (String keyword:keywords.split(",")) {
|
||||
buffer.append(keyword).append(" ");
|
||||
}
|
||||
}
|
||||
return buffer.toString().trim();
|
||||
}
|
||||
|
||||
|
@ -2010,6 +2010,8 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
String lastmodified = convertDateFromExchange(getPropertyIfExists(properties, "lastmodified"));
|
||||
message.recent = !message.read && lastmodified != null && lastmodified.equals(message.date);
|
||||
|
||||
message.keywords = getPropertyIfExists(properties, "keywords");
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("Message");
|
||||
|
Loading…
Reference in New Issue
Block a user