From ae330b454c83d9a569dca3aba149bf2f1d12469f Mon Sep 17 00:00:00 2001 From: GeekQu Date: Sat, 18 Jan 2020 06:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E6=88=B7=E8=A7=A3=E7=BB=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utils/Telegram/Callbacks/UserCallback.php | 3 ++- app/Utils/Telegram/Commands/UnbindCommand.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Utils/Telegram/Callbacks/UserCallback.php b/app/Utils/Telegram/Callbacks/UserCallback.php index 2e2371bf..f5d81678 100644 --- a/app/Utils/Telegram/Callbacks/UserCallback.php +++ b/app/Utils/Telegram/Callbacks/UserCallback.php @@ -650,9 +650,10 @@ class UserCallback // Telegram 账户解绑 $Data['AllowEditMessage'] = false; $sendMessage = [ - 'text' => '发送 /unbind 账户邮箱 进行解绑.', + 'text' => \App\Utils\Telegram\Commands\UnbindCommand::sendtext(), 'disable_web_page_preview' => false, 'reply_to_message_id' => null, + 'parse_mode' => 'Markdown', 'reply_markup' => null ]; break; diff --git a/app/Utils/Telegram/Commands/UnbindCommand.php b/app/Utils/Telegram/Commands/UnbindCommand.php index 241e2d58..940d6e57 100644 --- a/app/Utils/Telegram/Commands/UnbindCommand.php +++ b/app/Utils/Telegram/Commands/UnbindCommand.php @@ -78,7 +78,7 @@ class UnbindCommand extends Command return; } - $text = '发送 **/unbind 账户邮箱** 进行解绑.'; + $text = self::sendtext(); if ($MessageText != '') { $text = '键入的 Email 地址与您的账户不匹配.'; } @@ -92,4 +92,13 @@ class UnbindCommand extends Command ); } } + + public function sendtext() + { + $text = '发送 **/unbind 账户邮箱** 进行解绑.'; + if (Config::get('unbind_kick_member') === true) { + $text .= PHP_EOL . PHP_EOL . '根据管理员的设定,您解绑账户将会被自动移出用户群.'; + } + return $text; + } }