feat(onebot): expose bidirectional message history
Add reverse_order to group and private history actions, preserve latest-page behavior without an anchor, and keep local fallback results chronologically ordered. Key self-sent private messages and reply targets by the conversation peer, reject cross-conversation anchors, and include request context when a server fetch falls back to local history. Refs #229
This commit is contained in:
17 files changed
+468
-70
No files matched your search
@@ -82,8 +82,10 @@ export function buildApiContext(ref: OneBotInstanceContext): ApiActionContext {
|
||||
getStrangerInfo: (userId) => getStrangerInfo(bridge, userId),
|
||||
getGroupFiles: (groupId, folderId) => getGroupFiles(bridge, groupId, folderId),
|
||||
handleGroupRequest: (flag, _subType, approve, reason) => handleGroupAddRequest(bridge, flag, approve, reason),
|
||||
getGroupMsgHistory: (groupId, messageId, count) => getGroupHistory(ref, groupId, messageId, count),
|
||||
getFriendMsgHistory: (userId, messageId, count) => getFriendHistory(ref, userId, messageId, count),
|
||||
getGroupMsgHistory: (groupId, messageId, count, reverseOrder) =>
|
||||
getGroupHistory(ref, groupId, messageId, count, reverseOrder),
|
||||
getFriendMsgHistory: (userId, messageId, count, reverseOrder) =>
|
||||
getFriendHistory(ref, userId, messageId, count, reverseOrder),
|
||||
handleGetGroupSystemMsg: (query) => getGroupSystemMessages(bridge, query),
|
||||
getDownloadRKeys: () => getDownloadRKeys(bridge),
|
||||
sendGroupForwardMsg: (groupId, messages, meta) => sendGroupForwardMessage(ref, groupId, messages, meta),
|
||||
|
||||
Reference in new issue
Block a user