Compatibility with older versions of Node + decodeMedia bug fix

This commit is contained in:
Adhiraj
2020-05-15 22:00:12 +05:30
parent 80adc095a3
commit ea5ca61e49
7 changed files with 29 additions and 20 deletions

View File

@@ -50,7 +50,7 @@ client.connect (authInfo, 30*1000) // connect or timeout in 30 seconds
// decode, decrypt & save the media.
// The extension to the is applied automatically based on the media type
client.decodeMediaMessage(m.message, "media_in_" + m.key.id)
.then (meta => console.log(sender + " sent media, saved at: " + meta.fileName))
.then (meta => console.log(sender + " sent media, saved at: " + meta.filename))
.catch (err => console.log("error in decoding message: " + err))
}
// send a reply after 3 seconds