JC Brand il y a 5 ans
Parent
commit
929a00e1cd
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 1 0
      CHANGES.md
  2. 3 4
      src/headless/converse-muc.js

+ 1 - 0
CHANGES.md

@@ -47,6 +47,7 @@
 - #1796: Don't show "back" arrow navigation (on mobile) in the chat header when in `singleton` mode
 - #1821: Errors caused by malformed URLs are now handled
 - #1819: Click on a desktop notification now opens corresponding chat.
+- #1836: MUC invites appear to come from the MUC name
 
 ### Breaking changes
 

+ 3 - 4
src/headless/converse-muc.js

@@ -2212,14 +2212,13 @@ converse.plugins.add('converse-muc', {
                 room_jid = x_el.getAttribute('jid'),
                 reason = x_el.getAttribute('reason');
 
-            let contact = _converse.roster.get(from),
-                result;
-
+            let result;
             if (_converse.auto_join_on_invite) {
                 result = true;
             } else {
                 // Invite request might come from someone not your roster list
-                contact = contact? contact.getDisplayName(): Strophe.getNodeFromJid(from);
+                let contact = _converse.roster.get(from);
+                contact = contact ? contact.getDisplayName(): from;
                 if (!reason) {
                     result = confirm(
                         __("%1$s has invited you to join a groupchat: %2$s", contact, room_jid)