Take the following scenario:I am a staff member - I want to reply to a ticket and know the number but I do not have a ticket thread handy. So I just throw the ticket number into a new subject line and type my note.Currently, in v1.9.7 - the fall back to subject line method does not account for the fact that it might be coming from a staff member - and so it will create a new ticket. It only checks if the sender is a user or a collaborator (which a staff member could be neither).Posting original code for subject line below for reference - it seems to me this is a bug because when the message ID is include, it does check if the sender is a staff member. // Search for ticket by the in the subject line // This is the last resort - emails must match to avoid message // injection by third-party. $subject = $mailinfo; $match = array(); if ($subject && $mailinfo`) in ) && preg_match("/#((\p{P}*+)+)/u", $subject, $match) //Lookup by ticket number && ($ticket = Ticket:($match)) //Lookup the user using the email address && ($user = User:(array('emails__address' => $mailinfo)))) { //We have a valid ticket and user if ($ticket->getUserId() == $user->getId() //owner || ($c = Collaborator:( // check if collaborator array('userId' => $user->getId(), 'ticketId' => $ticket->getId())))) { $mailinfo = $user->getId(); return $ticket->getLastMessage(); } } // Search for the message-id token in the body if (preg_match('`(?-mid="|Ref-Mid: )(*)(?:$|")`', $mailinfo, $match)) if ($thread = ThreadEntry:($match, $mailinfo)) return $thread; return null; }Any ideas?