refactor: raw message parsers

This commit is contained in:
Seijo Cecilia
2024-08-25 17:54:50 +08:00
parent 1332800c3b
commit a23c06025a
4 changed files with 375 additions and 401 deletions

View File

@@ -101,7 +101,7 @@ class MessageUniqueWrapper {
return ret.map((t) => t?.MsgId).filter((t) => t !== undefined);
}
createMsg(peer: Peer, msgId: string): number | undefined {
createMsg(peer: Peer, msgId: string) {
const key = `${msgId}|${peer.chatType}|${peer.peerUid}`;
const hash = crypto.createHash('md5').update(key).digest();
//设置第一个bit为0 保证shortId为正数