Merge branch 'superGroup' of github.com:OpenIMSDK/Open-IM-Server into superGroup

This commit is contained in:
wangchuxiao 2022-06-30 18:50:28 +08:00
commit 53b0d13342
3 changed files with 6 additions and 2 deletions

View File

@ -694,7 +694,7 @@ demo:
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV
signName: 托云信息技术
verificationCodeTemplateCode: SMS_226810164
enable: true
enable: false
tencentsms: #腾讯云短信配置在腾讯云申请成功后修改以下选项enable为true则必须修改
appID: 2400000648
region: "ap-singapore"

View File

@ -118,7 +118,7 @@ func SendVerificationCode(c *gin.Context) {
return
}
}
log.Debug(params.OperationID, "send sms success", code, accountKey)
data := make(map[string]interface{})
data["account"] = account
c.JSON(http.StatusOK, gin.H{"errCode": constant.NoError, "errMsg": "Verification code has been set!", "data": data})

View File

@ -2,7 +2,9 @@ package register
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"encoding/json"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
@ -31,6 +33,8 @@ func (t TencentSMS) SendSms(code int, phoneNumber string) (resp interface{}, err
if _, ok := err.(*errors.TencentCloudSDKError); ok {
return response, err
}
b, _ := json.Marshal(response.Response)
log.Debug("tencent send message is ", code, phoneNumber, string(b))
return response, nil
}