- fix regex in extracting userid and name from listener

This commit is contained in:
Richard Alam 2011-11-01 17:26:55 -04:00
parent d327c26bfa
commit 22c2a0062e

View File

@ -108,8 +108,7 @@ package org.bigbluebutton.modules.listeners.business
_connectionListener = connectionListener;
}
public function userJoin(userId:Number, cidName:String, cidNum:String,
muted:Boolean, talking:Boolean, locked:Boolean):void {
public function userJoin(userId:Number, cidName:String, cidNum:String, muted:Boolean, talking:Boolean, locked:Boolean):void {
if (! _listeners.hasListener(userId)) {
var n:Listener = new Listener();
n.callerName = cidName != null ? cidName : "<Unknown Caller>";
@ -123,7 +122,7 @@ package org.bigbluebutton.modules.listeners.business
/**
* Let's store the voice userid so we can do push to talk.
*/
var pattern:RegExp = /(\d*)-(\w*)$/;
var pattern:RegExp = /(\d*)-(.*)$/;
var result:Object = pattern.exec(n.callerName);
if (result != null) {
/**
@ -133,9 +132,10 @@ package org.bigbluebutton.modules.listeners.business
UserManager.getInstance().getConference().setMyVoiceUserId(n.userid);
UserManager.getInstance().getConference().muteMyVoice(n.muted);
UserManager.getInstance().getConference().setMyVoiceJoined(true);
}
}
n.callerName = result[2]; /* Store the username */
}
n.callerName = result[2]; /* Store the username */
LogUtil.info(LOGNAME + "Adding listener [" + n.callerName + "," + userId + "]");
_listeners.addListener(n);