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 <hamzamahjoubi221@gmail.com>
  • Loading branch information
hamza221 committed Aug 16, 2024
1 parent ecbf73f commit 6610d80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Service/WatchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function __construct(
* Watch poll for updates
*/
public function watchUpdates(int $pollId, ?int $offset = null): array {

if($pollId === 0) {
return [];
}

$this->pollMapper->find($pollId)->request(Poll::PERMISSION_POLL_VIEW);

$start = time();
Expand Down

0 comments on commit 6610d80

Please sign in to comment.