Commit 9e056458 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Added room creation date information to the extended room info. JM-98


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@774 b35dd754-fafc-0310-a699-88a17e54d16e
parent 16326e6c
...@@ -11,18 +11,13 @@ ...@@ -11,18 +11,13 @@
package org.jivesoftware.messenger.muc.spi; package org.jivesoftware.messenger.muc.spi;
import java.util.ArrayList; import java.util.*;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import org.dom4j.DocumentHelper; import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
import org.jivesoftware.messenger.JiveGlobals; import org.jivesoftware.messenger.JiveGlobals;
...@@ -74,6 +69,10 @@ import org.xmpp.packet.Presence; ...@@ -74,6 +69,10 @@ import org.xmpp.packet.Presence;
public class MultiUserChatServerImpl extends BasicModule implements MultiUserChatServer, public class MultiUserChatServerImpl extends BasicModule implements MultiUserChatServer,
ServerItemsProvider, DiscoInfoProvider, DiscoItemsProvider, RoutableChannelHandler { ServerItemsProvider, DiscoInfoProvider, DiscoItemsProvider, RoutableChannelHandler {
private static final DateFormat dateFormatter = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
static {
dateFormatter.setTimeZone(TimeZone.getTimeZone("GMT+0"));
}
/** /**
* The time to elapse between clearing of idle chat users. * The time to elapse between clearing of idle chat users.
*/ */
...@@ -879,6 +878,11 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha ...@@ -879,6 +878,11 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
field.addValue(room.getLanguage()); field.addValue(room.getLanguage());
dataForm.addField(field);*/ dataForm.addField(field);*/
field = new XFormFieldImpl("x-muc#roominfo_creationdate");
field.setLabel(LocaleUtils.getLocalizedString("muc.extended.info.creationdate"));
field.addValue(dateFormatter.format(room.getCreationDate()));
dataForm.addField(field);
return dataForm; return dataForm;
} }
} }
......
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