mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
Merge branch 'tuoyun' of github.com:OpenIMSDK/Open-IM-Server into tuoyun
This commit is contained in:
commit
8a7442648c
@ -6,6 +6,9 @@ import (
|
|||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/common/token_verify"
|
"Open_IM/pkg/common/token_verify"
|
||||||
|
"github.com/fatih/structs"
|
||||||
|
|
||||||
|
//"github.com/fatih/structs"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
sts "github.com/tencentyun/qcloud-cos-sts-sdk/go"
|
sts "github.com/tencentyun/qcloud-cos-sts-sdk/go"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -57,9 +60,13 @@ func TencentCloudStorageCredential(c *gin.Context) {
|
|||||||
resp.ErrCode = constant.ErrTencentCredential.ErrCode
|
resp.ErrCode = constant.ErrTencentCredential.ErrCode
|
||||||
resp.ErrMsg = err.Error()
|
resp.ErrMsg = err.Error()
|
||||||
} else {
|
} else {
|
||||||
resp.Data.Bucket = config.Config.Credential.Tencent.Bucket
|
resp.CosData.Bucket = config.Config.Credential.Tencent.Bucket
|
||||||
resp.Data.Region = config.Config.Credential.Tencent.Region
|
resp.CosData.Region = config.Config.Credential.Tencent.Region
|
||||||
resp.Data.CredentialResult = res
|
resp.CosData.CredentialResult = res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resp.Data = structs.Map(&resp.CosData)
|
||||||
|
log.NewInfo(req.OperationID, "TencentCloudStorageCredential return ", resp)
|
||||||
|
|
||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ func returnMsg(replay *pbChat.SendMsgResp, pb *pbChat.SendMsgReq, errCode int32,
|
|||||||
func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType int, pb *pbChat.SendMsgReq) bool {
|
func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType int, pb *pbChat.SendMsgReq) bool {
|
||||||
conversationID := utils.GetConversationIDBySessionType(sourceID, sessionType)
|
conversationID := utils.GetConversationIDBySessionType(sourceID, sessionType)
|
||||||
opt, err := db.DB.GetSingleConversationMsgOpt(userID, conversationID)
|
opt, err := db.DB.GetSingleConversationMsgOpt(userID, conversationID)
|
||||||
if err != nil || err != redis.ErrNil {
|
if err != nil && err != redis.ErrNil {
|
||||||
log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", conversationID, pb.String(), err.Error())
|
log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", conversationID, pb.String(), err.Error())
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -14,5 +14,7 @@ type TencentCloudStorageCredentialRespData struct {
|
|||||||
|
|
||||||
type TencentCloudStorageCredentialResp struct {
|
type TencentCloudStorageCredentialResp struct {
|
||||||
CommResp
|
CommResp
|
||||||
Data TencentCloudStorageCredentialRespData `json:"data"`
|
CosData TencentCloudStorageCredentialRespData `json:"-"`
|
||||||
|
|
||||||
|
Data map[string]interface{} `json:"data"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user