refactor: rename createMsg -> createUniqueMsgId to prevent ambiguity

This commit is contained in:
Wesley F. Young committed 2024-08-28 19:03:19 +08:00
1 parent cc85985d08
commit 56fa57ea02
8 files changed
+14 -13

No files matched your search

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