From 7ee47db8e2a08d94ed44d0831c3ac0c3b6dc98a3 Mon Sep 17 00:00:00 2001 From: mercury Date: Wed, 6 Mar 2024 11:52:09 +0400 Subject: [PATCH] fix short link type --- app/bot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/bot.php b/app/bot.php index 31dbbb1..c304966 100644 --- a/app/bot.php +++ b/app/bot.php @@ -2232,7 +2232,7 @@ DNS-over-HTTPS with IP: if (!empty($v['# PublicKey'])) { $conf['peers'][$k]['online'] = 'off'; } else { - $conf['peers'][$k]['status'] = $this->getStatusPeer($v['PublicKey'], $status['peers']); + $conf['peers'][$k]['status'] = $status ? $this->getStatusPeer($v['PublicKey'], $status['peers']) : 'error'; $conf['peers'][$k]['online'] = preg_match('~^(\d+ seconds|[12] minute)~', $conf['peers'][$k]['status']['latest handshake']) ? 'online' : ''; } } @@ -2587,7 +2587,7 @@ DNS-over-HTTPS with IP: if ($clients) { $name = $this->getName($clients[$client]['interface']); $conf = $this->createConfig($clients[$client]); - if ($this->getInstanceWG(1)) { + if ($this->getWGType() == 'awg') { $sl = $this->getAmneziaShortLink($clients[$client]); } return [