aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-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 8c5ea2aa..7e6c9838 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -254,6 +254,10 @@ module:hook("muc-get-history", function (event)
maxstanzas = get_historylength(room);
end
+ if room._history and #room._history >= maxstanzas then
+ return -- It can deal with this itself
+ end
+
-- Load all the data!
local query = {
limit = maxstanzas;