[Bps-public-commit] rt-extension-onetimeto branch, master, updated. 8d3539f642b17ac0e7ae04c809851e7a427c6f34
Thomas Sibley
trs at bestpractical.com
Thu Jul 28 14:56:49 EDT 2011
The branch, master has been updated
via 8d3539f642b17ac0e7ae04c809851e7a427c6f34 (commit)
from 7812d854f80586847670adca4f416093d725a413 (commit)
Summary of changes:
lib/RT/Extension/OneTimeTo.pm | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
- Log -----------------------------------------------------------------
commit 8d3539f642b17ac0e7ae04c809851e7a427c6f34
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 28 14:54:43 2011 -0400
Switch to storing addresses under NoSquelch
This matches the behaviour of one time Ccs and Bccs and would be
expected by the user. Happily, RT::Action::SendEmail already handles To
fields under NoSquelch.
It also avoids copying the NotifyActor code from the original method.
diff --git a/lib/RT/Extension/OneTimeTo.pm b/lib/RT/Extension/OneTimeTo.pm
index 6e5f469..f624712 100644
--- a/lib/RT/Extension/OneTimeTo.pm
+++ b/lib/RT/Extension/OneTimeTo.pm
@@ -78,23 +78,14 @@ my $orig_recipients = RT::Action::Notify->can('SetRecipients');
my $self = shift;
$orig_recipients->($self, @_);
- # copy RT-Send-To addresses to To addresses
+ # copy RT-Send-To addresses to NoSquelched To addresses
if ( $self->Argument =~ /\bOtherRecipients\b/ ) {
if ( my $attachment = $self->TransactionObj->Attachments->First ) {
- push @{ $self->{'To'} }, map { $_->address } Email::Address->parse(
+ push @{ $self->{'NoSquelch'}{'To'} }, map { $_->address } Email::Address->parse(
$attachment->GetHeader('RT-Send-To')
);
}
}
-
- # deal with NotifyActor, mostly copied from the original method
- my $creatorObj = $self->TransactionObj->CreatorObj;
- my $creator = $creatorObj->EmailAddress();
- my $TransactionCurrentUser = RT::CurrentUser->new;
- $TransactionCurrentUser->LoadByName($creatorObj->Name);
- if (!RT->Config->Get('NotifyActor',$TransactionCurrentUser)) {
- @{ $self->{'To'} } = grep ( lc $_ ne lc $creator, @{ $self->{'To'} } );
- }
};
1;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list