mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
chore: 兼容性提高
This commit is contained in:
parent
5770fc02a1
commit
daa2c39902
@ -13,7 +13,7 @@ interface FileResponse {
|
|||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
thread_count: { type: 'number' },
|
thread_count: { type: ['number', 'string'] },
|
||||||
url: { type: 'string' },
|
url: { type: 'string' },
|
||||||
base64: { type: 'string' },
|
base64: { type: 'string' },
|
||||||
name: { type: 'string' },
|
name: { type: 'string' },
|
||||||
|
@ -7,7 +7,7 @@ import { MessageUnique } from '@/common/utils/MessageUnique';
|
|||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
message_id: { type: 'number' },
|
message_id: { type: ['number', 'string'] },
|
||||||
group_id: { type: ['number', 'string'] },
|
group_id: { type: ['number', 'string'] },
|
||||||
user_id: { type: ['number', 'string'] },
|
user_id: { type: ['number', 'string'] },
|
||||||
},
|
},
|
||||||
@ -31,7 +31,7 @@ class ForwardSingleMsg extends BaseAction<Payload, null> {
|
|||||||
|
|
||||||
async _handle(payload: Payload): Promise<null> {
|
async _handle(payload: Payload): Promise<null> {
|
||||||
const NTQQMsgApi = this.CoreContext.apis.MsgApi;
|
const NTQQMsgApi = this.CoreContext.apis.MsgApi;
|
||||||
const msg = MessageUnique.getMsgIdAndPeerByShortId(payload.message_id);
|
const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
|
||||||
if (!msg) {
|
if (!msg) {
|
||||||
throw new Error(`无法找到消息${payload.message_id}`);
|
throw new Error(`无法找到消息${payload.message_id}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user