Commit 929a00e1 authored by JC Brand's avatar JC Brand

Fixes #1836

parent 851930f9
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
- #1796: Don't show "back" arrow navigation (on mobile) in the chat header when in `singleton` mode - #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 - #1821: Errors caused by malformed URLs are now handled
- #1819: Click on a desktop notification now opens corresponding chat. - #1819: Click on a desktop notification now opens corresponding chat.
- #1836: MUC invites appear to come from the MUC name
### Breaking changes ### Breaking changes
......
...@@ -2212,14 +2212,13 @@ converse.plugins.add('converse-muc', { ...@@ -2212,14 +2212,13 @@ converse.plugins.add('converse-muc', {
room_jid = x_el.getAttribute('jid'), room_jid = x_el.getAttribute('jid'),
reason = x_el.getAttribute('reason'); reason = x_el.getAttribute('reason');
let contact = _converse.roster.get(from), let result;
result;
if (_converse.auto_join_on_invite) { if (_converse.auto_join_on_invite) {
result = true; result = true;
} else { } else {
// Invite request might come from someone not your roster list // 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) { if (!reason) {
result = confirm( result = confirm(
__("%1$s has invited you to join a groupchat: %2$s", contact, room_jid) __("%1$s has invited you to join a groupchat: %2$s", contact, room_jid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment