Commit 8df2f743 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Refactoring fixes.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@689 b35dd754-fafc-0310-a699-88a17e54d16e
parent e6b0e3f4
......@@ -50,8 +50,8 @@ public final class MUCRoomHistory {
public void addMessage(Message packet) {
// Don't keep messages whose sender is the room itself (thus address without resource)
// unless the message is changing the room's subject
if ((packet.getFrom() == null
|| packet.getFrom().toString().length() == 0) &&
if ((packet.getFrom() == null || packet.getFrom().toString().length() == 0 ||
packet.getFrom().equals(room.getRole().getRoleAddress())) &&
packet.getSubject() == null) {
return;
}
......
......@@ -127,7 +127,8 @@ public class MUCRoleImpl implements MUCRole {
public void setPresence(Presence newPresence) {
this.presence = newPresence;
if (extendedInformation != null) {
presence.getElement().add(extendedInformation.createCopy());
extendedInformation.setParent(null);
presence.getElement().add(extendedInformation);
}
}
......
......@@ -1456,7 +1456,7 @@ public class MUCRoomImpl implements MUCRoom {
if (actorJID != null && actorJID.toString().length() > 0) {
Element frag = kickPresence.getChildElement(
"x", "http://jabber.org/protocol/muc#user");
frag.element("item").addElement("actor").addAttribute("jid", actorJID.toString());
frag.element("item").addElement("actor").addAttribute("jid", actorJID.toBareJID());
}
// Send the unavailable presence to the banned user
kickedRole.send(kickPresence);
......
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