Skip to content

Commit

Permalink
Merge branch 'main' into tuoyun
Browse files Browse the repository at this point in the history
# Conflicts:
#	internal/conversation_msg/conversation_msg.go
  • Loading branch information
FGadvancer committed Apr 29, 2022
2 parents 3e89cea + a4b5f05 commit f6ae96f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions internal/common/alioss.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,14 @@ func (c *OSS) uploadObj(filePath string, fileType string, onProgressFun func(int
if err != nil {
return "", "", utils.Wrap(err, "")
}
newName, contentType, err := c.getNewFileNameAndContentType(filePath, fileType)
newName, _, err := c.getNewFileNameAndContentType(filePath, fileType)
if err != nil {
return "", "", utils.Wrap(err, "")
}
// 带可选参数的签名直传。请确保设置的ContentType值与在前端使用时设置的ContentType值一致。
options := []oss.Option{
oss.Progress(&OssProgressListener{onProgressFun: onProgressFun}), // 进度条
}
if fileType == "img" {
options = append(options, oss.ContentType(contentType))
}
// 签名直传。
signedURL, err := bucket.SignURL(newName, oss.HTTPPut, 60)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions internal/conversation_msg/conversation_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func (c *Conversation) doMsgNew(c2v common.Cmd2Value) {
phNewConversationSet := make(map[string]*db.LocalConversation)
log.Info(operationID, "do Msg come here")
for _, v := range allMsg {

isHistory = utils.GetSwitchFromOptions(v.Options, constant.IsHistory)
isUnreadCount = utils.GetSwitchFromOptions(v.Options, constant.IsUnreadCount)
isConversationUpdate = utils.GetSwitchFromOptions(v.Options, constant.IsConversationUpdate)
Expand Down Expand Up @@ -265,8 +264,6 @@ func (c *Conversation) doMsgNew(c2v common.Cmd2Value) {
lc.ShowName = msg.SenderNickname
lc.FaceURL = msg.SenderFaceURL
case constant.GroupChatType:
//Generate At type into Conversation
//c.genConversationGroupAtType(&lc, msg)
lc.GroupID = v.GroupID
lc.ConversationID = utils.GetConversationIDBySessionType(lc.GroupID, constant.GroupChatType)
//faceUrl, name, err := u.getGroupNameAndFaceUrlByUid(c.GroupID)
Expand Down

0 comments on commit f6ae96f

Please sign in to comment.