mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
标准兼容
根据GOCQ标准将获取群历史消息中的msg_seq改为非必要参数,默认为0
This commit is contained in:
@@ -18,7 +18,7 @@ const SchemaData = {
|
||||
message_seq: { type: 'number' },
|
||||
count: { type: 'number' }
|
||||
},
|
||||
required: ['group_id', 'message_seq', 'count']
|
||||
required: ['group_id', 'count']
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
@@ -31,7 +31,7 @@ export default class GoCQHTTPGetGroupMsgHistory extends BaseAction<Payload, Resp
|
||||
if (!group) {
|
||||
throw `群${payload.group_id}不存在`;
|
||||
}
|
||||
const startMsgId = (await MessageUnique.getMsgIdAndPeerByShortId(payload.message_seq))?.MsgId || '0';
|
||||
const startMsgId = (await MessageUnique.getMsgIdAndPeerByShortId(payload.message_seq || 0))?.MsgId || '0';
|
||||
// log("startMsgId", startMsgId)
|
||||
const historyResult = (await NTQQMsgApi.getMsgHistory({
|
||||
chatType: ChatType.group,
|
||||
|
Reference in New Issue
Block a user