From d9d9ba8bf132a20c3887e5a9c860a8f4b0d78509 Mon Sep 17 00:00:00 2001 From: linyuchen Date: Mon, 15 Apr 2024 17:39:18 +0800 Subject: [PATCH] fix: Support Onebot v11 get_forward_msg --- src/onebot11/action/go-cqhttp/GetForwardMsg.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/onebot11/action/go-cqhttp/GetForwardMsg.ts b/src/onebot11/action/go-cqhttp/GetForwardMsg.ts index faf6c247..b68f3762 100644 --- a/src/onebot11/action/go-cqhttp/GetForwardMsg.ts +++ b/src/onebot11/action/go-cqhttp/GetForwardMsg.ts @@ -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 { actionName = ActionName.GoCQHTTP_GetForwardMsg; protected async _handle(payload: Payload): Promise { - 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'); }