Skip to content

Commit

Permalink
Merge pull request #231 from jackesdavid/sticker-download
Browse files Browse the repository at this point in the history
Add StickerMessage Download function like we have in ImageMessage
  • Loading branch information
SchulteMK authored Nov 8, 2019
2 parents f32fa8c + 03852bb commit d7754af
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,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 d7754af

Please sign in to comment.