]> granicus.if.org Git - mutt/commitdiff
Honor mail-followup-to when doing a list-reply. From
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 20 Jan 2000 07:26:12 +0000 (07:26 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 20 Jan 2000 07:26:12 +0000 (07:26 +0000)
Mikko.Hanninen@iki.fi.

send.c

diff --git a/send.c b/send.c
index c631fc57eb360660d12ea27129e2ef75ffa95b02..6eb5b1331fc8a78dd18e96d3f021dfcd9d8fc163 100644 (file)
--- a/send.c
+++ b/send.c
@@ -418,12 +418,12 @@ static int include_reply (CONTEXT *ctx, HEADER *cur, FILE *out)
   return 0;
 }
 
-static int default_to (ADDRESS **to, ENVELOPE *env, int group)
+static int default_to (ADDRESS **to, ENVELOPE *env, int flags)
 {
   char prompt[STRING];
   int i = 0;
 
-  if (group && env->mail_followup_to)
+  if (flags && env->mail_followup_to)
   {
     snprintf (prompt, sizeof (prompt), _("Follow-up to %s%s?"),
              env->mail_followup_to->mailbox,
@@ -436,6 +436,12 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int group)
     }
   }
 
+  /* Exit now if we're setting up the default Cc list for list-reply
+   * (only set if Mail-Followup-To is present and honoured).
+   */
+  if (flags & SENDLISTREPLY)
+    return 0;
+
   if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from))
   {
     /* mail is from the user, assume replying to recipients */
@@ -495,6 +501,10 @@ int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags)
     tmp = find_mailing_lists (in->to, in->cc);
     rfc822_append (&out->to, tmp);
     rfc822_free_address (&tmp);
+
+    if (in->mail_followup_to &&
+        default_to (&out->cc, in, flags & SENDLISTREPLY) == -1)
+      return (-1); /* abort */
   }
   else
   {