Skip to content
Snippets Groups Projects
Commit 62c7584e authored by Jared Hancock's avatar Jared Hancock
Browse files

filter: Fix recursion if reply-to action used with non-email sources

parent ca7701fd
No related branches found
No related tags found
No related merge requests found
......@@ -188,16 +188,17 @@ class FA_UseReplyTo extends TriggerAction {
static $name = /* @trans */ 'Use Reply-To Email';
function apply(&$ticket, array $info) {
$config = $this->getConfiguration();
if (!$info['reply-to'])
// Nothing to do
return;
$changed = $info['reply-to'] != $ticket['email']
|| ($info['reply-to-name'] && $ticket['name'] != $info['reply-to-name']);
if ($info['reply-to']) {
if ($changed) {
$ticket['email'] = $info['reply-to'];
if ($info['reply-to-name'])
$ticket['name'] = $info['reply-to-name'];
}
if ($changed)
throw new FilterDataChanged($ticket);
}
}
function getConfigurationOptions() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment