Commit e6e4f0b6 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Small fix.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@717 b35dd754-fafc-0310-a699-88a17e54d16e
parent 79d5852a
...@@ -212,6 +212,7 @@ public class IQAdminHandler { ...@@ -212,6 +212,7 @@ public class IQAdminHandler {
// going to change a role or an affiliation // going to change a role or an affiliation
if (hasJID) { if (hasJID) {
jid = new JID(item.attributeValue("jid")); jid = new JID(item.attributeValue("jid"));
nick = null;
} }
else { else {
// Get the JID based on the requested nick // Get the JID based on the requested nick
...@@ -238,7 +239,7 @@ public class IQAdminHandler { ...@@ -238,7 +239,7 @@ public class IQAdminHandler {
else if ("member".equals(target)) { else if ("member".equals(target)) {
// Add the user as a member of the room based on the bare JID // Add the user as a member of the room based on the bare JID
boolean hadAffiliation = room.getAffiliation(jid.toBareJID()) != MUCRole.NONE; boolean hadAffiliation = room.getAffiliation(jid.toBareJID()) != MUCRole.NONE;
presences.addAll(room.addMember(jid.toBareJID(), null, senderRole)); presences.addAll(room.addMember(jid.toBareJID(), nick, senderRole));
// If the user had an affiliation don't send an invitation. Otherwise // If the user had an affiliation don't send an invitation. Otherwise
// send an invitation if the room is members-only // send an invitation if the room is members-only
if (!hadAffiliation && room.isMembersOnly()) { if (!hadAffiliation && room.isMembersOnly()) {
......
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