Skip to content

Commit

Permalink
change Sticker Download position to folow current rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackes David committed Oct 4, 2019
1 parent bf60ed8 commit 03852bb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,6 @@ func (m *ImageMessage) Download() ([]byte, error) {
return Download(m.url, m.mediaKey, MediaImage, int(m.fileLength))
}

/*
Download is the function to retrieve Sticker media data. The media gets downloaded, validated and returned.
*/
func (m *StickerMessage) Download() ([]byte, error) {
return Download(m.url, m.mediaKey, MediaImage, int(m.fileLength))
}

/*
VideoMessage represents a video message. Unexported fields are needed for media up/downloading and media validation.
Provide a io.Reader as Content for message sending.
Expand Down Expand Up @@ -663,6 +656,13 @@ func getStickerMessage(msg *proto.WebMessageInfo) StickerMessage {
return StickerMessage
}

/*
Download is the function to retrieve Sticker media data. The media gets downloaded, validated and returned.
*/
func (m *StickerMessage) Download() ([]byte, error) {
return Download(m.url, m.mediaKey, MediaImage, int(m.fileLength))
}

func ParseProtoMessage(msg *proto.WebMessageInfo) interface{} {
switch {

Expand Down

0 comments on commit 03852bb

Please sign in to comment.