Refactor so that nick-deduplication takes VCard nick into account
Updates #968
This commit is contained in:
parent
3849f56270
commit
adad60e298
|
@ -7,6 +7,7 @@
|
|||
- #161 XEP-0363: HTTP File Upload
|
||||
- #194 Include entity capabilities in outgoing presence stanzas
|
||||
- #337 API call to update a VCard
|
||||
- #968 Use nickname from VCard when joining a room
|
||||
- #1094 Show room members who aren't currently online
|
||||
- It's now also possible to edit your VCard via the UI
|
||||
- Automatically grow/shrink input as text is entered/removed
|
||||
|
|
|
@ -1106,13 +1106,9 @@
|
|||
},
|
||||
|
||||
onNickNameNotFound (message) {
|
||||
const nick = _converse.xmppstatus.vcard.get('nickname');
|
||||
const nick = this.getDefaultNickName();
|
||||
if (nick) {
|
||||
this.join(nick);
|
||||
} else if (_converse.muc_nickname_from_jid) {
|
||||
// We try to enter the room with the node part of
|
||||
// the user's JID.
|
||||
this.join(this.getDefaultNickName());
|
||||
} else {
|
||||
this.renderNicknameForm(message);
|
||||
}
|
||||
|
@ -1124,7 +1120,12 @@
|
|||
* We put this in a separate method so that it can be
|
||||
* overridden by plugins.
|
||||
*/
|
||||
return Strophe.unescapeNode(Strophe.getNodeFromJid(_converse.bare_jid));
|
||||
const nick = _converse.xmppstatus.vcard.get('nickname');
|
||||
if (nick) {
|
||||
return nick;
|
||||
} else if (_converse.muc_nickname_from_jid) {
|
||||
return Strophe.unescapeNode(Strophe.getNodeFromJid(_converse.bare_jid));
|
||||
}
|
||||
},
|
||||
|
||||
onNicknameClash (presence) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user