Permalink
Browse files

Appended messages are marked as unread

  • Loading branch information...
1 parent 1e5dbbb commit 9c6c77e15bd38ceccd09758bd0d759914bcf9c7b @mronge mronge committed Dec 20, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 Source/CTCoreFolder.m
View
@@ -330,9 +330,15 @@ - (BOOL) appendMessage: (CTCoreMessage *) msg
NSString *msgStr = [msg render];
if (![self connect])
return NO;
- err = mailsession_append_message ([self folderSession],
+
+ struct mail_flags *flags = mail_flags_new(MAIL_FLAG_SEEN, clist_new());
+
+ err = mailsession_append_message_flags([self folderSession],
[msgStr cStringUsingEncoding: NSUTF8StringEncoding],
- [msgStr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]);
+ [msgStr lengthOfBytesUsingEncoding: NSUTF8StringEncoding],
+ flags);
+
+ mail_flags_free(flags);
if (MAILIMAP_NO_ERROR != err)
self.lastError = MailCoreCreateErrorFromIMAPCode (err);
return MAILIMAP_NO_ERROR == err;

0 comments on commit 9c6c77e

Please sign in to comment.