diff --git a/src/converse-muc-views.js b/src/converse-muc-views.js index 314ba3f32..fc0e8c9a0 100644 --- a/src/converse-muc-views.js +++ b/src/converse-muc-views.js @@ -960,6 +960,7 @@ this.model.occupants.findWhere({'jid': args[0]}); this.model.setAffiliation('member', [{ 'jid': occupant.get('jid'), + 'nick': occupant.get('nick'), 'reason': args[1] }]).then( () => this.model.occupants.fetchMembers(), diff --git a/src/converse-muc.js b/src/converse-muc.js index 2365147a6..0189b464a 100644 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -543,7 +543,7 @@ * XXX: Prosody doesn't accept multiple JIDs' affiliations * being set in one IQ stanza, so as a workaround we send * a separate stanza for each JID. - * Related ticket: https://prosody.im/issues/issue/795 + * Related ticket: https://issues.prosody.im/345 * * Parameters: * (String) affiliation: The affiliation @@ -701,6 +701,7 @@ .c("query", {xmlns: Strophe.NS.MUC_ADMIN}) .c("item", { 'affiliation': member.affiliation || affiliation, + 'nick': member.nick, 'jid': member.jid }); if (!_.isUndefined(member.reason)) { @@ -810,6 +811,7 @@ }, async registerNickname () { + // See https://xmpp.org/extensions/xep-0045.html#register const nick = this.get('nick'), jid = this.get('jid'); let iq; @@ -829,7 +831,6 @@ } return _converse.log(e, Strophe.LogLevel.ERROR); } - const required_fields = _.map(sizzle('field required', iq), 'parentElement'); if (required_fields.length > 1 || required_fields[0].getAttribute('var') !== 'muc#register_roomnick') { return _converse.log(`Can't register the user register in the groupchat ${jid} due to the required fields`);