-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Generic Media Decoder #143
base: master
Are you sure you want to change the base?
Conversation
sigalor#133 self.decodeMedia(mediaMessage=processedData[2][0]['message']) media decoder can be called here if message is media
if extension is None or extension is '': | ||
extension = '.ogg' | ||
mediaData = urllib2.urlopen(media['url']).read() | ||
mediaKeyExpanded = HKDF(base64.b64decode(media['mediaKey']), 112, "WhatsApp " + info + " Keys") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -82,6 +83,7 @@ class WhatsAppWebClient: | |||
onMessageCallback = None; | |||
onCloseCallback = None; | |||
activeWs = None; | |||
location = r'''/usr/src/app/media/'''; ## Change Location of media as per requirement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely need to set a sane default location for this to be safe to merge.
@@ -170,6 +200,7 @@ def onMessage(self, ws, message): | |||
try: | |||
processedData = whatsappReadBinary(decryptedMessage, True); | |||
messageType = "binary"; | |||
##self.decodeMedia(mediaMessage=processedData[2][0]['message']) media decoder can be called here if message is media |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is the lynchpin, we'll need to enable this before safely merging.
#133
self.decodeMedia(mediaMessage=processedData[2][0]['message']) media decoder can be called here if message is media