How to use MongoDB to store ejabberd messages?

I use ejabberdas a server XMPP. But I want to store messages that pass through the server, as well as when the message was sent and to whom and to whom. I was looking for her, but could not find how to do it. Help?

+5
source share
1 answer

You probably need to write a hook in Erlang. See the ejabberd documentation for events and hooks . In particular, these are:

user_send_packet(From, To, Packet) -> ok

erlang mongodb. "" / " ", PHP/Python/Ruby script, mongodb. , .

, .

: mongodb-erlang Erlang

PS: -, eJabberd. .

+2

All Articles