修复:钉钉群机器人不填写加签密钥时报错(Empty key)
This commit is contained in:
parent
8c62603ae7
commit
4b246705d1
|
@ -39,7 +39,7 @@ class DingtalkUtils private constructor() {
|
||||||
|
|
||||||
var requestUrl = if (setting.token.startsWith("http")) setting.token else "https://oapi.dingtalk.com/robot/send?access_token=" + setting.token
|
var requestUrl = if (setting.token.startsWith("http")) setting.token else "https://oapi.dingtalk.com/robot/send?access_token=" + setting.token
|
||||||
|
|
||||||
if (setting.secret != null) {
|
if (!TextUtils.isEmpty(setting.secret)) {
|
||||||
val timestamp = System.currentTimeMillis()
|
val timestamp = System.currentTimeMillis()
|
||||||
val stringToSign = "$timestamp\n" + setting.secret
|
val stringToSign = "$timestamp\n" + setting.secret
|
||||||
val mac = Mac.getInstance("HmacSHA256")
|
val mac = Mac.getInstance("HmacSHA256")
|
||||||
|
|
Loading…
Reference in New Issue