[evolution] Bug #659440 - Doesn't mark messages as replied when sending offline



commit 8db7139c1915737d987c1613a3211e881a1dd07f
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 26 12:23:11 2011 +0200

    Bug #659440 - Doesn't mark messages as replied when sending offline

 mail/mail-ops.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index bf57a97..2c4b306 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -45,6 +45,7 @@
 
 #include "e-mail-local.h"
 #include "e-mail-session.h"
+#include "e-mail-session-utils.h"
 
 #define w(x)
 #define d(x)
@@ -711,6 +712,26 @@ mail_send_message (struct _send_queue_msg *m,
 	}
 
 	if (local_error == NULL) {
+		/* Mark the draft message for deletion, if present. */
+		e_mail_session_handle_draft_headers_sync (
+			m->session, message, cancellable, &local_error);
+		if (local_error != NULL) {
+			g_warning ("%s: Failed to handle draft headers: %s", G_STRFUNC, local_error->message);
+			g_clear_error (&local_error);
+		}
+
+		/* Set flags on the original source message, if present.
+		 * Source message refers to the message being forwarded
+		 * or replied to. */
+		e_mail_session_handle_source_headers_sync (
+			m->session, message, cancellable, &local_error);
+		if (local_error != NULL) {
+			g_warning ("%s: Failed to handle source headers: %s", G_STRFUNC, local_error->message);
+			g_clear_error (&local_error);
+		}
+	}
+
+	if (local_error == NULL) {
 		camel_folder_set_message_flags (
 			queue, uid, CAMEL_MESSAGE_DELETED |
 			CAMEL_MESSAGE_SEEN, ~0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]