Skip to content

Instantly share code, notes, and snippets.

@whoahbot
Created April 22, 2009 05:43
Show Gist options
  • Save whoahbot/99611 to your computer and use it in GitHub Desktop.
Save whoahbot/99611 to your computer and use it in GitHub Desktop.
function sendMsg(message) {
try {
var aMsg = new JSJaCMessage();
aMsg.setTo(new JSJaCJID("#[email protected]/whoahbot"));
aMsg.setType('groupchat');
aMsg.setBody(message);
con.send(aMsg);
} catch (e) {
$('#chat').html("<div class='msg error''>Error: "+ e.message +"</div>");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment