I am using c9 as my dev environment and when running under development the bot does not actually send the message through even though sending.batch was called.
var bot = new builder.UniversalBot(connector);
bot.dialog('/', function (session) {
session.send('Alec said ' + session.message.text);
});
function status(request,reply){
connector.listen(request.raw.req,request.raw.res);
return reply("ok");
}
if (useEmulator) {
var restify = require('restify');
var server = restify.createServer();
server.listen(8080, function() {
console.log('test bot endpont at http://localhost:8080/api/messages');
});
server.post('/api/messages', connector.listen());
} else {
module.exports = { default: connector.listen() }
}
That is the code use to implement server, as taken from azure bot setup, i edited the port as c9 cant use the default port.
It seems using cloud 9 server would not allow me to send out a response message my solution was to ssh into my own server at which point the app would work as intended.