Przeglądaj źródła

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

master
paweldomas 10 lat temu
rodzic
commit
60afe2d202
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2
    1
      modules/xmpp/strophe.emuc.js

+ 2
- 1
modules/xmpp/strophe.emuc.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz