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

thread: email: Fix incorrect collaborator lookup

parent f9e9da44
Branches
Tags
No related merge requests found
......@@ -385,12 +385,9 @@ class Thread extends VerySimpleModel {
// Consider collaborator role (disambiguate staff members as
// collaborators). Normally, the block above should match based
// on the Referenced message-id header
elseif ($object instanceof Ticket
&& ($E = UserEmail::lookup($mailinfo['email']))
&& ($C = Collaborator::lookup(array(
'ticketId' => $object->getId(), 'userId' => $E->user_id
)))
) {
elseif ($C = $this->collaborators->filter(array(
'user__emails__address' => $mailinfo['email']
))->first()) {
$vars['thread-type'] = 'M';
// XXX: There's no way that mailinfo[userId] would be set
$vars['userId'] = $mailinfo['userId'] ?: $C->getUserId();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment