fix: Support Onebot v11 get_forward_msg

This commit is contained in:
linyuchen 2024-04-15 17:39:18 +08:00
parent d66ab7d389
commit d9d9ba8bf1

View File

@ -7,6 +7,7 @@ import { ActionName } from '../types';
interface Payload {
message_id: string; // long msg id
id?: string; // short msg id
}
interface Response {
@ -17,7 +18,7 @@ export class GoCQHTTGetForwardMsgAction extends BaseAction<Payload, any> {
actionName = ActionName.GoCQHTTP_GetForwardMsg;
protected async _handle(payload: Payload): Promise<any> {
const rootMsg = await dbUtil.getMsgByLongId(payload.message_id);
const rootMsg = await dbUtil.getMsgByLongId( payload.id || payload.message_id);
if (!rootMsg) {
throw Error('msg not found');
}