24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-14 23:44:18 +02:00
xmpp.chapril.org-ejabberd/src/odbc
Pablo Polvorin 1babae067d Persist muc history on DB on server shutdown (EJABS-1733).
Ejabberd can be configured to store recent history of MUCs
to DB before shutdown. On restart, those messages are
retrieved from storage.

To enable it, set {persist_history, true} in mod_muc configuration,
ej:
  {mod_muc,      [
                  %%{host, "conference.@HOST@"},
                  {access, muc},
                  {access_create, muc_create},
                  {access_persistent, muc_create},
                  {access_admin, muc_admin},
                  {persist_history, true}
                 ]},

Messages are only stored on server shutdown, not on the fly.

$ejabberdctl stop
or
init:stop()
inside a debug console works.

Note: Only rooms configured as "persistent" will save messages
      (as other rooms doesn't survive server restart anyway).

Limitations: There is no option to store messages on mnesia, you *must*
     use a ODBC database.  Only tested with mysql.

Check odbc/mysql.sql  for the definition of the table "room_history",
the one needed for this.
2011-09-24 18:39:03 -03:00
..
ejabberd_odbc_sup.erl update copyright up to 2011 2011-02-14 13:50:55 +01:00
ejabberd_odbc.erl Merge remote branch 'mainline/2.1.x' into 2.2.x 2011-02-14 13:54:06 +01:00
Makefile.in Add +export_all to EFLAGS if: make debug=true (thanks to Marcin Owsiany)(EJAB-1134) 2009-12-29 19:10:52 +00:00
Makefile.win32 * src/*/Makefile.win32: Provide explicit beam filenames because 2008-09-30 16:12:05 +00:00
mssql2000.sql Try to improve support for roster_version in MSSQL (EJAB-1437) 2011-04-14 23:11:37 +02:00
mssql2005.sql Try to improve support for roster_version in MSSQL (EJAB-1437) 2011-04-14 23:11:37 +02:00
mysql.sql Persist muc history on DB on server shutdown (EJABS-1733). 2011-09-24 18:39:03 -03:00
odbc_queries.erl Persist muc history on DB on server shutdown (EJABS-1733). 2011-09-24 18:39:03 -03:00
pg.sql update copyright up to 2011 2011-02-14 13:50:55 +01:00