Skip to content

Added Generic Media Decoder#143

Open
tiwarishrijan wants to merge 1 commit into
sigalor:masterfrom
tiwarishrijan:patch-6
Open

Added Generic Media Decoder#143
tiwarishrijan wants to merge 1 commit into
sigalor:masterfrom
tiwarishrijan:patch-6

Conversation

@tiwarishrijan
Copy link
Copy Markdown
Contributor

#133

self.decodeMedia(mediaMessage=processedData[2][0]['message']) media decoder can be called here if message is media

sigalor#133 

self.decodeMedia(mediaMessage=processedData[2][0]['message']) media decoder can be called here if message is media
Comment thread backend/whatsapp.py
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")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Comment thread backend/whatsapp.py
onMessageCallback = None;
onCloseCallback = None;
activeWs = None;
location = r'''/usr/src/app/media/'''; ## Change Location of media as per requirement
Copy link
Copy Markdown
Collaborator

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.

Comment thread backend/whatsapp.py
try:
processedData = whatsappReadBinary(decryptedMessage, True);
messageType = "binary";
##self.decodeMedia(mediaMessage=processedData[2][0]['message']) media decoder can be called here if message is media
Copy link
Copy Markdown
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants