From f553add82699c7ce8fbd2f1819078c83e1974a59 Mon Sep 17 00:00:00 2001
From: Don Armstrong <don@donarmstrong.com>
Date: Thu, 14 Jun 2007 13:21:07 +0100
Subject: [PATCH]   - Only mail duplicated recipients once (closes: #172635)

---
 Debbugs/Mail.pm  | 3 +++
 debian/changelog | 1 +
 2 files changed, 4 insertions(+)

diff --git a/Debbugs/Mail.pm b/Debbugs/Mail.pm
index 54e52f5d..8ee984a3 100644
--- a/Debbugs/Mail.pm
+++ b/Debbugs/Mail.pm
@@ -135,6 +135,9 @@ sub send_mail_message{
      my @recipients;
      @recipients = @{$param{recipients}} if defined $param{recipients} and
 	  ref($param{recipients}) eq 'ARRAY';
+     my %recipients;
+     @recipients{@recipients} = (1) x @recipients;
+     @recipients = keys %recipients;
      # If there are no recipients, use -t to parse the message
      if (@recipients == 0) {
 	  $param{parse_for_recipients} = 1 unless exists $param{parse_for_recipients};
diff --git a/debian/changelog b/debian/changelog
index dea4c80e..6ccafaa3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -183,6 +183,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
     - Implement versioning aware archiving support (closes: #339141)
     - Split out packages so that you don't have to install the mail stuff
       unless you want it.
+    - Only mail duplicated recipients once (closes: #172635)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
-- 
2.39.5