release: v1.4.7

This commit is contained in:
手瓜一十雪
2024-06-01 15:52:06 +08:00
parent 2fce186eb3
commit f7b0e95638
48 changed files with 62 additions and 49 deletions

View File

@@ -10,12 +10,13 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
const SchemaData = {
type: 'object',
properties: {
group_id: { type: [ 'number' , 'string' ] },
group_id: { type: ['number', 'string'] },
file: { type: 'string' },
name: { type: 'string' },
folder: { type: 'string' }
folder: { type: 'string' },
folder_id: { type: 'string' }//临时扩展
},
required: ['group_id', 'file', 'name', 'folder']
required: ['group_id', 'file', 'name']
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
@@ -36,7 +37,7 @@ export default class GoCQHTTPUploadGroupFile extends BaseAction<Payload, null> {
if (downloadResult.errMsg) {
throw new Error(downloadResult.errMsg);
}
const sendFileEle: SendFileElement = await SendMsgElementConstructor.file(downloadResult.path, payload.name);
const sendFileEle: SendFileElement = await SendMsgElementConstructor.file(downloadResult.path, payload.name, payload.folder_id);
await sendMsg({ chatType: ChatType.group, peerUid: group.groupCode }, [sendFileEle], [], true);
return null;
}