mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 13:01:14 +00:00
fix
This commit is contained in:
parent
7449ce9c3b
commit
59f99e4f6a
@ -21,15 +21,15 @@ interface Response {
|
|||||||
export default class GetFriendMsgHistory extends BaseAction<Payload, Response> {
|
export default class GetFriendMsgHistory extends BaseAction<Payload, Response> {
|
||||||
actionName = ActionName.GoCQHTTP_GetGroupMsgHistory;
|
actionName = ActionName.GoCQHTTP_GetGroupMsgHistory;
|
||||||
protected async _handle(payload: Payload): Promise<Response> {
|
protected async _handle(payload: Payload): Promise<Response> {
|
||||||
let uin = getUidByUin(payload.user_id.toString())
|
let uid = getUidByUin(payload.user_id.toString())
|
||||||
if (!uin) {
|
if (!uid) {
|
||||||
throw `记录${payload.user_id}不存在`;
|
throw `记录${payload.user_id}不存在`;
|
||||||
}
|
}
|
||||||
const startMsgId = (await dbUtil.getMsgByShortId(payload.message_seq))?.msgId || '0';
|
const startMsgId = (await dbUtil.getMsgByShortId(payload.message_seq))?.msgId || '0';
|
||||||
let friend = await getFriend(uid2UinMap?.[payload.user_id].toString())
|
let friend = await getFriend(uid);
|
||||||
let historyResult = (await NTQQMsgApi.getMsgHistory({
|
let historyResult = (await NTQQMsgApi.getMsgHistory({
|
||||||
chatType: friend ? ChatType.friend : ChatType.temp,
|
chatType: friend ? ChatType.friend : ChatType.temp,
|
||||||
peerUid: uin
|
peerUid: uid
|
||||||
}, startMsgId, parseInt(payload.count?.toString()) || 20));
|
}, startMsgId, parseInt(payload.count?.toString()) || 20));
|
||||||
console.log(historyResult);
|
console.log(historyResult);
|
||||||
const msgList = historyResult.msgList;
|
const msgList = historyResult.msgList;
|
||||||
|
Loading…
Reference in New Issue
Block a user