label = "Maximum Number of History Messages Returned by Room";
value = tostring(get_historylength(event.room));
});
-end);
+end, 100-10);
module:hook("muc-config-submitted/muc#roomconfig_historylength", function(event)
if set_historylength(event.room, event.value) then
module:hook("muc-get-history", function(event)
local room = event.room;
- local history = room._data["history"]; -- send discussion history
+ local history = room._history; -- send discussion history
if not history then return nil end
local history_len = #history;
local historic = event.stanza:get_child("body");
if historic then
local room = event.room
- local history = room._data["history"];
- if not history then history = {}; room._data["history"] = history; end
+ local history = room._history;
+ if not history then history = {}; room._history = history; end
local stanza = st.clone(event.stanza);
stanza.attr.to = "";
local ts = gettime();