Skip to content

Commit

Permalink
Release Beta 5
Browse files Browse the repository at this point in the history
  • Loading branch information
luke- committed Jul 14, 2023
1 parent 253e060 commit f82d321
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public static function onManifestControllerInit($event)
$controller->manifest['gcm_sender_id'] = (string)103953800507;
}

public static function onServiceWorkerControllerInit($event)
public static function onServiceWorkerControllerInit($event): void
{
/** @var ServiceWorkerController $controller */
$controller = $event->sender;

/** @var Module $module */
$module = Yii::$app->getModule('fcm-push');

if (!$module->getDriverService()->hasConfiguredDriver()) {
if (!$module->getDriverService()->hasConfiguredWebDriver()) {
return;
}

Expand Down Expand Up @@ -105,7 +105,7 @@ public static function onLayoutAddonInit($event)
/** @var Module $module */
$module = Yii::$app->getModule('fcm-push');

if (!$module->getDriverService()->hasConfiguredDriver()) {
if (!$module->getDriverService()->hasConfiguredWebDriver()) {
return;
}

Expand Down
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2.0.0-beta.5 (July 14, 2023)
----------------------------

- Fix: Error when no Web Driver is configured.



2.0.0-beta.4 (July 13, 2023)
----------------------------

Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"humhub": {
"minVersion": "1.13"
},
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"screenshots": []
}
4 changes: 4 additions & 0 deletions services/DriverService.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public function getMobileAppDriver(): ?DriverInterface
return $this->getConfiguredDriverByType(Proxy::class);
}

public function hasConfiguredWebDriver(): bool
{
return ($this->getWebDriver() !== null);
}

public function hasConfiguredDriver(): bool
{
Expand Down

0 comments on commit f82d321

Please sign in to comment.