Unverified Commit 69dcb7a1 authored by David Verdin's avatar David Verdin Committed by GitHub
Browse files

Merge pull request #586 from ldidry/fix-548

Fix #548 — Add DB log entry when message is rejected or distributed via email
parents 2766e0ef 775d3e9e
......@@ -151,6 +151,15 @@ sub _reject {
},
date => time + 1
);
$log->db_log(
'robot' => $list->{'domain'},
'list' => $list->{'name'},
'action' => 'reject',
'parameters' => $message->{authkey},
'target_email' => $message->{sender},
'status' => 'success',
'user_email' => $param->{rejected_by}
);
}
1;
......@@ -195,6 +204,16 @@ sub _distribute {
Sympa::send_dsn($message->{context}, $message, {}, '2.1.5');
}
$log->db_log(
'robot' => $list->{'domain'},
'list' => $list->{'name'},
'action' => 'distribute',
'parameters' => $message->{authkey},
'target_email' => $message->{sender},
'status' => 'success',
'user_email' => $self->{distributed_by}
);
$message->{envelope_sender} = $self->{distributed_by};
return ['Sympa::Spindle::DistributeMessage'];
}
......
Supports Markdown
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