From 63c6ea2e6282ba278931ff297e061372b7f74114 Mon Sep 17 00:00:00 2001 From: mercury Date: Wed, 28 Jun 2023 11:50:30 +0400 Subject: [PATCH] improve xray menu --- app/bot.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/app/bot.php b/app/bot.php index 128edc6..c36aec8 100644 --- a/app/bot.php +++ b/app/bot.php @@ -2603,7 +2603,9 @@ DNS-over-HTTPS with IP: $text[] = "shortId: {$c['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0]}"; $text[] = "pubkey: {$pac['xray']}"; $text[] = "fake domain: {$c['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0]}"; - $text[] = "\n{$this->linkXray()}"; + if ($c['inbounds'][0]['settings']['clients'][0]['id']) { + $text[] = "\n{$this->linkXray()}"; + } $text[] = "\nstatus: $st"; $data[] = [ @@ -2618,12 +2620,14 @@ DNS-over-HTTPS with IP: 'callback_data' => "/changeFakeDomain", ], ]; - $data[] = [ - [ - 'text' => $this->i18n('show QR'), - 'callback_data' => "/qrXray", - ], - ]; + if ($c['inbounds'][0]['settings']['clients'][0]['id']) { + $data[] = [ + [ + 'text' => $this->i18n('show QR'), + 'callback_data' => "/qrXray", + ], + ]; + } $data[] = [ [ 'text' => $this->i18n('back'),