|
|
@@ -21,15 +21,18 @@ class SecretService
|
|
|
*/
|
|
|
public static function init(Api $telegram, $data, $chatId, $firstName, $messageId): void
|
|
|
{
|
|
|
+ //秘钥管理首页
|
|
|
if ($data === "secret@@index") {
|
|
|
$res = SecretService::index($chatId, $messageId);
|
|
|
$telegram->editMessageText($res);
|
|
|
}
|
|
|
|
|
|
+ //查看秘钥
|
|
|
if ($data === "secret@@view") {
|
|
|
$res = SecretService::view($chatId, $messageId);
|
|
|
$telegram->editMessageText($res);
|
|
|
}
|
|
|
+
|
|
|
//找回账号
|
|
|
if ($data === "secret@@retrieve") {
|
|
|
$res = SecretService::retrieve($chatId, $messageId);
|
|
|
@@ -46,9 +49,9 @@ class SecretService
|
|
|
public static function onMessage($chatId, $text, $messageId, $stepStatus): null|array
|
|
|
{
|
|
|
switch ($stepStatus) {
|
|
|
- case StepStatus::MY_INPUT_OLD_SECRET:
|
|
|
+ case StepStatus::MY_INPUT_OLD_SECRET://输入原账户的秘钥
|
|
|
return SecretService::inputOldSecret($chatId, $text, $messageId);
|
|
|
- case StepStatus::MY_INPUT_SECRET_PASS:
|
|
|
+ case StepStatus::MY_INPUT_SECRET_PASS://输入查看秘钥的密码
|
|
|
return SecretService::showSecretKey($chatId, $text, $messageId);
|
|
|
default:
|
|
|
return null;
|