aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/muc/history.lib.lua3
-rw-r--r--plugins/muc/mod_muc.lua2
-rw-r--r--plugins/muc/muc.lib.lua2
3 files changed, 2 insertions, 5 deletions
diff --git a/plugins/muc/history.lib.lua b/plugins/muc/history.lib.lua
index 596f92da..1c14cf84 100644
--- a/plugins/muc/history.lib.lua
+++ b/plugins/muc/history.lib.lua
@@ -11,7 +11,8 @@ local gettime = os.time;
local datetime = require "util.datetime";
local st = require "util.stanza";
-local default_history_length, max_history_length = 20, math.huge;
+local default_history_length = 20;
+local max_history_length = module:get_option_number("max_history_messages", math.huge);
local function set_max_history_length(_max_history_length)
max_history_length = _max_history_length or math.huge;
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index d7d3ac37..91b69829 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -33,8 +33,6 @@ local hosts = prosody.hosts;
rooms = {};
local rooms = rooms;
--- Configurable options
-muclib.set_max_history_length(module:get_option_number("max_history_messages"));
module:depends("disco");
module:add_identity("conference", "text", module:get_option_string("name", "Prosody Chatrooms"));
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 7c039ce3..27d738de 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1114,8 +1114,6 @@ room_mt.set_historylength = history.set_length;
local _M = {}; -- module "muc"
-_M.set_max_history_length = history.set_max_length;
-
function _M.new_room(jid, config)
return setmetatable({
jid = jid;