feat(webui): configure login history backfill
Expose the per-account login history backfill switch in General settings and keep missing or legacy configuration disabled by default. Document that changes apply on the next login, historical messages are stored locally without event replay or read-state changes, and fixed safety limits govern roster scanning, selected sessions, page size, request spacing, and retries. Add WebUI normalization coverage so the optional setting survives save and restore without silently inheriting an enabled value. Refs #280.
This commit is contained in:
5 files changed
+51
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { normalizeOneBotConfig } from '../src/lib/onebot-config';
|
||||
|
||||
describe('normalizeOneBotConfig history sync', () => {
|
||||
it('defaults older payloads to disabled', () => {
|
||||
expect(normalizeOneBotConfig({}).historySync).toEqual({ enabled: false });
|
||||
});
|
||||
|
||||
it('preserves an explicit per-account opt-in', () => {
|
||||
expect(normalizeOneBotConfig({
|
||||
historySync: { enabled: true },
|
||||
}).historySync).toEqual({ enabled: true });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user