feat(onebot): implement mark all as read

Replace the compatibility no-op with a real batched read action for current groups and observed incoming private conversations.

Exclude stale groups, group temporary sessions, and sent-message echoes from private targets, then expose the functional action through the generated MCP catalog.

Add action and message-store regressions for target selection and delegation.
This commit is contained in:
DrSmoothl committed 2026-07-13 23:02:08 +08:00
1 parent 4d93c727bb
commit defe15694b
8 files changed
+93 -14

No files matched your search

+3
View File
@@ -66,6 +66,9 @@ export function buildApiContext(ref: OneBotInstanceContext): ApiActionContext {
isOnline: () => true,
getMessage: (messageId) => messageStore.findEvent(messageId),
getMessageMeta: (messageId) => messageStore.findMeta(messageId),
listReadSessions: () => messageStore.listReadSessions(
bridge.identity.groups.map(group => group.groupId),
),
canSendImage: () => true,
canSendRecord: () => true,
sendPrivateMessage: (userId, message, autoEscape, tempGroupId) => sendPrivateMessage(ref, userId, message, autoEscape, tempGroupId),