update icqq to 0.4.12

This commit is contained in:
ccmuyuu 2023-07-30 01:48:06 +08:00
parent 154060adfb
commit 125907e2c9
8 changed files with 27 additions and 12 deletions

View File

@ -35,7 +35,7 @@
"eviltransform": "^0.2.2",
"file-type": "^17.1.4",
"fluent-ffmpeg": "^2.1.2",
"icqq": "^0.4.11",
"icqq": "^0.4.12",
"lodash": "^4.17.21",
"log4js": "^6.6.1",
"nodejs-base64": "^2.0.0",

View File

@ -54,6 +54,7 @@ model QqBot {
platform Int @default(0)
Instance Instance[]
signApi String?
signVer String?
}
model Message {

View File

@ -31,6 +31,7 @@ interface CreateOicqParams {
password: string;
platform: Platform;
signApi?: string;
signVer?: string;
// 当需要验证手机时调用此方法,应该返回收到的手机验证码
onVerifyDevice: (phone: string) => Promise<string>;
// 当滑块时调用此方法,返回 ticker也可以返回假值改用扫码登录
@ -124,6 +125,7 @@ export default class OicqClient extends Client {
ffmpeg_path: process.env.FFMPEG_PATH,
ffprobe_path: process.env.FFPROBE_PATH,
sign_api_addr: params.signApi,
ver: params.signVer,
});
client.on('system.login.device', loginDeviceHandler);
client.on('system.login.slider', loginSliderHandler);

View File

@ -88,11 +88,22 @@ export default class SetupController {
let signApi = await this.setupService.waitForOwnerInput('请输入签名服务器地址', [
[Button.text('不需要签名服务器', true, true)],
]);
signApi = setupHelper.checkSignApiAddress(signApi)
signApi = setupHelper.checkSignApiAddress(signApi);
let signVer = ""
if (signApi !== "") {
signVer = await this.setupService.waitForOwnerInput('请输入签名服务器版本,当前支持安卓(8.9.63、8.9.68、8.9.70)、Tim(3.5.1、3.5.2)', [
[Button.text('8.9.63', true, true)],
[Button.text('8.9.68', true, true)],
[Button.text('8.9.70', true, true)],
[Button.text('3.5.1', true, true)],
[Button.text('3.5.2', true, true)],
]);
};
let password = await this.setupService.waitForOwnerInput('请输入密码', undefined, true);
password = md5Hex(password);
this.oicq = await this.setupService.createOicq(uin, password, platform, signApi);
this.oicq = await this.setupService.createOicq(uin, password, platform, signApi, signVer);
this.instance.qqBotId = this.oicq.id;
await this.setupService.informOwner(`登录成功`);
}

View File

@ -122,6 +122,7 @@ export default class Instance {
password: this.qq.password,
platform: this.qq.platform,
signApi: this.qq.signApi,
signVer: this._qq.signVer,
onQrCode: async (file) => {
await this.ownerChat.sendMessage({
message: '请使用已登录这个账号的手机 QQ 扫描这个二维码授权',

View File

@ -83,11 +83,11 @@ export default class SetupService {
});
}
public async createOicq(uin: number, password: string, platform: Platform, signApi: string) {
const dbQQBot = await db.qqBot.create({ data: { uin, password, platform, signApi } });
public async createOicq(uin: number, password: string, platform: Platform, signApi: string, signVer: string) {
const dbQQBot = await db.qqBot.create({ data: { uin, password, platform, signApi, signVer } });
return await OicqClient.create({
id: dbQQBot.id,
uin, password, platform, signApi,
uin, password, platform, signApi, signVer,
onQrCode: async (file) => {
await this.owner.sendMessage({
message: '请使用已登录这个账号的手机 QQ 扫描这个二维码授权',

View File

@ -672,7 +672,7 @@ cacheEntries = {
"process@npm:0.11.10" = { filename = "process-npm-0.11.10-aeb3b641ae-bfcce49814.zip"; sha512 = "bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3"; };
"min-document@npm:2.19.0" = { filename = "min-document-npm-2.19.0-458cdb3d84-da6437562e.zip"; sha512 = "da6437562ea2228041542a2384528e74e22d1daa1a4ec439c165abf0b9d8a63e17e3b8a6dc6e0c731845e85301198730426932a0e813d23f932ca668340c9623"; };
"dom-walk@npm:0.1.2" = { filename = "dom-walk-npm-0.1.2-7d20a1a8d8-19eb0ce9c6.zip"; sha512 = "19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3"; };
"icqq@npm:0.4.11" = { filename = "icqq-npm-0.4.11-b7fde00e2f-e18d3d5c16.zip"; sha512 = "e18d3d5c16e2caf0e4b46db5fe84ce2a9a2e50d98347e07cff69cb873a8144c46f9cc57da211c6c187c1e4fd1f81dfd8c28fb8f354b4695e362e04c5d3d2c647"; };
"icqq@npm:0.4.12" = { filename = "icqq-npm-0.4.12-58bff8373e-77ce564764.zip"; sha512 = "77ce5647645872ada9512910b0911439db67e8d3c8a8a63ee908e71fbba1bfbedec95063c79c98aa00f34991c1bd725665d6e9ebf3feef3985958246201268b5"; };
"long@npm:4.0.0" = { filename = "long-npm-4.0.0-ecd96a31ed-16afbe8f74.zip"; sha512 = "16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744"; };
"pngjs@npm:6.0.0" = { filename = "pngjs-npm-6.0.0-31d8d85681-ab6c285086.zip"; sha512 = "ab6c285086060087097eab9fe6b5a528a24f9e79c03dea2b4fd6264ed4fdb5beff4a3257eeeaf2a9dc18249b539609c2a4e4013c567164a1f6b5ba2c974d5ecb"; };
"triptrap@npm:0.0.17" = { filename = "triptrap-npm-0.0.17-bc0f4adce1-46cb1e4ed8.zip"; sha512 = "46cb1e4ed85f8d6c2e42993e1a0c47f7d84f97101ea64a01e24882c1c65219620ae938f9b597d8ca9f8d96ddc6bf19e03849dbff131569e4eabb67ed1560e458"; };

View File

@ -2348,9 +2348,9 @@ __metadata:
languageName: node
linkType: hard
"icqq@npm:^0.4.11":
version: 0.4.11
resolution: "icqq@npm:0.4.11"
"icqq@npm:^0.4.12":
version: 0.4.12
resolution: "icqq@npm:0.4.12"
dependencies:
axios: ^1.1.2
log4js: ^6.3.0
@ -2358,7 +2358,7 @@ __metadata:
pngjs: ^6.0.0
probe-image-size: ^7.2.2
triptrap: ^0.0.17
checksum: e18d3d5c16e2caf0e4b46db5fe84ce2a9a2e50d98347e07cff69cb873a8144c46f9cc57da211c6c187c1e4fd1f81dfd8c28fb8f354b4695e362e04c5d3d2c647
checksum: 77ce5647645872ada9512910b0911439db67e8d3c8a8a63ee908e71fbba1bfbedec95063c79c98aa00f34991c1bd725665d6e9ebf3feef3985958246201268b5
languageName: node
linkType: hard
@ -3695,7 +3695,7 @@ __metadata:
eviltransform: ^0.2.2
file-type: ^17.1.4
fluent-ffmpeg: ^2.1.2
icqq: ^0.4.11
icqq: ^0.4.12
lodash: ^4.17.21
log4js: ^6.6.1
nodejs-base64: ^2.0.0