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

2

6

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.

Ink answered 22/8, 2013 at 10:12 Comment(1)
If you want to store messages while pressing enter, you have to do it yourself by writing the database update code in enter key press handler. OpenFire won't store any chat message history for you.Hemangioma
I
4

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!

Invocate answered 29/8, 2013 at 13:8 Comment(4)
FYI, You must have to install the Monitoring Plugin to get "Archiving" menu :)Rightminded
I have enabled the 'Conversation State Archiving','Message Archiving' and installed 'Monitoring Plugin' but still i am not able to store group chats in 'ofMessageArchive'. Is there any other way to store the group chat in openfire MySQL database.Cirri
Have you any idea for offline group push notifications ? Any plugins for that ? currently messages are stored in normal messaging table unlike person to person messages when other users goes offline those messages are insert into ofoffline table.Allsun
Sorry, not dealing with OpenFire anymore.Invocate
H
1

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!

Hubbard answered 15/4, 2015 at 6:58 Comment(1)
Have you any idea how to send offline notification to offline users in group ? Any plugin you know which does this job ?Allsun

© 2022 - 2024 — McMap. All rights reserved.