Merge pull request #17 from Adamcrg/main

fix: 修改dingtalk签名base64问题
This commit is contained in:
shanmite 2021-08-26 12:13:17 +08:00 committed by GitHub
commit 79b348d37e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -430,7 +430,7 @@ function ddBotNotify(text, desp) {
const dateNow = Date.now();
const hmac = crypto.createHmac('sha256', DD_BOT_SECRET);
hmac.update(`${dateNow}\n${DD_BOT_SECRET}`);
const result = encodeURIComponent(hmac.digest('Util64'));
const result = encodeURIComponent(hmac.digest().toString('base64'));
send({
method: 'POST',
url: `https://oapi.dingtalk.com/robot/send`,