Created
November 23, 2016 14:23
-
-
Save zubairov/7a1ecda4c2488a7dee074919578050b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* run() { | |
console.log('Incoming attachments=%j', Object.keys(msg.attachments || {})); | |
for(let name in msg.attachments) { | |
let attachment = msg.attachments[name]; | |
console.log('Handling attachment with name=%s url=%s', name, attachment.url); | |
var result = yield request.get({uri : attachment.url}); | |
console.log('Content of the attachment is %j', result.body); | |
}; | |
return {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment