fix: Support Onebot v11 get_forward_msg
This commit is contained in:
1 parent
2de0914438
commit
d5722f6d4e
1 file changed
+2
-1
@@ -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