Skip to content

Commit

Permalink
11.0.4: * [Mail/Inbound] The inbound mail log now tracks matching leg…
Browse files Browse the repository at this point in the history
…acy routing rules and their invoked actions.
  • Loading branch information
jstanden committed Jan 31, 2025
1 parent 44aa392 commit 868db47
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions api/app/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2095,9 +2095,20 @@ static private function _parseMessageRoutingLegacy(CerberusParserModel $model) {
$model->getParserMessage()
))) {
// Update our model with the results of the routing rules
if(is_array($routing_rules))
foreach($routing_rules as $rule) {
$rule->run($model);
if(is_array($routing_rules) && $routing_rules) {
$routing_results = [];

foreach ($routing_rules as $rule) { /* @var $rule Model_MailToGroupRule */
$rule->run($model);
$routing_results[] = DevblocksDictionaryDelegate::instance([
'__handler' => 'rule/' . ($rule->id ?? ''),
'__handler_uri' => sprintf('cerb:mail_to_group_rule:%d-%s', $rule->id, DevblocksPlatform::strToPermalink($rule->name)),
'__return' => [
'actions' => $rule->actions
]
]);
}
$model->logEventResults('mail.routing.rule.legacy', $routing_results);
}
}
}
Expand Down

0 comments on commit 868db47

Please sign in to comment.