diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index 110229c..a78a223 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -32,7 +32,7 @@ public function healthcheck(): array foreach ($sessions as $sessionKey => $session) { $instance = $this->client->instances[$sessionKey]; if ($instance->getAuthorization() === API::LOGGED_IN) { - $results[$sessionKey] = $instance->fullGetSelf(); + $results[$sessionKey] = $instance->getSelf(); } } return $results; diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index 08f0729..0fefa9c 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -24,7 +24,7 @@ public function __construct() $this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []); $this->passwords = Config::getInstance()->get('api.passwords', []); if (!$this->ipWhitelist && !$this->passwords) { - throw new \InvalidArgumentException('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker'); + warning('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker'); } }