Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we store chat conversations on MySQL database? XMPP Openfire

I am building a web chat application. I want to store the messages or conversations between two parties after every press of "Enter" button. I am using Openfire Server, and MySQL database. I don't see any tables from the database that stores the conversations.

Is there a plugins for that? thanks. I am using strophe js library to send messages. Thanks.

like image 267
leeshin Avatar asked Aug 22 '13 10:08

leeshin


2 Answers

Conversations are only stored if the 'Conversation State Archiving' is enabled under Server-->Archiving-->Archiving Settings in your Openfire Admin Console, and 'Message Archiving' is enabled for either 'Archive one-to-one chats' and/or 'Archive group chats'. Thereafter, the messages are stored in the MySQL database table 'ofMessageArchive'.

This table contains an incrementally updated 'conversationID', UNIX timestamp, and JIDs of conversation participants.

Hope this helps!

like image 137
Radix Avatar answered Oct 16 '22 12:10

Radix


You need a plug n for that "Monitoring Services" available under Plugin tab in your admin console. Install that plugin and boom, you are ready to go!

like image 22
Sonal Avatar answered Oct 16 '22 10:10

Sonal