From 759adc45e3cdd2d10a3d4b5601523b5c0c833ee1 Mon Sep 17 00:00:00 2001 From: linyuchen Date: Thu, 25 Apr 2024 15:13:11 +0800 Subject: [PATCH] refactor: mark msg as read --- src/onebot11/action/index.ts | 7 ++++--- src/onebot11/action/types.ts | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/onebot11/action/index.ts b/src/onebot11/action/index.ts index 5166f92d..45a8016b 100644 --- a/src/onebot11/action/index.ts +++ b/src/onebot11/action/index.ts @@ -34,7 +34,7 @@ import SetGroupAdmin from './group/SetGroupAdmin'; import SetGroupCard from './group/SetGroupCard'; import GetImage from './file/GetImage'; import GetRecord from './file/GetRecord'; -import { MarkGroupMsgAsRead, MarkPrivateMsgAsRead } from './msg/MarkMsgAsRead'; +import { GoCQHTTPMarkMsgAsRead, MarkGroupMsgAsRead, MarkPrivateMsgAsRead } from './msg/MarkMsgAsRead'; import CleanCache from './system/CleanCache'; import GoCQHTTPUploadGroupFile from './go-cqhttp/UploadGroupFile'; import { GetConfigAction, SetConfigAction } from '@/onebot11/action/extends/Config'; @@ -52,6 +52,8 @@ export const actionHandlers = [ // new GetConfigAction(), // new SetConfigAction(), // new GetGroupAddRequest(), + new MarkGroupMsgAsRead(), + new MarkPrivateMsgAsRead(), new SetQQAvatar(), // onebot11 new SendLike(), @@ -86,8 +88,7 @@ export const actionHandlers = [ new GoCQHTTPGetStrangerInfo(), new GoCQHTTPDownloadFile(), new GetGuildList(), - new MarkGroupMsgAsRead(), - new MarkPrivateMsgAsRead(), + new GoCQHTTPMarkMsgAsRead(), new GoCQHTTPUploadGroupFile(), new GoCQHTTPGetGroupMsgHistory(), new GoCQHTTGetForwardMsgAction(), diff --git a/src/onebot11/action/types.ts b/src/onebot11/action/types.ts index fd59eacf..138a5468 100644 --- a/src/onebot11/action/types.ts +++ b/src/onebot11/action/types.ts @@ -55,6 +55,7 @@ export enum ActionName { GoCQHTTP_SendGroupForwardMsg = 'send_group_forward_msg', GoCQHTTP_SendPrivateForwardMsg = 'send_private_forward_msg', GoCQHTTP_GetStrangerInfo = 'get_stranger_info', + GoCQHTTP_MarkMsgAsRead = 'mark_msg_as_read', GetGuildList = 'get_guild_list', MarkPrivateMsgAsRead = 'mark_private_msg_as_read', MarkGroupMsgAsRead = 'mark_group_msg_as_read', @@ -63,4 +64,4 @@ export enum ActionName { GoCQHTTP_GetGroupMsgHistory = 'get_group_msg_history', GoCQHTTP_GetForwardMsg = 'get_forward_msg', GetFriendMsgHistory = 'get_friend_msg_history' -} \ No newline at end of file +}