Commit ffe378a3 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Optimization: Only copy presence if room is semi-anonymous. JM-480

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3158 b35dd754-fafc-0310-a699-88a17e54d16e
parent a838d46e
......@@ -575,7 +575,7 @@ public class MUCRoomImpl implements MUCRoom {
if (occupant == joinRole) {
continue;
}
Presence occupantPresence = occupant.getPresence().createCopy();
Presence occupantPresence = occupant.getPresence();
// Skip to the next occupant if we cannot send presence of this occupant
if (hasToCheckRoleToBroadcastPresence()) {
Element frag = occupantPresence.getChildElement("x",
......@@ -588,6 +588,7 @@ public class MUCRoomImpl implements MUCRoom {
// Don't include the occupant's JID if the room is semi-anon and the new occupant
// is not a moderator
if (!canAnyoneDiscoverJID() && MUCRole.Role.moderator != joinRole.getRole()) {
occupantPresence = occupantPresence.createCopy();
Element frag = occupantPresence.getChildElement("x",
"http://jabber.org/protocol/muc#user");
frag.element("item").addAttribute("jid", null);
......
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