Ejabberd: extract chat history from mysql db

I am creating an ejabberd- based chat system using the iOS client (and XMPPFramework ).

My current chat system only supports individual conversations between users who save chat history in the MySQL database.

To recreate the same chat system, I will need ejabberd to retrieve the chat history from my database so that users do not lose previous conversations when switching to a new chat system.

I would not want to save the client console, since the iOS application can be removed and reinstalled (or the user can switch the device).

Is it possible to create ejabberd to read chat history from my MySQL db?

+6
source share
2 answers

This should be possible with mod_archive_odbc . This is an additional ejabberd module that you can find by checking http://svn.process-one.net/ejabberd-modules/ with SVN. An example of creating and installing a module in Debian can be found here .

+4
source

The question is a bit outdated, but if someone is still interested.

This can be achieved by managing message archives ( http://xmpp.org/extensions/xep-0313.html ).

The most complete implementation of this XEP is in MongooseIM (fork of ejabberd). https://github.com/esl/MongooseIM/blob/master/apps/ejabberd/src/mod_mam.erl

The ProcessOne page claims to support archiving on this page: http://www.process-one.net/en/ejabberd/#getejabberd , but there is no mention on this page: http://www.process-one.net/en/ ejabberd / protocols / . It looks like they are using their special specification.

Please note that you will not be able to use mod_mam from MongooseIM directly with processone ejabberd due to slight differences in the arguments of the functions called by the module.

+3
source

Source: https://habr.com/ru/post/911872/


All Articles