twikoo-func 1.6.37 → 1.6.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -622,7 +622,7 @@ async function parse (comment) {
|
|
|
622
622
|
const isAdminUser = await isAdmin()
|
|
623
623
|
const isBloggerMail = equalsMail(comment.mail, config.BLOGGER_EMAIL)
|
|
624
624
|
if (isBloggerMail && !isAdminUser) throw new Error('请先登录管理面板,再使用博主身份发送评论')
|
|
625
|
-
const hashMethod =
|
|
625
|
+
const hashMethod = config.GRAVATAR_CDN === 'cravatar.cn' ? md5 : sha256
|
|
626
626
|
const commentDo = {
|
|
627
627
|
uid: await getUid(),
|
|
628
628
|
nick: comment.nick ? comment.nick : '匿名',
|
|
@@ -643,7 +643,7 @@ async function parse (comment) {
|
|
|
643
643
|
}
|
|
644
644
|
if (isQQ(comment.mail)) {
|
|
645
645
|
commentDo.mail = addQQMailSuffix(comment.mail)
|
|
646
|
-
commentDo.mailMd5 =
|
|
646
|
+
commentDo.mailMd5 = hashMethod(normalizeMail(commentDo.mail))
|
|
647
647
|
commentDo.avatar = await getQQAvatar(comment.mail)
|
|
648
648
|
}
|
|
649
649
|
return commentDo
|