Fixes issue with display name event not being fired on Safari/IE

This commit is contained in:
paweldomas 2015-08-14 17:01:59 +02:00
parent 18f03e296b
commit 60afe2d202
1 changed files with 2 additions and 1 deletions

View File

@ -216,7 +216,7 @@ module.exports = function(XMPP, eventEmitter) {
}
var nicktag = $(pres).find('>nick[xmlns="http://jabber.org/protocol/nick"]');
member.displayName = (nicktag.length > 0 ? nicktag.html() : null);
member.displayName = (nicktag.length > 0 ? nicktag.text() : null);
if (from == this.myroomjid) {
if (member.affiliation == 'owner') this.isOwner = true;
@ -626,6 +626,7 @@ module.exports = function(XMPP, eventEmitter) {
if (displayName && displayName.length > 0) {
eventEmitter.emit(XMPPEvents.DISPLAY_NAME_CHANGED, from, displayName);
}
console.info("Display name: " + displayName, pres);
var id = $(pres).find('>userID').text();
var email = $(pres).find('>email');