refactor: replace polling with event-driven updates
Trigger account detection and group requests from observed changes. Remove native stage log forwarding and its lifecycle state, and simplify the README.
This commit is contained in:
1 parent
1b74747251
commit
e5cfec01bd
33 files changed
+1314
-1958
No files matched your search
@@ -62,7 +62,6 @@ describe('OneBotManager bot_status', () => {
|
||||
dispose: vi.fn(async () => ({ closed: true, errors: [] })),
|
||||
emitBotStatus,
|
||||
waitUntilNetworkReady: vi.fn(() => networkReady),
|
||||
startGroupRequestPolling: vi.fn(),
|
||||
startLoginHistorySync: vi.fn(),
|
||||
getConnectionStatuses: () => [],
|
||||
} as unknown as OneBotInstance;
|
||||
@@ -80,7 +79,6 @@ describe('OneBotManager bot_status', () => {
|
||||
expect(emitBotStatus).toHaveBeenCalledOnce();
|
||||
});
|
||||
expect(emitBotStatus).toHaveBeenCalledWith('online');
|
||||
expect(instance.startGroupRequestPolling).toHaveBeenCalledOnce();
|
||||
} finally {
|
||||
await manager.dispose();
|
||||
}
|
||||
@@ -110,7 +108,6 @@ describe('OneBotManager bot_status', () => {
|
||||
quiesce: vi.fn(),
|
||||
dispose,
|
||||
emitBotStatus,
|
||||
startGroupRequestPolling: vi.fn(),
|
||||
getConnectionStatuses: () => [],
|
||||
} as unknown as OneBotInstance;
|
||||
const manager = new OneBotManager();
|
||||
@@ -142,7 +139,6 @@ describe('OneBotManager bot_status', () => {
|
||||
quiesce: vi.fn(),
|
||||
dispose,
|
||||
emitBotStatus,
|
||||
startGroupRequestPolling: vi.fn(),
|
||||
getConnectionStatuses: () => [],
|
||||
} as unknown as OneBotInstance;
|
||||
const manager = new OneBotManager();
|
||||
|
||||
Reference in new issue
Block a user