build: v1.5.2 - GetMsg兼容

This commit is contained in:
手瓜一十雪 2024-06-05 12:14:41 +08:00
parent c00e6d95cd
commit 3377c383c1
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
## 修复与优化
* 替换Uid/Uin为内部实现
* 增加HttpApi调用稳定性
* 修复 GetMsg 兼容性
## 新增与调整
* 支持真正意义上的陌生人信息获取 Api: GoCQHTTP_GetStrangerInfo

View File

@ -11,7 +11,7 @@ export type ReturnDataType = OB11Message
const SchemaData = {
type: 'object',
properties: {
message_id: { type: 'number' },
message_id: { type: ['number','string'] },
},
required: ['message_id']
} as const satisfies JSONSchema;
@ -26,7 +26,7 @@ class GetMsg extends BaseAction<Payload, OB11Message> {
if (!payload.message_id) {
throw Error('参数message_id不能为空');
}
let msg = await dbUtil.getMsgByShortId(payload.message_id);
let msg = await dbUtil.getMsgByShortId(parseInt(payload.message_id.toString()));
if (!msg) {
msg = await dbUtil.getMsgByLongId(payload.message_id.toString());
}