Skip to content

Commit

Permalink
fix: pollId equals 0
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Mahjoubi <[email protected]>
  • Loading branch information
hamza221 committed Aug 21, 2024
1 parent ecbf73f commit 1383ced
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Service/WatchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ public function __construct(
* Watch poll for updates
*/
public function watchUpdates(int $pollId, ?int $offset = null): array {
$this->pollMapper->find($pollId)->request(Poll::PERMISSION_POLL_VIEW);

if($pollId !== 0) {
$this->pollMapper->find($pollId)->request(Poll::PERMISSION_POLL_VIEW);
}

$start = time();
$timeout = 30;
$offset = $offset ?? $start;
Expand Down

0 comments on commit 1383ced

Please sign in to comment.