24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-14 23:44:18 +02:00
xmpp.chapril.org-ejabberd/src/mod_muc
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
..
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
mod_muc_log.erl Merge branch '2.1.x' into 2.2.x 2011-08-24 18:29:25 +02:00
mod_muc_room.erl Persist muc history on DB on server shutdown (EJABS-1733). 2011-09-24 18:39:03 -03:00
mod_muc_room.hrl Persist muc history on DB on server shutdown (EJABS-1733). 2011-09-24 18:39:03 -03:00
mod_muc.erl Persist muc history on DB on server shutdown (EJABS-1733). 2011-09-24 18:39:03 -03:00