diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c3af1e0e..a23cc0b62f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,14 @@ # Changelog All notable changes to this project will be documented in this file. -## [Unreleased] +## [8.1.4] - 2025-07-15 ### Fixes - Fixed some typos - Removed inaccessible polls from polls overview - Removed link target from inaccessible polls in navigation - Removed clone action from inaccessible polls in navigation - Fixed visual bug when scrolling in list view + - Fixed exception on notifications which may cause resending notification mails ### changes - Center poll table diff --git a/lib/Db/LogMapper.php b/lib/Db/LogMapper.php index f77d06fb7e..4adf6c2b94 100644 --- a/lib/Db/LogMapper.php +++ b/lib/Db/LogMapper.php @@ -9,6 +9,7 @@ namespace OCA\Polls\Db; use OCP\AppFramework\Db\QBMapper; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; /** @@ -31,7 +32,8 @@ public function findUnprocessed(): array { $qb->select('*') ->from($this->getTableName()) - ->where($qb->expr()->isNotNull('poll_id')); + ->where($qb->expr()->isNotNull('poll_id')) + ->andWhere($qb->expr()->eq('processed', $qb->expr()->literal(0, IQueryBuilder::PARAM_INT))); return $this->findEntities($qb); } diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php index 248f95060a..4f50e8535c 100644 --- a/lib/Service/MailService.php +++ b/lib/Service/MailService.php @@ -172,8 +172,9 @@ public function sendNotifications(): void { } foreach ($this->logs as $logItem) { - $logItem->setProcessed(time()); + $logItem->setProcessed(intval(microtime(true) * 1000)); $this->logMapper->update($logItem); + usleep(5000); } }