Commit 68a93783 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Added method #getRoomHistory. JM-40


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@561 b35dd754-fafc-0310-a699-88a17e54d16e
parent c4a4b5bc
...@@ -456,6 +456,13 @@ public interface MUCRoom extends ChatDeliverer { ...@@ -456,6 +456,13 @@ public interface MUCRoom extends ChatDeliverer {
public IQAdminHandler getIQAdminHandler(); public IQAdminHandler getIQAdminHandler();
/**
* Returns the history of the room which includes chat transcripts.
*
* @return the history of the room which includes chat transcripts.
*/
public MUCRoomHistory getRoomHistory();
/** /**
* Returns a collection with the current list of owners. The collection contains the bareJID of * Returns a collection with the current list of owners. The collection contains the bareJID of
* the users with owner affiliation. * the users with owner affiliation.
......
...@@ -1303,15 +1303,6 @@ public class MUCRoomImpl implements MUCRoom { ...@@ -1303,15 +1303,6 @@ public class MUCRoomImpl implements MUCRoom {
public void setSubject(String subject) { public void setSubject(String subject) {
this.subject = subject; this.subject = subject;
// TODO Remove this when persistent room's history gets implemented
// Add the room's subject to the history
if (subject != null && subject.length() > 0) {
Message message = new MessageImpl();
message.setType(Message.GROUP_CHAT);
message.setSubject(subject);
message.setSender(getRole().getRoleAddress());
roomHistory.addMessage(message);
}
} }
public void sendInvitation(String to, String reason, MUCRole senderRole, Session session) public void sendInvitation(String to, String reason, MUCRole senderRole, Session session)
...@@ -1377,6 +1368,10 @@ public class MUCRoomImpl implements MUCRoom { ...@@ -1377,6 +1368,10 @@ public class MUCRoomImpl implements MUCRoom {
return iqAdminHandler; return iqAdminHandler;
} }
public MUCRoomHistory getRoomHistory() {
return roomHistory;
}
public Collection<String> getOwners() { public Collection<String> getOwners() {
return Collections.unmodifiableList(owners); return Collections.unmodifiableList(owners);
} }
......
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