From a68ee2002243e0e2974e17998d9fd44c40a2f781 Mon Sep 17 00:00:00 2001 From: iMaeGoo Date: Tue, 9 Jul 2024 17:43:12 +0800 Subject: [PATCH] fix: mail hash method --- src/server/function/twikoo/index.js | 2 +- src/server/self-hosted/index.js | 2 +- src/server/self-hosted/mongo.js | 2 +- src/server/vercel/api/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/function/twikoo/index.js b/src/server/function/twikoo/index.js index bcdfb0ce5..ef00d7189 100644 --- a/src/server/function/twikoo/index.js +++ b/src/server/function/twikoo/index.js @@ -643,7 +643,7 @@ async function parse (comment) { } if (isQQ(comment.mail)) { commentDo.mail = addQQMailSuffix(comment.mail) - commentDo.mailMd5 = md5(normalizeMail(commentDo.mail)) + commentDo.mailMd5 = hashMethod(normalizeMail(commentDo.mail)) commentDo.avatar = await getQQAvatar(comment.mail) } return commentDo diff --git a/src/server/self-hosted/index.js b/src/server/self-hosted/index.js index 2ae901204..ad41ffa1d 100644 --- a/src/server/self-hosted/index.js +++ b/src/server/self-hosted/index.js @@ -681,7 +681,7 @@ async function parse (comment, request) { } if (isQQ(comment.mail)) { commentDo.mail = addQQMailSuffix(comment.mail) - commentDo.mailMd5 = md5(normalizeMail(commentDo.mail)) + commentDo.mailMd5 = hashMethod(normalizeMail(commentDo.mail)) commentDo.avatar = await getQQAvatar(comment.mail) } return commentDo diff --git a/src/server/self-hosted/mongo.js b/src/server/self-hosted/mongo.js index f9f5a6638..157826862 100644 --- a/src/server/self-hosted/mongo.js +++ b/src/server/self-hosted/mongo.js @@ -660,7 +660,7 @@ async function parse (comment, request) { } if (isQQ(comment.mail)) { commentDo.mail = addQQMailSuffix(comment.mail) - commentDo.mailMd5 = md5(normalizeMail(commentDo.mail)) + commentDo.mailMd5 = hashMethod(normalizeMail(commentDo.mail)) commentDo.avatar = await getQQAvatar(comment.mail) } return commentDo diff --git a/src/server/vercel/api/index.js b/src/server/vercel/api/index.js index ce5796bdd..5d64e8f7f 100644 --- a/src/server/vercel/api/index.js +++ b/src/server/vercel/api/index.js @@ -684,7 +684,7 @@ async function parse (comment, request) { } if (isQQ(comment.mail)) { commentDo.mail = addQQMailSuffix(comment.mail) - commentDo.mailMd5 = md5(normalizeMail(commentDo.mail)) + commentDo.mailMd5 = hashMethod(normalizeMail(commentDo.mail)) commentDo.avatar = await getQQAvatar(comment.mail) } return commentDo