This makes mbox export of response messages consistent with HTML export.
The bts (from devscripts) cache mode of "full" requests all messages from the
bug, including debbugs response mails, in mbox format but debbugs always
ignores those messages when returning an mbox, leading to bts errors.
my $record_wanted_anyway = 0;
my ($msg_id) = record_regex($record,qr/^Message-Id:\s+<(.+)>/im);
next if defined $msg_id and exists $seen_message_ids{$msg_id};
my $record_wanted_anyway = 0;
my ($msg_id) = record_regex($record,qr/^Message-Id:\s+<(.+)>/im);
next if defined $msg_id and exists $seen_message_ids{$msg_id};
- next if defined $msg_id and $msg_id =~/handler\..+\.ack(?:info|done)?\@/;
+ next if not defined $msg and defined $msg_id and $msg_id =~/handler\..+\.ack(?:info|done)?\@/;
$record_wanted_anyway = 1 if record_regex($record,qr/^Received: \(at control\)/);
next if not $boring and not $record->{type} eq $wanted_type and not $record_wanted_anyway and @records > 1;
$seen_message_ids{$msg_id} = 1 if defined $msg_id;
$record_wanted_anyway = 1 if record_regex($record,qr/^Received: \(at control\)/);
next if not $boring and not $record->{type} eq $wanted_type and not $record_wanted_anyway and @records > 1;
$seen_message_ids{$msg_id} = 1 if defined $msg_id;