feat(onebot): fetch real private (c2c) history from server (#99)
Mirror the group-history fetch for private chats via SsoGetC2cMsg (trpc.msg.register_proxy.RegisterProxy.SsoGetC2cMsg, fields per Lagrange: flat friendUid/start/end request, messages@7 response). get_friend_msg_history now resolves the anchor sequence + the friend's UID, fetches real history from the server, converts + persists each message, and falls back to the local store on unknown anchor / no uid / empty / error. - protocol: fetchC2cMessageRange (decodes via the friend decoder). - core: the group + c2c fetch now share a generic walkBackHistory loop (same throttle gate + caps); added MessageApi.getC2cHistory. - onebot: getFriendHistory + a generalized persistHistoryEvent (keys private by sender uin, exactly like the live path — so reply to old private messages resolves too). Tests: SsoGetC2cMsg request/response round-trip + friend-decode reuse.
This commit is contained in:
9 files changed
+288
-41
No files matched your search
@@ -26,6 +26,7 @@ export type * from './element.js';
|
||||
export type * from './longmsg.js';
|
||||
export type * from './message.js';
|
||||
export type * from './get-group-msg.js';
|
||||
export type * from './get-c2c-msg.js';
|
||||
export type * from './notify.js';
|
||||
export type * from './oidb.js';
|
||||
export type * from './oidb-action.js';
|
||||
|
||||
Reference in new issue
Block a user