fix: coerce

This commit is contained in:
手瓜一十雪
2025-04-17 22:17:35 +08:00
parent 9df7c341a9
commit fb20b2e16c
7 changed files with 40 additions and 35 deletions

View File

@@ -4,18 +4,13 @@ import { ActionName } from '@/onebot/action/router';
// 未验证
export class GoCQHTTPSendForwardMsgBase extends SendMsgBase {
protected override async check(payload: OB11PostSendMsg) {
override async _handle(payload: OB11PostSendMsg) {
if (payload.messages) payload.message = normalize(payload.messages);
return super.check(payload);
return super._handle(payload);
}
}
export class GoCQHTTPSendForwardMsg extends GoCQHTTPSendForwardMsgBase {
override actionName = ActionName.GoCQHTTP_SendForwardMsg;
protected override async check(payload: OB11PostSendMsg) {
if (payload.messages) payload.message = normalize(payload.messages);
return super.check(payload);
}
}
export class GoCQHTTPSendPrivateForwardMsg extends GoCQHTTPSendForwardMsgBase {
override actionName = ActionName.GoCQHTTP_SendPrivateForwardMsg;