This commit is contained in:
idranme 2024-08-22 06:23:35 +08:00
parent 8b57ebd7de
commit b3b8f9cd72
No known key found for this signature in database
GPG Key ID: 926F7B5B668E495F
3 changed files with 6 additions and 6 deletions

View File

@ -341,7 +341,7 @@ function onLoad() {
}
})
/*registerReceiveHook<FriendRequestNotify>(ReceiveCmdS.FRIEND_REQUEST, async (payload) => {
registerReceiveHook<FriendRequestNotify>(ReceiveCmdS.FRIEND_REQUEST, async (payload) => {
for (const req of payload.data.buddyReqs) {
if (!!req.isInitiator || (req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM)) {
continue
@ -349,7 +349,7 @@ function onLoad() {
let userId = 0
try {
const requesterUin = await NTQQUserApi.getUinByUid(req.friendUid)
userId = parseInt(requesterUin!)
userId = parseInt(requesterUin)
} catch (e) {
log('获取加好友者QQ号失败', e)
}
@ -362,7 +362,7 @@ function onLoad() {
)
postOb11Event(friendRequestEvent)
}
})*/
})
}
let startTime = 0 // 毫秒

View File

@ -98,12 +98,12 @@ export class NTQQGroupApi {
)
return notifies
} else {
return await invoke<GroupNotifies>({
return (await invoke<GroupNotifies>({
methodName: NTMethod.GET_GROUP_NOTICE,
cbCmd: ReceiveCmdS.GROUP_NOTIFY,
afterFirstCmd: false,
args: [{ doubt: false, startSeq: '', number: num }, null],
})
})).notifies
}
}

View File

@ -11,7 +11,7 @@ function generateMsgId() {
const buffer = Buffer.alloc(8)
buffer.writeUInt32BE(timestamp, 0)
buffer.writeUInt32BE(random, 4)
const msgId = BigInt("0x" + buffer.toString('hex')).toString()
const msgId = BigInt('0x' + buffer.toString('hex')).toString()
return msgId
}