diff options
Diffstat (limited to 'lib/Manager.php')
-rw-r--r-- | lib/Manager.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Manager.php b/lib/Manager.php index fbe6a35ca..51b4e036c 100644 --- a/lib/Manager.php +++ b/lib/Manager.php @@ -302,7 +302,8 @@ class Manager { $query->expr()->eq('a.actor_id', $query->createNamedParameter($userId)), $query->expr()->eq('a.actor_type', $query->createNamedParameter('users')), $query->expr()->eq('a.room_id', 'r.id') - )); + )) + ->where($query->expr()->isNotNull('a.id')); if ($includeLastMessage) { $this->loadLastMessageInfo($query); @@ -345,12 +346,13 @@ class Manager { if ($userId !== null) { // Non guest user $query->addSelect('a.*') - ->selectAlias('a.id', 'a_id'); - $query->leftJoin('r', 'talk_attendees', 'a', $query->expr()->andX( + ->selectAlias('a.id', 'a_id') + ->leftJoin('r', 'talk_attendees', 'a', $query->expr()->andX( $query->expr()->eq('a.actor_id', $query->createNamedParameter($userId)), $query->expr()->eq('a.actor_type', $query->createNamedParameter('users')), $query->expr()->eq('a.room_id', 'r.id') - )); + )) + ->andWhere($query->expr()->isNotNull('a.id')); } $result = $query->execute(); |