aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_muc_mam.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index de59641c..8c5ea2aa 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -246,6 +246,10 @@ module:hook("muc-get-history", function (event)
local since = event.since;
local to = event.to;
+ if maxstanzas == 0 or maxchars == 0 then
+ return -- No history requested
+ end
+
if not maxstanzas or maxstanzas > get_historylength(room) then
maxstanzas = get_historylength(room);
end