mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: uint
This commit is contained in:
parent
1dc844435a
commit
9685931694
@ -74,7 +74,7 @@ class MessageUniqueWrapper {
|
|||||||
createMsg(peer: Peer, msgId: string): number | undefined {
|
createMsg(peer: Peer, msgId: string): number | undefined {
|
||||||
const key = `${msgId}|${peer.chatType}|${peer.peerUid}`;
|
const key = `${msgId}|${peer.chatType}|${peer.peerUid}`;
|
||||||
const hash = crypto.createHash('sha1').update(key);
|
const hash = crypto.createHash('sha1').update(key);
|
||||||
const shortId = parseInt(hash.digest('hex').slice(0, 8), 16);
|
const shortId = Buffer.from(hash.digest('hex').slice(0, 8),'hex').readInt32BE();
|
||||||
const isExist = this.msgIdMap.getKey(shortId);
|
const isExist = this.msgIdMap.getKey(shortId);
|
||||||
//console.log(`${peer.peerUid} ${msgId} ------- ${shortId}`);
|
//console.log(`${peer.peerUid} ${msgId} ------- ${shortId}`);
|
||||||
if (isExist && isExist === msgId) {
|
if (isExist && isExist === msgId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user