Skip to content

Commit

Permalink
Merge branch '5.0/uninitialized-action-sendemail' into 5.0-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Jan 30, 2024
2 parents 77539f7 + a254b18 commit 57099ec
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/RT/Action/SendEmail.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1144,12 +1144,15 @@ sub SetReferencesHeaders {
# Make all references which are internal be to version which we
# have sent out

# In some contexts, like rt-crontool, ScripObj and ScripActionObj
# may be any empty object, so id is not defined.

for ( @references, @in_reply_to ) {
s/<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@\Q$org\E>$/
s!<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@\Q$org\E>$!
"<$1." . $self->TicketObj->id .
"-" . $self->ScripObj->id .
"-" . $self->ScripActionObj->{_Message_ID} .
"@" . $org . ">"/eg
"-" . ( $self->ScripObj->id // 0 ) .
"-" . ( $self->ScripActionObj->{_Message_ID} // 0 ) .
"@" . $org . ">"!eg
}

# In reply to whatever the internal message was in reply to
Expand Down

0 comments on commit 57099ec

Please sign in to comment.