refactor: rename createMsg -> createUniqueMsgId to prevent ambiguity

This commit is contained in:
Wesley F. Young
2024-08-28 19:02:56 +08:00
parent c8621f8735
commit 451c18481a
8 changed files with 14 additions and 13 deletions

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为正数