Use getDisplayName for roster contacts

This commit is contained in:
JC Brand 2019-06-03 07:58:13 +02:00
parent 1fb5378524
commit 5738b3748a
2 changed files with 2 additions and 2 deletions

View File

@ -2094,7 +2094,7 @@ converse.plugins.add('converse-muc-views', {
return;
}
form.addEventListener('submit', this.inviteFormSubmitted.bind(this), false);
const list = _converse.roster.map(i => ({'label': i.get('fullname') || i.get('jid'), 'value': i.get('jid')}));
const list = _converse.roster.map(i => ({'label': i.getDisplayName(), 'value': i.get('jid')}));
const el = this.el.querySelector('.suggestion-box').parentElement;
if (this.invite_auto_complete) {

View File

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