Updates lib-jitsi-meet.js

This commit is contained in:
hristoterezov 2016-01-06 17:02:08 -06:00
parent 29a85b797a
commit 00e606663d
1 changed files with 3 additions and 25 deletions

View File

@ -4927,10 +4927,8 @@ function generateUniqueId() {
} }
function Settings(conferenceID) { function Settings(conferenceID) {
this.email = '';
this.displayName = ''; this.displayName = '';
this.userId; this.userId;
this.language = null;
this.confSettings = null; this.confSettings = null;
this.conferenceID = conferenceID; this.conferenceID = conferenceID;
if (supportsLocalStorage()) { if (supportsLocalStorage()) {
@ -4945,9 +4943,7 @@ function Settings(conferenceID) {
this.save(); this.save();
} }
this.userId = this.confSettings.jitsiMeetId || ''; this.userId = this.confSettings.jitsiMeetId || '';
this.email = this.confSettings.email || '';
this.displayName = this.confSettings.displayname || ''; this.displayName = this.confSettings.displayname || '';
this.language = this.confSettings.language;
} else { } else {
logger.log("local storage is not supported"); logger.log("local storage is not supported");
this.userId = generateUniqueId(); this.userId = generateUniqueId();
@ -4966,27 +4962,12 @@ Settings.prototype.setDisplayName = function (newDisplayName) {
this.save(); this.save();
return this.displayName; return this.displayName;
}, },
Settings.prototype.setEmail = function (newEmail) {
this.email = newEmail;
if(this.confSettings != null)
this.confSettings.email = newEmail;
this.save();
return this.email;
},
Settings.prototype.getSettings = function () { Settings.prototype.getSettings = function () {
return { return {
email: this.email,
displayName: this.displayName, displayName: this.displayName,
uid: this.userId, uid: this.userId
language: this.language
}; };
}, },
Settings.prototype.setLanguage = function (lang) {
this.language = lang;
if(this.confSettings != null)
this.confSettings.language = lang;
this.save();
}
module.exports = Settings; module.exports = Settings;
@ -6333,9 +6314,6 @@ ChatRoom.prototype.onPresence = function (pres) {
case "userId": case "userId":
member.id = node.value; member.id = node.value;
break; break;
case "email":
member.email = node.value;
break;
case "bridgeIsDown": case "bridgeIsDown":
if(!this.bridgeIsDown) { if(!this.bridgeIsDown) {
this.bridgeIsDown = true; this.bridgeIsDown = true;
@ -6388,7 +6366,7 @@ ChatRoom.prototype.onPresence = function (pres) {
logger.info("Ignore focus: " + from + ", real JID: " + member.jid); logger.info("Ignore focus: " + from + ", real JID: " + member.jid);
} }
else { else {
this.eventEmitter.emit(XMPPEvents.MUC_MEMBER_JOINED, from, member.id || member.email, member.nick); this.eventEmitter.emit(XMPPEvents.MUC_MEMBER_JOINED, from, member.id, member.nick);
} }
} else { } else {
// Presence update for existing participant // Presence update for existing participant
@ -6406,7 +6384,7 @@ ChatRoom.prototype.onPresence = function (pres) {
if(!member.isFocus) if(!member.isFocus)
this.eventEmitter.emit(XMPPEvents.USER_ID_CHANGED, from, member.id || member.email); this.eventEmitter.emit(XMPPEvents.USER_ID_CHANGED, from, member.id);
// Trigger status message update // Trigger status message update
if (member.status) { if (member.status) {