I am working on a project that sends messages to an OpenFire group chat, and I have come across a slight problem. If I send a message that contains e.g. a HTML link in XHTML, only the text-only version is persisted in the OpenFire database.
All the other users in the chat receive the XHTML version at first, but when logging out of the chat and logging in again, this may or may not be in XHTML. It all seems to depend on whether or not the message is still in the OpenFire cache. If it has to fetch it from the database, the XHTML is stripped out.
I realize this may be the way the system is intended to work, and that XHTML adds more processing and network traffic, but I still find the behaviour slightly inconsistent.
I have tested this on OpenFire 3.6.4, running both Pidgin 2.5.5 and my own bot (using Smack 3.1.0), and the results are the same. I can reproduce it the following way:
- Send an XHTML message to a group chat.
- Wait 300 seconds for the data to be flushed to the DB.
- Restart OpenFire.
- Join the group chat again using Pidgin, and take a look at the retrieved history. The XHTML version is not there anymore.
If there are any tricks to get this working, I’d be very happy