powered by Jive Software

Message exchanges between two users

Hi I would like to know when the chat session is established between to users, does the data aka typed message goes through the openfire or it is peer to peer session between the users.

If messages go through openfire, how can I extract the message being sent between the two users at openfire server.

Many thanks

Ashish

All data except filetransfers, audio- and video-chat does through Openfire.

To intercept packets you will need to write a plugin which implements the PacketInterceptor interface. Chat State Notification like “contact is typing” is defined in XEP-0085. You will just need to intercept these packets of type “message”.

Thanks very much for the response. Instead of writing a new plug-in can’t I modify some code in openfire to grab the message and re-compile the server. I think openfire would also be getting the message and sending it to other user. Please suggest.

Instead of writing a new plug-in can’t I modify some code in openfire to grab the message and re-compile the server.
Yes, you could. However, writing a plugin is easier, more transparent code, easier to maintain if a new version of Openfire is released, …

Simply take one of the official plugins as example, throw away all stuff you don’t need, rename packets and classes, done.