I am using the odbc
auth_method in my ejabberd and using postgres as my database. I need to see the chat history (messages) made between two users in my database.
Followed these steps:
1) CREATEDB myejabberd;
2) psql myejabberd < /path/to/my/pg.sql
3) CREATE USER ejabberduser;
4) I commented the auth_method: odbc
and enabled auth_method: odbc
.
5) For ODBC configuration, to use postgres i enabled this
odbc_type: pgsql
odbc_server: "localhost"
odbc_database: "myejabberd"
odbc_username: "ejabberduser"
odbc_password: "ejabberd"
6) I tried to run the admin http://localhost:5280/admin
. It works fine and I made some between two users using the Adium.
I can see the registered users in the users
table but i cant able to find out the table where the chat history be stored.
Please help. Thanks
As a default, message history are not stored in the database.
You may want to look into the Message Archive Management (XEP-0313, aka MAM) XMPP extension, supported in ejabberd 15.06.
You can use the mod_mam (Message Archive Management - XEP-0313) module. It works perfect. And dont forget the add the default option as
always
orroster
. By default itsnever