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:
8 files changed
+93
-14
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
} from './actions';
|
||||
import type { GroupSystemMessageQuery } from './modules/contact-actions';
|
||||
import type { ForwardPreviewMeta } from './modules/message-actions';
|
||||
import type { ReadSessionTargets } from './message-store';
|
||||
import type { JsonObject, JsonValue, MessageMeta } from './types';
|
||||
import { RETCODE, failedResponse, okResponse } from './types';
|
||||
import { type StreamSink, wrapStreamFrame, wrapStreamTerminal } from './streaming';
|
||||
@@ -38,6 +39,7 @@ export interface ApiActionContext {
|
||||
isOnline: () => boolean;
|
||||
getMessage: (messageId: number) => JsonObject | null;
|
||||
getMessageMeta: (messageId: number) => MessageMeta | null;
|
||||
listReadSessions: () => ReadSessionTargets;
|
||||
sendPrivateMessage: (userId: number, message: JsonValue, autoEscape: boolean, tempGroupId?: number) => Promise<MessageSendResult>;
|
||||
sendGroupMessage: (groupId: number, message: JsonValue, autoEscape: boolean) => Promise<MessageSendResult>;
|
||||
deleteMessage: (messageId: number, meta: MessageMeta) => Promise<void>;
|
||||
|
||||
Reference in new issue
Block a user