trim_headers => {type => BOOLEAN,
default => 1,
},
+ avatars => {type => BOOLEAN,
+ default => 1,
+ },
}
);
my $head_field = $head->get($_);
next unless defined $head_field and $head_field ne '';
chomp $head_field;
- if ($_ eq 'From') {
+ if ($_ eq 'From' and $param{avatars}) {
my $libravatar_url = __libravatar_url(decode_rfc1522($head_field));
if (defined $libravatar_url and length $libravatar_url) {
push @headers,q(<img src=").$libravatar_url.qq(">\n);
terse => $param{terse},
exists $param{msg}?(msg=>$param{msg}):(),
exists $param{att}?(att=>$param{att}):(),
+ exists $param{avatars}?(avatars=>$param{avatars}):(),
);
# print {$output} "\n";
}
terse => $param{terse},
exists $param{msg}?(msg=>$param{msg}):(),
exists $param{att}?(att=>$param{att}):(),
+ exists $param{avatars}?(avatars=>$param{avatars}):(),
);
# print {$output} "\n";
}
exists $param{msg}?(msg=>$param{msg}):(),
exists $param{att}?(att=>$param{att}):(),
exists $param{trim_headers}?(trim_headers=>$param{trim_headers}):(),
+ exists $param{avatars}?(avatars=>$param{avatars}):(),
);
return decode_utf8($output);
}
=cut
sub handle_record{
- my ($record,$bug_number,$msg_number,$seen_msg_ids) = @_;
+ my ($record,$bug_number,$msg_number,$seen_msg_ids,%param) = @_;
# output needs to have the is_utf8 flag on to avoid double
# encoding
$output .= handle_email_message($record->{text},
ref => $bug_number,
msg_num => $msg_number,
+ %param,
);
}
elsif (/autocheck/) {
$output .= handle_email_message($record->{text},
ref => $bug_number,
msg_num => $msg_number,
+ %param,
);
}
else {
single => [qw(bug msg att boring terse),
qw(reverse mbox mime trim),
qw(mboxstat mboxmaint archive),
- qw(repeatmerged)
+ qw(repeatmerged avatars),
],
default => {# msg => '',
boring => 'no',
mboxmaint => 'no',
archive => 'no',
repeatmerged => 'yes',
+ avatars => 'yes',
},
);
# This is craptacular.
my $reverse = $param{'reverse'} eq 'yes';
my $mbox = $param{'mbox'} eq 'yes';
my $mime = $param{'mime'} eq 'yes';
+my $avatars = $param{avatars} eq 'yes';
my %bugusertags;
my %ut;
next;
}
$skip_next = 1 if $record->{type} eq 'html' and not $boring;
- push @log, handle_record($record,$ref,$msg_num,\%seen_msg_ids);
+ push @log, handle_record($record,$ref,$msg_num,
+ \%seen_msg_ids,
+ trim_headers => $trim_headers,
+ avatars => $avatars,
+ );
}
}