Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// dependencies
// Interface for Google Deepdream
const Response = require('hubot').Response
var _ = require('lomath')
var fs = require('fs')
var runDeepdream = require('../lib/deepdream')
var request = require('request')
// quick test scripts
/* istanbul ignore next */
module.exports = function(robot) {
robot.on("fb_richMsg", function(envelope) {
robot.logger.info("got fb richMsg", envelope.attachments[0])
runDeepdream(envelope)
.then(function(outFilepath) {
robot.logger.info('DeepDream outFile', outFilepath)
var formData = {
recipient: `{"id":"${envelope.user.id}"}`,
message: '{"attachment":{"type":"image", "payload":{}}}',