mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
BUG修复
1.尝试让所有人能收到group_admin事件 2.修复请求API: delete_msg(POST请求网址传参)将负数判定为文本导致无法调用的问题
This commit is contained in:
@@ -7,7 +7,12 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
const SchemaData = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
message_id: { type: 'number' },
|
||||
message_id: {
|
||||
oneOf:[
|
||||
{ type: 'number' },
|
||||
{ type: 'string' }
|
||||
]
|
||||
}
|
||||
},
|
||||
required: ['message_id']
|
||||
} as const satisfies JSONSchema;
|
||||
@@ -18,7 +23,7 @@ class DeleteMsg extends BaseAction<Payload, void> {
|
||||
actionName = ActionName.DeleteMsg;
|
||||
PayloadSchema = SchemaData;
|
||||
protected async _handle(payload: Payload) {
|
||||
const msg = await dbUtil.getMsgByShortId(payload.message_id);
|
||||
const msg = await dbUtil.getMsgByShortId(Number(payload.message_id));
|
||||
if (msg) {
|
||||
await NTQQMsgApi.recallMsg({ peerUid: msg.peerUid, chatType: msg.chatType }, [msg.msgId]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user