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

Send role="none" when leaving the room. JM-974

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7089 b35dd754-fafc-0310-a699-88a17e54d16e
parent a4181ab1
...@@ -634,6 +634,16 @@ public class MUCRoomImpl implements MUCRoom { ...@@ -634,6 +634,16 @@ public class MUCRoomImpl implements MUCRoom {
Presence presence = leaveRole.getPresence().createCopy(); Presence presence = leaveRole.getPresence().createCopy();
presence.setType(Presence.Type.unavailable); presence.setType(Presence.Type.unavailable);
presence.setStatus(null); presence.setStatus(null);
// Change (or add) presence information about roles and affiliations
Element childElement = presence.getChildElement("x", "http://jabber.org/protocol/muc#user");
if (childElement == null) {
childElement = presence.addChildElement("x", "http://jabber.org/protocol/muc#user");
}
Element item = childElement.element("item");
if (item == null) {
item = childElement.addElement("item");
}
item.addAttribute("role", "none");
// Inform the leaving user that he/she has left the room // Inform the leaving user that he/she has left the room
leaveRole.send(presence); leaveRole.send(presence);
// Inform the rest of the room occupants that the user has left the room // Inform the rest of the room occupants that the user has left the room
......
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