mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
build: v1.5.2 - GetMsg兼容
This commit is contained in:
parent
c00e6d95cd
commit
3377c383c1
@ -5,6 +5,7 @@ QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
## 修复与优化
|
||||
* 替换Uid/Uin为内部实现
|
||||
* 增加HttpApi调用稳定性
|
||||
* 修复 GetMsg 兼容性
|
||||
|
||||
## 新增与调整
|
||||
* 支持真正意义上的陌生人信息获取 Api: GoCQHTTP_GetStrangerInfo
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user