[Bps-public-commit] rt-extension-notificationmatrix branch, master, updated. 2.1-3-gdb55a15

Thomas Sibley trs at bestpractical.com
Thu Sep 29 14:22:24 EDT 2011


The branch, master has been updated
       via  db55a15f0f3d2c25bfe7afe9a176056dc8aab871 (commit)
      from  6de99513ee7ad560cab2d9f6e28495f2dce01bbd (commit)

Summary of changes:
 lib/RT/Extension/NotificationMatrix.pm      |    3 +++
 lib/RT/Extension/NotificationMatrix/Rule.pm |    8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit db55a15f0f3d2c25bfe7afe9a176056dc8aab871
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Sep 29 14:21:31 2011 -0400

    Provide an option to always Bcc all recipients
    
    This can help avoid duplicate emails when Reply All isn't used
    judiciously.

diff --git a/lib/RT/Extension/NotificationMatrix.pm b/lib/RT/Extension/NotificationMatrix.pm
index 2a37f22..026efef 100644
--- a/lib/RT/Extension/NotificationMatrix.pm
+++ b/lib/RT/Extension/NotificationMatrix.pm
@@ -34,6 +34,9 @@ RT::Extension::NotificationMatrix - RT Extension for custom ticket notification
 
   # In your RT site config:
   Set(@Plugins,(qw(RT::Extension::NotificationMatrix));
+  # If you'd like to Bcc all recipients, uncomment the line below.
+  # Disabled by default.
+  #Set($NotificationMatrixAlwaysBcc, 1);
 
 =head1 DESCRIPTION
 
diff --git a/lib/RT/Extension/NotificationMatrix/Rule.pm b/lib/RT/Extension/NotificationMatrix/Rule.pm
index 60bbea2..4590a60 100644
--- a/lib/RT/Extension/NotificationMatrix/Rule.pm
+++ b/lib/RT/Extension/NotificationMatrix/Rule.pm
@@ -57,9 +57,11 @@ sub _AddressesFromGroupWithClass {
     if ($g->Domain eq 'RT::Queue-Role') {
         $g->LoadTicketRoleGroup( Ticket => $self->TicketObj->Id, Type => $g->Type );
         push @emails, $g->MemberEmailAddresses;
-        $class = $g->Type eq 'Cc'      ? 'Cc'
-               : $g->Type eq 'AdminCc' ? 'Bcc'
-                                       : 'To';
+        unless (RT->Config->Get('NotificationMatrixAlwaysBcc')) {
+            $class = $g->Type eq 'Cc'      ? 'Cc'
+                   : $g->Type eq 'AdminCc' ? 'Bcc'
+                                           : 'To';
+        }
     }
 
     return ($class, @emails);

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list