+sub RemoveInappropriateRecipients {
+ my $self = shift;
+
+ my $creatorObj = $self->TransactionObj->CreatorObj;
+ my $creator = $creatorObj->EmailAddress() || '';
+ my $TransactionCurrentUser = RT::CurrentUser->new;
+ $TransactionCurrentUser->LoadByName($creatorObj->Name);
+
+ $self->RecipientFilter(
+ Callback => sub {
+ return unless lc $_[0] eq lc $creator;
+ return "not sending to $creator, creator of the transaction, due to NotifyActor setting";
+ },
+ ) unless RT->Config->Get('NotifyActor',$TransactionCurrentUser)
+ || $self->Argument =~ /\bAlwaysNotifyActor\b/;
+
+ $self->SUPER::RemoveInappropriateRecipients();
+}