Permalink
Browse files

refactoring

  • Loading branch information...
1 parent 8b41318 commit 2ffd18bd26101ed1377b8e8b632be6c017b91ec2 @loxs committed Nov 19, 2010
Showing with 3 additions and 4 deletions.
  1. +0 −1 config.dist.js
  2. +3 −3 minijab.js
View
@@ -1,4 +1,3 @@
MINIJAB.anonymous_domain = 'example.com'; //appended to username to form jid like user@example.com
MINIJAB.conference = 'conference.example.com';
MINIJAB.bosh_url = '/jabber';
-MINIJAB.jid = "somebody@example.com";
View
@@ -60,8 +60,8 @@ MINIJAB.showLoginDialog = function(message){
buttons: {
"Connect": function(){
MINIJAB.userIdent = $('#anonymous_login').val();
- MINIJAB.anonymousJ = Sha1.hash(MINIJAB.userIdent).substring(0,12);
- MINIJAB.anonymousJid = MINIJAB.anonymousJ + '@' + MINIJAB.anonymous_domain;
+ MINIJAB.anonymousNode = Sha1.hash(MINIJAB.userIdent).substring(0,12);
+ MINIJAB.anonymousJid = MINIJAB.anonymousNode + '@' + MINIJAB.anonymous_domain;
MINIJAB.anonymousJid += '/minijab';
$(document).trigger('connect', {jid: MINIJAB.anonymousJid, password: ''});
$(this).dialog('close');
@@ -130,7 +130,7 @@ MINIJAB.connected = function(){
MINIJAB.connection.addHandler(MINIJAB.handlePresence, null, "presence");
MINIJAB.connection.send($pres());
$('#connStatusIndicator').html('Connected');
- var roomJid = 'support' + '@' + MINIJAB.conference;
+ var roomJid = MINIJAB.anonymousNode + '@' + MINIJAB.conference;
MINIJAB.mucRooms.push(roomJid);
MINIJAB.joinRoom(roomJid + '/' + MINIJAB.userIdent);
$('#channels').tabs("remove", 0);

0 comments on commit 2ffd18b

Please sign in to comment.