chore: 兼容性提高

This commit is contained in:
手瓜一十雪 2024-08-15 00:00:21 +08:00
parent 5770fc02a1
commit daa2c39902
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ interface FileResponse {
const SchemaData = {
type: 'object',
properties: {
thread_count: { type: 'number' },
thread_count: { type: ['number', 'string'] },
url: { type: 'string' },
base64: { type: 'string' },
name: { type: 'string' },

View File

@ -7,7 +7,7 @@ import { MessageUnique } from '@/common/utils/MessageUnique';
const SchemaData = {
type: 'object',
properties: {
message_id: { type: 'number' },
message_id: { type: ['number', 'string'] },
group_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> {
const NTQQMsgApi = this.CoreContext.apis.MsgApi;
const msg = MessageUnique.getMsgIdAndPeerByShortId(payload.message_id);
const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
if (!msg) {
throw new Error(`无法找到消息${payload.message_id}`);
}