Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Some chat clients already implement this. For example, one of the most popular chat clients for OSX, Adium, requests only the messages since the datetime of the user's last viewed message. Unfortunately this does not work with Openfire.
Openfire should honor such client requests to limit history. A request would look something like:
Use javax.xml.bind.DataConverter, which also handles xsd:datetime (which I believe is covers the use cases). I don't know if it is theadsafe or not).
Make the current solution use finer grain synchronization (at the formatter level).
The current solution is synchronizing at the instance level which causes a dozen or so lines of code in parseString() to be synchronized when only the 1 lines actually doing the parsing requires it. As this is running on a server, synchronized code blocks should be kept to the bare minimum required to prevent bottlenecks.
Robin Collier February 4, 2013 at 3:57 AM
You may want to take a look at StringUtils in Smack. It has handling added for all profiles of XEP-0082 and XEP-0091.
Florian Schmaus February 3, 2013 at 10:20 PM
The feature is already there. The problem is that openfire doesn't not completely implement XEP-0082. I started a patch that adds full XEP-0082 support to openfire ( https://github.com/Flowdalic/openfire ).
According to the XMPP MUC (multi-user chat) standard, the way to do this is by allowing the client to ask for a specific time-window of messages (http://xmpp.org/extensions/xep-0045.html#enter-managehistory).
Some chat clients already implement this. For example, one of the most popular chat clients for OSX, Adium, requests only the messages since the datetime of the user's last viewed message. Unfortunately this does not work with Openfire.
Openfire should honor such client requests to limit history. A request would look something like:
<presence from="user@server.net/nick" to="room@conference.server.net/nick">
<x xmlns='http://jabber.org/protocol/muc'>
<history since='20121112T16:00:20Z'/>
</x>
</presence>