1
0
Fork 0

send a message

master
Matthieu Lalonde 14 years ago committed by Mathieu Lecarme
parent f48d119ceb
commit 0588e020da

@ -95,6 +95,14 @@ Client.prototype._debug = function(txt) {
}
};
Client.prototype.message = function(to, message) {
this.xmpp.send(new xmpp.Element('message', {
to: to,
type: 'chat'}).
c('body').
t(message));
};
Client.prototype.iq = function(iq, callback) {
var n = this._iq++;
this._iqCallback[n] = callback;

@ -28,6 +28,7 @@ exports.testClient = function(test) {
c.debug = true;
c.addListener('online', function() {
test.ok(true);
c.message(conf.to, "Beuha de test!");
test.done();
});
};

Loading…
Cancel
Save