Commit c41ff947 authored by Armando Jagucki's avatar Armando Jagucki Committed by ajagucki

JM-1426: ClearspaceMUCTranscriptManager should not be recording events from...

JM-1426: ClearspaceMUCTranscriptManager should not be recording events from any conference service other than the designated Clearspace conference service.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10656 b35dd754-fafc-0310-a699-88a17e54d16e
parent 8188f631
......@@ -210,13 +210,13 @@ public class ClearspaceMUCTranscriptManager implements MUCEventListener {
}
public void occupantJoined(JID roomJID, JID user, String nickname) {
if (!isRoomOwner(roomJID, user)) {
if (isClearspaceRoom(roomJID) && !isRoomOwner(roomJID, user)) {
addGroupChatEvent(ClearspaceMUCTranscriptEvent.occupantJoined(roomJID, user, new Date().getTime()));
}
}
public void occupantLeft(JID roomJID, JID user) {
if (!isRoomOwner(roomJID, user)) {
if (isClearspaceRoom(roomJID) && !isRoomOwner(roomJID, user)) {
addGroupChatEvent(ClearspaceMUCTranscriptEvent.occupantLeft(roomJID, user, new Date().getTime()));
}
}
......@@ -226,14 +226,14 @@ public class ClearspaceMUCTranscriptManager implements MUCEventListener {
}
public void messageReceived(JID roomJID, JID user, String nickname, Message message) {
if (!isRoomOwner(roomJID, user)) {
if (isClearspaceRoom(roomJID) && !isRoomOwner(roomJID, user)) {
addGroupChatEvent(ClearspaceMUCTranscriptEvent.messageReceived(roomJID, user, message.getBody(),
new Date().getTime()));
}
}
public void roomSubjectChanged(JID roomJID, JID user, String newSubject) {
if (!isRoomOwner(roomJID, user)) {
if (isClearspaceRoom(roomJID) && !isRoomOwner(roomJID, user)) {
addGroupChatEvent(ClearspaceMUCTranscriptEvent.roomSubjectChanged(roomJID, user, newSubject,
new Date().getTime()));
}
......@@ -249,6 +249,10 @@ public class ClearspaceMUCTranscriptManager implements MUCEventListener {
return room != null && room.getOwners().contains(user.toBareJID());
}
private boolean isClearspaceRoom(JID roomJID) {
return roomJID.getDomain().equals(csMucDomain);
}
/**
* Queues the group chat event to be later sent to Clearspace.
*
......
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