--- a/mod_mam_muc/mod_mam_muc.lua Mon Feb 23 15:45:11 2015 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua Mon Feb 23 16:43:21 2015 -0700
@@ -345,12 +345,14 @@
end
end);
-module:hook("muc-occupant-joined", function (event)
- save_to_history(event.room, st.stanza("presence", { from = event.nick }));
-end);
-module:hook("muc-occupant-left", function (event)
- save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick }));
-end);
+if module:get_option_boolean("muc_log_presences", true) then
+ module:hook("muc-occupant-joined", function (event)
+ save_to_history(event.room, st.stanza("presence", { from = event.nick }));
+ end);
+ module:hook("muc-occupant-left", function (event)
+ save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick }));
+ end);
+end
module:hook("muc-room-destroyed", function(event)
local username = jid_split(event.room.jid);