]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-reply.c
cli: replace use of g_mime_message_get_reply_to
[notmuch] / notmuch-reply.c
index e6c166414f1a72c376911b4e4dae63e26250e519..f789a14083e0fa444a294cd2e4d2c0c559459806 100644 (file)
@@ -61,7 +61,7 @@ format_part_reply (GMimeStream *stream, mime_node_t *node)
                                  recipients_string);
        g_free (recipients_string);
        g_mime_stream_printf (stream, "> Subject: %s\n", g_mime_message_get_subject (message));
-       g_mime_stream_printf (stream, "> Date: %s\n", g_mime_message_get_date_as_string (message));
+       g_mime_stream_printf (stream, "> Date: %s\n", g_mime_message_get_date_string (node, message));
        g_mime_stream_printf (stream, ">\n");
     } else if (GMIME_IS_PART (node->part)) {
        GMimeContentType *content_type = g_mime_object_get_content_type (node->part);
@@ -268,12 +268,11 @@ reply_to_header_is_redundant (GMimeMessage *message,
 
 static InternetAddressList *get_sender(GMimeMessage *message)
 {
-    const char *reply_to;
-
-    reply_to = g_mime_message_get_reply_to (message);
-    if (reply_to && *reply_to) {
-       InternetAddressList *reply_to_list;
+    InternetAddressList *reply_to_list;
 
+    reply_to_list = g_mime_message_get_reply_to_list (message);
+    if (reply_to_list &&
+       internet_address_list_length (reply_to_list) > 0) {
         /*
         * Some mailing lists munge the Reply-To header despite it
         * being A Bad Thing, see
@@ -287,7 +286,6 @@ static InternetAddressList *get_sender(GMimeMessage *message)
         * to the list. Note that the address in the Reply-To header
         * will always appear in the reply if reply_all is true.
         */
-       reply_to_list = internet_address_list_parse_string (reply_to);
        if (! reply_to_header_is_redundant (message, reply_to_list))
            return reply_to_list;