aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_muc_mam.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-03-24 18:16:08 +0100
committerKim Alvefur <zash@zash.se>2018-03-24 18:16:08 +0100
commita4eef2a1a555d1531a69d2380cab3cf4a201d306 (patch)
treead5868bccda6a8fe975d828342e3d0582022e9ce /plugins/mod_muc_mam.lua
parent6b0cf4572ca93ecf1491347f7605a545eaf883e4 (diff)
downloadprosody-a4eef2a1a555d1531a69d2380cab3cf4a201d306.tar.gz
prosody-a4eef2a1a555d1531a69d2380cab3cf4a201d306.zip
mod_muc_mam: Let muc/history.lib decide which messages to store
Diffstat (limited to 'plugins/mod_muc_mam.lua')
-rw-r--r--plugins/mod_muc_mam.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index dfef91c9..8d69e83d 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -334,11 +334,9 @@ local function save_to_history(self, stanza)
end
end
-module:hook("muc-broadcast-message", function (event)
+module:hook("muc-add-history", function (event)
local room, stanza = event.room, event.stanza;
- if stanza:get_child("body") then
- save_to_history(room, stanza);
- end
+ save_to_history(room, stanza);
end);
if module:get_option_boolean("muc_log_presences", true) then