diff --git a/lib/Push.php b/lib/Push.php index 8e2a985e0..0928c2d23 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -1138,6 +1138,10 @@ protected function getWebPushDevicesForUsers(array $userIds): array { ->from('notifications_webpush') ->where($query->expr()->in('uid', $query->createNamedParameter($userIds, IQueryBuilder::PARAM_STR_ARRAY))); + if (!$this->appConfig->getAppValueBool('webpush_browsers_enabled')) { + $query->andWhere($query->expr()->gte('token', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT))); + } + $devices = []; $result = $query->executeQuery(); while ($row = $result->fetch()) {