Skip to content

Commit

Permalink
Fix detection
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-farre committed Nov 6, 2024
1 parent 72153e2 commit 773f352
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions helpers/MobileAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,10 @@ private static function sendFlutterMessage($msg)
Yii::$app->view->registerJs('if (window.flutterChannel) { window.flutterChannel.postMessage(\'' . $msg . '\'); }');
}

public static function isIosApp()
public static function isIosApp(): bool
{
return
static::isAppRequest()
&& Yii::$app->request->headers->has('x-humhub-app-is-ios')
&& !str_contains(
Yii::$app->request->headers->get('x-humhub-app-is-ios', '', true),
'1',
);
&& Yii::$app->request->headers->get('x-humhub-app-is-ios');
}

}

0 comments on commit 773f352

Please sign in to comment.