so I have a xmpp account called test@jappix.com (username changed).. I want some help to write a script which will login anonymously to a public xmpp server (say jappix) then the code should send a hello world message to test@jappix.com ... I have written the following lines of code .. but it doesn't seem to work ...
var server = require("http").createServer();
var xmpp = require("node-xmpp");
var client = new xmpp.Client({jid: "jtest@lightwitch.org", password: "xxxxxx"});
client.on("online", function() {
client.send(new xmpp.Element("presence", {type: "chat"}));
client.send(new xmpp.Element("message", {to: "test@jappix.com", type: "chat"}).c("body").t("Testing"));
});
server.listen(5808);