Skip to content

Commit f6ae96f

Browse files
committed
Merge branch 'main' into tuoyun
# Conflicts: # internal/conversation_msg/conversation_msg.go
2 parents 3e89cea + a4b5f05 commit f6ae96f

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

internal/common/alioss.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,14 @@ func (c *OSS) uploadObj(filePath string, fileType string, onProgressFun func(int
9393
if err != nil {
9494
return "", "", utils.Wrap(err, "")
9595
}
96-
newName, contentType, err := c.getNewFileNameAndContentType(filePath, fileType)
96+
newName, _, err := c.getNewFileNameAndContentType(filePath, fileType)
9797
if err != nil {
9898
return "", "", utils.Wrap(err, "")
9999
}
100100
// 带可选参数的签名直传。请确保设置的ContentType值与在前端使用时设置的ContentType值一致。
101101
options := []oss.Option{
102102
oss.Progress(&OssProgressListener{onProgressFun: onProgressFun}), // 进度条
103103
}
104-
if fileType == "img" {
105-
options = append(options, oss.ContentType(contentType))
106-
}
107104
// 签名直传。
108105
signedURL, err := bucket.SignURL(newName, oss.HTTPPut, 60)
109106
if err != nil {

internal/conversation_msg/conversation_msg.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func (c *Conversation) doMsgNew(c2v common.Cmd2Value) {
103103
phNewConversationSet := make(map[string]*db.LocalConversation)
104104
log.Info(operationID, "do Msg come here")
105105
for _, v := range allMsg {
106-
107106
isHistory = utils.GetSwitchFromOptions(v.Options, constant.IsHistory)
108107
isUnreadCount = utils.GetSwitchFromOptions(v.Options, constant.IsUnreadCount)
109108
isConversationUpdate = utils.GetSwitchFromOptions(v.Options, constant.IsConversationUpdate)
@@ -265,8 +264,6 @@ func (c *Conversation) doMsgNew(c2v common.Cmd2Value) {
265264
lc.ShowName = msg.SenderNickname
266265
lc.FaceURL = msg.SenderFaceURL
267266
case constant.GroupChatType:
268-
//Generate At type into Conversation
269-
//c.genConversationGroupAtType(&lc, msg)
270267
lc.GroupID = v.GroupID
271268
lc.ConversationID = utils.GetConversationIDBySessionType(lc.GroupID, constant.GroupChatType)
272269
//faceUrl, name, err := u.getGroupNameAndFaceUrlByUid(c.GroupID)

0 commit comments

Comments
 (0)