mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: Support Onebot v11 get_forward_msg
This commit is contained in:
@@ -7,6 +7,7 @@ import { ActionName } from '../types';
|
|||||||
|
|
||||||
interface Payload {
|
interface Payload {
|
||||||
message_id: string; // long msg id
|
message_id: string; // long msg id
|
||||||
|
id?: string; // short msg id
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Response {
|
interface Response {
|
||||||
@@ -17,7 +18,7 @@ export class GoCQHTTGetForwardMsgAction extends BaseAction<Payload, any> {
|
|||||||
actionName = ActionName.GoCQHTTP_GetForwardMsg;
|
actionName = ActionName.GoCQHTTP_GetForwardMsg;
|
||||||
|
|
||||||
protected async _handle(payload: Payload): Promise<any> {
|
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) {
|
if (!rootMsg) {
|
||||||
throw Error('msg not found');
|
throw Error('msg not found');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user