Ken 2 viikkoa sitten
vanhempi
commit
580706e31f
1 muutettua tiedostoa jossa 12 lisäystä ja 4 poistoa
  1. 12 4
      app/Services/SecretService.php

+ 12 - 4
app/Services/SecretService.php

@@ -66,15 +66,23 @@ class SecretService
         }
 
 
-        if ($user->secret_pass === $password) {
-            $text = "秘钥:{$user->secret_key}\n\n";
-            $text .= "请保管好你的秘钥";
+        if ($user->secret_pass !== $password) {
+            $text = "密码错误";
             return [
                 'chat_id' => $chatId,
                 'text' => $text,
+                'reply_to_message_id' => $messageId
             ];
         }
-        return [];
+
+        $text = "秘钥:{$user->secret_key}\n\n";
+        $text .= "请保管好你的秘钥";
+        return [
+            'chat_id' => $chatId,
+            'text' => $text,
+        ];
+
+
     }
 
     private static function view($chatId, $messageId): array