/** * Destroys the given <tt>ChatRoom</tt> from the list of all chat rooms. * * @param chatRoomWrapper the <tt>ChatRoomWrapper</tt> to be destroyed. * @param reason the reason for destroying. * @param alternateAddress the alternate address. */ public void destroyChatRoom( ChatRoomWrapper chatRoomWrapper, String reason, String alternateAddress) { if (chatRoomWrapper.getChatRoom().destroy(reason, alternateAddress)) { MUCActivator.getUIService().closeChatRoomWindow(chatRoomWrapper); chatRoomList.removeChatRoom(chatRoomWrapper); } else { // if we leave a chat room which is not persistent // the room can be destroyed on the server, and error is returned // when we try to destroy it not-authorized(401) if (!chatRoomWrapper.getChatRoom().isPersistent() && !chatRoomWrapper.getChatRoom().isJoined()) { chatRoomList.removeChatRoom(chatRoomWrapper); } } }
/** * Removes the given <tt>ChatRoom</tt> from the list of all chat rooms. * * @param chatRoomWrapper the <tt>ChatRoomWrapper</tt> to remove */ public void removeChatRoom(ChatRoomWrapper chatRoomWrapper) { chatRoomList.removeChatRoom(chatRoomWrapper); }