Your ROOT_URL in app.ini is unix://git.lalonde.me:3000/ but you are visiting https://git.lalonde.me/matth/node-xmpp-client/commit/81d13189a171b4420b32c3d5adeeb5fa3afa8d57
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
16 additions and
9 deletions
@ -160,9 +160,9 @@ Client.prototype.message = function(to, message) {
Client . prototype . askForRoster = function ( callback ) {
var jabber = this ;
this . iq ( new xmpp . Element ( 'query' , { xmlns : 'jabber:iq:roster' } ) , function ( iq ) {
iq . getChild ( 'query' , 'jabber:iq:roster' ) . children . forEach ( function ( child ) {
iq . getChild ( 'query' , 'jabber:iq:roster' ) . getChildren( 'item' ) . forEach ( function ( child ) {
jabber . roster [ child . attrs . jid ] = {
name : child . attrs . name ,
name : child . attrs . jid ,
subscription : child . attrs . subscription } ;
} ) ;
if ( callback != null ) {
@ -260,10 +260,12 @@ Room.prototype.presence = function() {
Room . prototype . message = function ( message ) {
this . client . xmpp . send ( new xmpp . Element ( 'message' , {
to : this . to ,
type : 'groupchat' } )
to : this . room ,
type : 'groupchat' ,
id : this . client . _iq ++
} )
// .c('nick', {xmlns: 'http://jabber.org/protocol/nick'}).t(this.client.jid.username).up()
. c ( 'body' ) . t ( message ) . up ( )
// .c('nick', {xmlns: 'http://jabber.org/protocol/nick'}).t(this.client.jid.username)
. tree ( )
) ;
} ;
@ -48,14 +48,20 @@ exports.testClient = function(test) {
* /
exports . testRoom = function ( test ) {
test . expect ( 1 ) ;
//test.expect(1);
var ROOM = 'mushroom@conference.' + conf . b . jid . split ( '@' ) [ 1 ] ;
var MESSAGE = "Hello everybody" ;
var b = new Client ( conf . b , function ( ) {
sys . debug ( 'b is connected' . red ) ;
sys . debug ( ( 'enter in ' + ROOM ) . green ) ;
//console.log(sys.inspect(this, true, null));
var b _room = b . room ( ROOM , function ( status ) {
var a = new Client ( conf . a , function ( ) {
this . addListener ( 'message' , function ( from , msg , stanza ) {
sys . debug ( msg . yellow ) ;
test . done ( ) ;
} ) ;
this . message ( MESSAGE ) ;
/ * v a r a = n e w C l i e n t ( c o n f . a , f u n c t i o n ( ) {
sys . debug ( 'a is connected' . green ) ;
var a _room = a . room ( ROOM , function ( status ) {
sys . debug ( status ) ;
@ -69,8 +75,7 @@ exports.testRoom = function(test) {
} ) ;
b _room . message ( MESSAGE ) ;
} ) ;
} ) ;
} ) ; * /
} ) ;
} ) ;
} ;