fix(onebot): preserve historical media independently of cache limits

Preserve message history and the media information needed for reliable
forwarding. Retain available older data during upgrades and report storage
failures explicitly.

Fixes #462
This commit is contained in:
DrSmoothl committed 2026-10-04 14:00:30 +08:00
1 parent d86e0fc7b5
commit 99bcfca15c
17 files changed
+659 -230

No files matched your search

+1 -1
View File
@@ -132,7 +132,7 @@ export class OneBotInstance {
: moduleLog;
this.rkeyCache = new RKeyCache(globalSettings.rkey);
this.mediaStore = new MediaStore(path.join('data', this.uin, 'media.db'));
this.mediaStore = new MediaStore(path.join('data', this.uin, 'messages.db'));
this.messageStore = new MessageStore(path.join('data', this.uin, 'messages.json'));
this.reactionStore = new ReactionStore(path.join('data', this.uin, 'reactions.db'));
const mediaUrlResolver = new MediaUrlResolver(this.bridge, this.rkeyCache);