wx2tg-puppet 2.0.2 → 2.0.4
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.js
CHANGED
|
@@ -383,7 +383,7 @@ class WxBot extends events_1.EventEmitter {
|
|
|
383
383
|
if (config) {
|
|
384
384
|
const res = yield LoginApi_1.loginApi.LogOut(config.wxid);
|
|
385
385
|
}
|
|
386
|
-
config_service_1.configService.
|
|
386
|
+
config_service_1.configService.clear();
|
|
387
387
|
room_service_1.roomService.clear();
|
|
388
388
|
contact_service_1.contactService.clear();
|
|
389
389
|
message_service_1.messageService.clear();
|
|
@@ -407,8 +407,8 @@ class WxBot extends events_1.EventEmitter {
|
|
|
407
407
|
this.clearAllIntervals(); // 确保清理所有定时器
|
|
408
408
|
const config = yield config_service_1.configService.get();
|
|
409
409
|
if (config && config.wxid) {
|
|
410
|
-
const resp = yield
|
|
411
|
-
if (resp.data.
|
|
410
|
+
const resp = yield MsgApi_1.msgApi.Sync(config.wxid);
|
|
411
|
+
if (resp.data.Code === 0) {
|
|
412
412
|
yield this.loginSuccess(config.wxid);
|
|
413
413
|
}
|
|
414
414
|
else {
|
|
@@ -34,12 +34,9 @@ class ConfigService {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
clear() {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
|
|
40
|
-
if (config) {
|
|
41
|
-
yield this.repo.delete(config);
|
|
42
|
-
}
|
|
39
|
+
yield this.repo.clear();
|
|
43
40
|
});
|
|
44
41
|
}
|
|
45
42
|
}
|