mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: #215 get_forward_msg params missing id(onebot11)
This commit is contained in:
parent
92b49015b0
commit
abbd6797c4
@ -6,7 +6,8 @@ import { OB11Constructor } from '../../constructor'
|
||||
import { ActionName } from '../types'
|
||||
|
||||
interface Payload {
|
||||
message_id: string // long msg id
|
||||
message_id: string // long msg id,gocq
|
||||
id?: string // long msg id, onebot11
|
||||
}
|
||||
|
||||
interface Response {
|
||||
@ -16,7 +17,11 @@ interface Response {
|
||||
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 message_id = payload.id || payload.message_id
|
||||
if (!message_id) {
|
||||
throw Error('message_id不能为空')
|
||||
}
|
||||
const rootMsg = await dbUtil.getMsgByLongId(message_id)
|
||||
if (!rootMsg) {
|
||||
throw Error('msg not found')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user