From 796fa57330b9e1f8274095ed65bce4f5970eb922 Mon Sep 17 00:00:00 2001 From: mercury Date: Thu, 7 Mar 2024 19:00:33 +0400 Subject: [PATCH] improve status wg error --- app/bot.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/bot.php b/app/bot.php index f697fdb..32eb4d1 100644 --- a/app/bot.php +++ b/app/bot.php @@ -2181,6 +2181,17 @@ DNS-over-HTTPS with IP: $c = $this->getPacConf(); $conf = $this->readConfig(); $status = $this->readStatus(); + if (empty($status)) { + return [ + 'text' => "Menu -> " . $this->getTitleWG() . "\n\nerror status", + 'data' => [[ + [ + 'text' => $this->i18n('back'), + 'callback_data' => "/menu", + ], + ]], + ]; + } $clients = $this->getClients($page); $bt = $c[$this->getInstanceWG(1) . 'blocktorrent']; $ex = $c[$this->getInstanceWG(1) . 'exchange'];