Selaa lähdekoodia

Converse ryzen 894 (#895)

* added change #894

* #894 - fix jid comparison in setAffiliationAndRole
Antonio Zoccoli 8 vuotta sitten
vanhempi
commit
ad06c2b9cc
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 0
      CHANGES.md
  2. 1 1
      src/converse-muc.js

+ 1 - 0
CHANGES.md

@@ -22,6 +22,7 @@
 - #754 Show unread messages next to roster contacts. [jcbrand]
 - #754 Show unread messages next to roster contacts. [jcbrand]
 - #864 Remove all inline CSS to comply with strict Content-Security-Policy headers [mathiasertl]
 - #864 Remove all inline CSS to comply with strict Content-Security-Policy headers [mathiasertl]
 - #873 Inconsistent unread messages count updating [novokrest]
 - #873 Inconsistent unread messages count updating [novokrest]
+- #894 Room affiliation lost when connection jid and room presence jid are of different case [Rayzen]
 
 
 ## 3.0.2 (2017-04-23)
 ## 3.0.2 (2017-04-23)
 
 

+ 1 - 1
src/converse-muc.js

@@ -1717,7 +1717,7 @@
                     var item = sizzle('x[xmlns="'+Strophe.NS.MUC_USER+'"] item', pres).pop();
                     var item = sizzle('x[xmlns="'+Strophe.NS.MUC_USER+'"] item', pres).pop();
                     if (_.isNil(item)) { return; }
                     if (_.isNil(item)) { return; }
                     var jid = item.getAttribute('jid');
                     var jid = item.getAttribute('jid');
-                    if (Strophe.getBareJidFromJid(jid) === _converse.bare_jid) {
+                    if (Strophe.getBareJidFromJid(jid).toLowerCase() === _converse.bare_jid.toLowerCase()) {
                         var affiliation = item.getAttribute('affiliation');
                         var affiliation = item.getAttribute('affiliation');
                         var role = item.getAttribute('role');
                         var role = item.getAttribute('role');
                         if (affiliation) {
                         if (affiliation) {