summaryrefslogtreecommitdiffstats
path: root/extensions/Profanivore/Extension.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Profanivore/Extension.pm')
-rw-r--r--extensions/Profanivore/Extension.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/extensions/Profanivore/Extension.pm b/extensions/Profanivore/Extension.pm
index fad909c39..b77c09ce3 100644
--- a/extensions/Profanivore/Extension.pm
+++ b/extensions/Profanivore/Extension.pm
@@ -59,20 +59,18 @@ sub mailer_before_send {
my $author = $email->header("X-Bugzilla-Who");
my $recipient = $email->header("To");
- if ($author && $recipient) {
+ if ($author && $recipient && lc($author) ne lc($recipient)) {
my $email_suffix = Bugzilla->params->{'emailsuffix'};
if ($email_suffix ne '') {
$recipient =~ s/\Q$email_suffix\E$//;
$author =~ s/\Q$email_suffix\E$//;
}
-
- $author = new Bugzilla::User({ name => $author });
- $recipient = new Bugzilla::User({ name => $recipient });
-
+
+ $author = new Bugzilla::User({ name => $author });
+
if ($author &&
$author->id &&
- !$author->in_group('editbugs') &&
- $author->id ne $recipient->id)
+ !$author->in_group('editbugs'))
{
my $body = $email->body_str();