fix: 手表协议没法收验证码,所以取消这个入口

This commit is contained in:
凌莞 2022-02-22 14:22:21 +08:00
parent bf34bb6171
commit aead8a6e16
No known key found for this signature in database
GPG Key ID: 05F8479BA63A8E92
1 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,7 @@ import { Api } from 'telegram';
import { getLogger } from 'log4js';
import { Button } from 'telegram/tl/custom/button';
import setupHelper from '../helpers/setupHelper';
import { Client as OicqClient } from 'oicq';
import { Client as OicqClient, Platform } from 'oicq';
import commands from '../constants/commands';
export default class SetupController {
@ -80,10 +80,11 @@ export default class SetupController {
]);
const platform = setupHelper.convertTextToPlatform(platformText);
let password = '';
const isPasswordLogin = await this.setupService.waitForOwnerInput('用密码登录吗?', [
[Button.text('密码登录', true, true)],
[Button.text('二维码登录', true, true)],
]);
const isPasswordLogin = platform === Platform.Watch ? '' :
await this.setupService.waitForOwnerInput('用密码登录吗?', [
[Button.text('密码登录', true, true)],
[Button.text('二维码登录', true, true)],
]);
if (isPasswordLogin === '密码登录') {
password = await this.setupService.waitForOwnerInput('请输入密码');
}