aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/imap/IMAPMessage.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-07-26 12:47:30 +0000
committerVincent Richard <[email protected]>2013-07-26 12:47:30 +0000
commitb0845eff0db7d3aa35c3dc1629d250535d704bc8 (patch)
tree3e317af991e2f02596916cda0a0cb7b552bcd998 /src/net/imap/IMAPMessage.cpp
parentAdded SMTP service properties to allow disabling PIPELINING and CHUNKING exte... (diff)
downloadvmime-b0845eff0db7d3aa35c3dc1629d250535d704bc8.tar.gz
vmime-b0845eff0db7d3aa35c3dc1629d250535d704bc8.zip
Allow messages to be designated either by their number or their UID.
Warning: this is an API-breaking change.
Diffstat (limited to 'src/net/imap/IMAPMessage.cpp')
-rw-r--r--src/net/imap/IMAPMessage.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/imap/IMAPMessage.cpp b/src/net/imap/IMAPMessage.cpp
index 96114e94..33599689 100644
--- a/src/net/imap/IMAPMessage.cpp
+++ b/src/net/imap/IMAPMessage.cpp
@@ -531,7 +531,10 @@ void IMAPMessage::setFlags(const int flags, const int mode)
if (!folder)
throw exceptions::folder_not_found();
- folder->setMessageFlags(m_num, m_num, flags, mode);
+ if (!m_uid.empty())
+ folder->setMessageFlags(messageSet::byUID(m_uid), flags, mode);
+ else
+ folder->setMessageFlags(messageSet::byNumber(m_num), flags, mode);
}