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:
DrSmoothl committed 2026-07-25 23:44:54 +08:00
1 parent dc2ec1235a
commit b5e10fefc2
5 files changed
+51

No files matched your search

+8
View File
@@ -63,6 +63,14 @@ export function normalizeOneBotConfig(raw: unknown): OneBotConfig {
wsClients: list(nets.wsClients) as unknown as OneBotConfig['networks']['wsClients'],
},
statusCommand: normalizeStatusCommand(cfg.statusCommand),
historySync: {
enabled: (
typeof cfg.historySync === 'object'
&& cfg.historySync !== null
&& !Array.isArray(cfg.historySync)
&& (cfg.historySync as Record<string, unknown>).enabled === true
),
},
notifications: normalizeNotifications(cfg.notifications),
};
}