If there are no sessions, we don't need to run a query

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-09-21 17:31:11 +02:00
Родитель 44945778ba
Коммит 5c9e293f1a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -142,6 +142,10 @@ class GuestManager {
* @return string[]
*/
public function getNamesBySessionHashes(array $sessionHashes): array {
if (empty($sessionHashes)) {
return [];
}
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('talk_guests')