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/69041e4c0702616dd999b03c99147e4eafaaed23?style=unified&whitespace=show-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
6 additions and
20 deletions
@ -2,25 +2,11 @@ var sys = require('sys'),
xmpp = require ( 'xmpp' ) ,
events = require ( 'events' ) ;
var Jid = function ( plain ) {
var tmp = plain . split ( '/' ) ;
this . resource = ( tmp . length == 1 ) ? 'node' : tmp [ 1 ] ;
tmp = tmp [ 0 ] . split ( '@' ) ;
this . node = tmp [ 0 ] ;
this . domain = tmp [ 1 ] ;
} ;
exports . Jid = Jid ;
Jid . prototype . toString = function ( ) {
return this . node + '@' + this . domain + '/' + this . resource ;
} ;
var Client = function ( _jid , password , host ) {
events . EventEmitter . call ( this ) ;
this . debug = true ;
var jabber = this ;
this . jid = new Jid ( _jid ) ;
this . jid = new xmpp . JID ( _jid ) ;
this . host = ( host == null ) ? this . jid . domain : host ;
this . rooms = { } ;
this . _iq = 0 ;
@ -1,17 +1,17 @@
var sys = require ( 'sys' ) ,
colors = require ( 'colors' ) ,
Client = require ( '../lib/xmpp-client' ) . Client ,
J id = require ( '../lib/xmpp-client' ) . Jid ,
J ID = require ( 'xmpp' ) . JID ,
conf = require ( './conf' ) . conf ;
exports . testJid = function ( test ) {
test . expect ( 4 ) ;
var j = new J id ( 'mathieu@gtalk.com' ) ;
var j = new J ID ( 'mathieu@gtalk.com' ) ;
//sys.debug(JSON.stringify(j));
test . equals ( 'mathieu' , j . node ) ;
test . equals ( 'mathieu' , j . user ) ;
test . equals ( 'gtalk.com' , j . domain ) ;
test . equals ( 'node' , j . resource ) ;
j = new J id ( 'mathieu@jabber.org/machin' ) ;
test . equals ( null , j . resource ) ;
j = new J ID ( 'mathieu@jabber.org/machin' ) ;
//sys.debug(JSON.stringify(j));
test . equals ( 'machin' , j . resource ) ;
test . done ( ) ;