은승우

Update app.js

Showing 1 changed file with 7 additions and 2 deletions
......@@ -82,8 +82,13 @@ function handleEvent(event) {
}
else if (event.type == 'message'&& event.message.type == 'image') {
return new Promise((resolve,reject)=>{
console.log(event.message.originContentUrl);
client.replyMessage(event.replyToken,event.message).then(resolve).catch(reject);
request.post(options, function(error, response, body){
// Translate API Sucess
if(!error && response.statusCode == 200){
client.replyMessage(event.replyToken,event.message.originalContentUrl).then(resolve).catch(reject);
}
});
/*console.log("!");
var cheerio = require('cheerio');
......