From c3a48e33449f612f709628a623f2f17dc642b1d9 Mon Sep 17 00:00:00 2001 From: huankong233 Date: Mon, 21 Oct 2024 19:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=87=E8=AE=B0=E5=A5=BD?= =?UTF-8?q?=E5=8F=8B/=E7=BE=A4=E8=81=8A=E4=BF=A1=E6=81=AF=E5=B7=B2?= =?UTF-8?q?=E8=AF=BB=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/onebot/action/msg/MarkMsgAsRead.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/onebot/action/msg/MarkMsgAsRead.ts b/src/onebot/action/msg/MarkMsgAsRead.ts index bfbc0e7a..279f4966 100644 --- a/src/onebot/action/msg/MarkMsgAsRead.ts +++ b/src/onebot/action/msg/MarkMsgAsRead.ts @@ -1,7 +1,7 @@ import { ChatType, Peer } from '@/core/entities'; +import { FromSchema, JSONSchema } from 'json-schema-to-ts'; import BaseAction from '../BaseAction'; import { ActionName } from '../types'; -import { FromSchema, JSONSchema } from 'json-schema-to-ts'; const SchemaData = { type: 'object', @@ -49,23 +49,14 @@ export class MarkGroupMsgAsRead extends MarkMsgAsRead { actionName = ActionName.MarkGroupMsgAsRead; } - -interface Payload { - message_id: number; -} - -export class GoCQHTTPMarkMsgAsRead extends BaseAction { +export class GoCQHTTPMarkMsgAsRead extends MarkMsgAsRead { actionName = ActionName.GoCQHTTP_MarkMsgAsRead; - - async _handle(payload: Payload): Promise { - return null; - } } -export class MarkAllMsgAsRead extends BaseAction { +export class MarkAllMsgAsRead extends BaseAction { actionName = ActionName._MarkAllMsgAsRead; - async _handle(payload: Payload): Promise { + async _handle(): Promise { await this.core.apis.MsgApi.markAllMsgAsRead(); return null; }