Commit 79d5852a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Removed broadcast of messages when occupants join and leave the room. JM-81


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@716 b35dd754-fafc-0310-a699-88a17e54d16e
parent eb40ce72
......@@ -101,8 +101,6 @@ chat.leave={0} has left the room
chat.error.not-supported=Chat client attempted to access unimplemented feature
# Multi User Chat server messages
muc.join={0} has joined the room
muc.leave={0} has left the room
muc.error.not-supported=Chat client attempted to access unimplemented feature
muc.locked=This room is locked from entry until configuration is confirmed.
muc.unlocked=Configuration confirmed: this room is now unlocked.
......
......@@ -502,8 +502,6 @@ public class MUCRoomImpl implements MUCRoom {
// It is assumed that the room is new based on the fact that it's locked and
// it has only one occupants (the owner).
boolean isRoomNew = roomLocked && occupants.size() == 1;
List params = new ArrayList();
params.add(nickname);
try {
// Send the presence of this new occupant to existing occupants
Presence joinPresence = joinRole.getPresence().createCopy();
......@@ -519,10 +517,6 @@ public class MUCRoomImpl implements MUCRoom {
catch (Exception e) {
Log.error(LocaleUtils.getLocalizedString("admin.error"), e);
}
// Send the "user has joined" message only if the presence of the occupant was sent
if (canBroadcastPresence(joinRole.getRoleAsString())) {
serverBroadcast(LocaleUtils.getLocalizedString("muc.join", params));
}
// If the room has just been created send the "room locked until configuration is
// confirmed" message
if (isRoomNew) {
......@@ -596,12 +590,6 @@ public class MUCRoomImpl implements MUCRoom {
presence.setFrom(leaveRole.getRoleAddress());
broadcastPresence(presence);
leaveRole.kick();
List params = new ArrayList();
params.add(nickname);
// Send the "user has left" message only if the presence of the occupant was sent
if (canBroadcastPresence(leaveRole.getRoleAsString())) {
serverBroadcast(LocaleUtils.getLocalizedString("muc.leave", params));
}
}
catch (Exception e) {
Log.error(e);
......
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