Skip to content

Commit

Permalink
feat: send mesasge by url add source path. (#349)
Browse files Browse the repository at this point in the history
* fix: repeated trigger conversation changed.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: group dismissed trigger to UI.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: get group member list order by join time asc.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* refactor: rename get user info from cache.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: create image message by URL add source file path.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

---------

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
  • Loading branch information
FGadvancer committed Sep 28, 2023
1 parent 80e4c40 commit 3228436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion internal/conversation_msg/create_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,14 @@ func (c *Conversation) CreateImageMessage(ctx context.Context, imagePath string)
return &s, nil

}
func (c *Conversation) CreateImageMessageByURL(ctx context.Context, sourcePicture, bigPicture, snapshotPicture sdk_struct.PictureBaseInfo) (*sdk_struct.MsgStruct, error) {
func (c *Conversation) CreateImageMessageByURL(ctx context.Context, sourcePath string, sourcePicture, bigPicture, snapshotPicture sdk_struct.PictureBaseInfo) (*sdk_struct.MsgStruct, error) {
s := sdk_struct.MsgStruct{}
err := c.initBasicInfo(ctx, &s, constant.UserMsgType, constant.Picture)
if err != nil {
return nil, err
}
s.PictureElem = &sdk_struct.PictureElem{
SourcePath: sourcePath,
SourcePicture: &sourcePicture,
BigPicture: &bigPicture,
SnapshotPicture: &snapshotPicture,
Expand Down
4 changes: 2 additions & 2 deletions open_im_sdk/conversation_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ func CreateFileMessageFromFullPath(operationID string, fileFullPath, fileName st
func CreateImageMessage(operationID string, imagePath string) string {
return syncCall(operationID, UserForSDK.Conversation().CreateImageMessage, imagePath)
}
func CreateImageMessageByURL(operationID string, sourcePicture, bigPicture, snapshotPicture string) string {
return syncCall(operationID, UserForSDK.Conversation().CreateImageMessageByURL, sourcePicture, bigPicture, snapshotPicture)
func CreateImageMessageByURL(operationID string, sourcePath string, sourcePicture, bigPicture, snapshotPicture string) string {
return syncCall(operationID, UserForSDK.Conversation().CreateImageMessageByURL, sourcePath, sourcePicture, bigPicture, snapshotPicture)
}

func CreateSoundMessageByURL(operationID string, soundBaseInfo string) string {
Expand Down

0 comments on commit 3228436

Please sign in to comment.