aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/commercial.tex9
-rw-r--r--src/mod_muc/mod_muc_room.erl4
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/commercial.tex b/doc/commercial.tex
index 1c1d1d162..501ddda6a 100644
--- a/doc/commercial.tex
+++ b/doc/commercial.tex
@@ -3389,6 +3389,15 @@ Module options:
and, as a result, nothing is kept in memory. The default value is
\term{20}. This value is global and thus affects all rooms on the
service.
+\titem{\{persistent\_history, false|true\}} \ind{options!persistent\_history}
+ Store recent messages of persistent MUC rooms in the ODBC table 'room\_history'
+ when ejabberd or the MUC service is stopping.
+ Later, when ejabberd is started again, those messages are loaded from the database,
+ and provided as room history when the room occupants join the room.
+ The messages are stored on server shutdown, but if the server crashes
+ the recent history is lost.
+ It is also possible to force the storage immediately by calling the ejabberd
+ command 'persist\_recent\_messages', using ejabberdctl or other method.
\titem{\{max\_users, Number\}} \ind{options!max\_users} This option defines at
the service level, the maximum number of users allowed per
room. It can be lowered in each room configuration but cannot be
diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl
index 77142ee67..b7d11b107 100644
--- a/src/mod_muc/mod_muc_room.erl
+++ b/src/mod_muc/mod_muc_room.erl
@@ -931,8 +931,8 @@ load_history(Host, Room, true, Queue) ->
ejabberd_odbc:escape(Room))
of
{selected,
- [<<"nick">>, <<"packet">>, <<"have_subject">>,
- <<"timestamp">>, <<"size">>],
+ ["nick", "packet", "have_subject",
+ "timestamp", "size"],
Items} ->
?DEBUG("Found ~p messages on history for ~s",
[length(Items), Room]),