fix: method signature of _handle

This commit is contained in:
Wesley F. Young
2024-08-10 22:22:52 +08:00
parent 8839563ff8
commit ae5d50141b
69 changed files with 97 additions and 78 deletions

View File

@@ -31,7 +31,7 @@ class MarkMsgAsRead extends BaseAction<PlayloadType, null> {
return { chatType: ChatType.group, peerUid: payload.group_id.toString() };
}
protected async _handle(payload: PlayloadType): Promise<null> {
async _handle(payload: PlayloadType): Promise<null> {
const NTQQMsgApi = this.CoreContext.getApiContext().MsgApi;
// 调用API
const ret = await NTQQMsgApi.setMsgRead(await this.getPeer(payload));
@@ -61,7 +61,7 @@ interface Payload {
export class GoCQHTTPMarkMsgAsRead extends BaseAction<Payload, null> {
actionName = ActionName.GoCQHTTP_MarkMsgAsRead;
protected async _handle(payload: Payload): Promise<null> {
async _handle(payload: Payload): Promise<null> {
return null;
}
}
@@ -69,7 +69,7 @@ export class GoCQHTTPMarkMsgAsRead extends BaseAction<Payload, null> {
export class MarkAllMsgAsRead extends BaseAction<Payload, null> {
actionName = ActionName._MarkAllMsgAsRead;
protected async _handle(payload: Payload): Promise<null> {
async _handle(payload: Payload): Promise<null> {
const NTQQMsgApi = this.CoreContext.getApiContext().MsgApi;
await NTQQMsgApi.markallMsgAsRead();
return null;