mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 13:01:14 +00:00
fix: Support Onebot v11 get_forward_msg
This commit is contained in:
parent
d66ab7d389
commit
d9d9ba8bf1
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user