Revert "On creating forward, don't include purged parts (fixes NB#124831)."
[modest] / src / modest-utils.c
index 019504c..4447e5e 100644 (file)
@@ -1149,15 +1149,18 @@ modest_utils_flush_send_queue (const gchar *account_id)
 
        /* Get the transport account */
        account = (TnyTransportAccount *)
-               modest_tny_account_store_get_tny_account_by (modest_runtime_get_account_store (),
-                                                            MODEST_TNY_ACCOUNT_STORE_QUERY_ID,
-                                                            account_id);
-
+               modest_tny_account_store_get_server_account (modest_runtime_get_account_store (),
+                                                            account_id,
+                                                            TNY_ACCOUNT_TYPE_TRANSPORT);
        if (account) {
+               ModestMailOperation *wakeup_op;
                ModestTnySendQueue *send_queue = modest_runtime_get_send_queue (account, TRUE);
 
                /* Flush it! */
-               tny_camel_send_queue_flush ((TnyCamelSendQueue *) send_queue);
+               wakeup_op = modest_mail_operation_new (NULL);
+               modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
+                                                wakeup_op);
+               modest_mail_operation_queue_wakeup (wakeup_op, send_queue);
 
                g_object_unref (account);
        }