wx2tg-puppet 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,12 +12,12 @@ export declare let AppDataSource: DataSource;
|
|
|
12
12
|
export interface WxBotOptions {
|
|
13
13
|
baseUrl: string;
|
|
14
14
|
databasePath: string;
|
|
15
|
-
deviceType: 'ipad' | 'car' | 'mac' | 'pad' | 'win' | string;
|
|
15
|
+
deviceType: 'ipad' | 'car' | 'mac' | 'pad' | 'win' | 'ipadX' | string;
|
|
16
16
|
}
|
|
17
17
|
export declare class WxBot extends EventEmitter {
|
|
18
18
|
baseUrl: string;
|
|
19
19
|
databasePath: string;
|
|
20
|
-
deviceType: 'ipad' | 'car' | 'mac' | 'pad' | 'win' | string;
|
|
20
|
+
deviceType: 'ipad' | 'car' | 'mac' | 'pad' | 'win' | 'ipadX' | string;
|
|
21
21
|
private uuid;
|
|
22
22
|
private interval;
|
|
23
23
|
private heartbeatInterval;
|
package/dist/index.js
CHANGED
|
@@ -128,6 +128,18 @@ class WxBot extends events_1.EventEmitter {
|
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
break;
|
|
131
|
+
case 'ipadX':
|
|
132
|
+
response = yield LoginApi_1.loginApi.LoginGetQRx({
|
|
133
|
+
"DeviceID": (config === null || config === void 0 ? void 0 : config.deviceId) || "",
|
|
134
|
+
"DeviceName": (config === null || config === void 0 ? void 0 : config.DeviceName) || "",
|
|
135
|
+
"OSModel": "",
|
|
136
|
+
"Proxy": {
|
|
137
|
+
"ProxyIp": "",
|
|
138
|
+
"ProxyPassword": "",
|
|
139
|
+
"ProxyUser": ""
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
break;
|
|
131
143
|
case 'ipad':
|
|
132
144
|
default:
|
|
133
145
|
response = yield LoginApi_1.loginApi.LoginGetQR({
|
|
@@ -407,8 +419,8 @@ class WxBot extends events_1.EventEmitter {
|
|
|
407
419
|
this.clearAllIntervals(); // 确保清理所有定时器
|
|
408
420
|
const config = yield config_service_1.configService.get();
|
|
409
421
|
if (config && config.wxid) {
|
|
410
|
-
const resp = yield
|
|
411
|
-
if (resp.data.
|
|
422
|
+
const resp = yield MsgApi_1.msgApi.Sync(config.wxid);
|
|
423
|
+
if (resp.data.Code === 0) {
|
|
412
424
|
yield this.loginSuccess(config.wxid);
|
|
413
425
|
}
|
|
414
426
|
else {
|