Commit a33a5f6e authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 279318: Flag notifications are sent even if emails are turned off for the…

Bug 279318: Flag notifications are sent even if emails are turned off for the addressee - Patch by Tiago R. Mello <timello@gmail.com> r/a=LpSolit
parent 4d1b66af
......@@ -1047,9 +1047,13 @@ sub notify {
# If there is nobody left to notify, return.
return unless ($flag->{'addressee'} || $flag->type->cc_list);
my @recipients = split(/[, ]+/, $flag->type->cc_list);
# Only notify if the addressee is allowed to receive the email.
if ($flag->{'addressee'} && $flag->{'addressee'}->email_enabled) {
push @recipients, $flag->{'addressee'}->email;
}
# Process and send notification for each recipient
foreach my $to ($flag->{'addressee'} ? $flag->{'addressee'}->email : '',
split(/[, ]+/, $flag->type->cc_list))
foreach my $to (@recipients)
{
next unless $to;
my $vars = { 'flag' => $flag,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment