Diff

mod_mam_muc/mod_mam_muc.lua @ 2427:e5795f5f7a7b

mod_mam_muc: More room JID variable renaming for more consistency
author Kim Alvefur <zash@zash.se>
date Thu, 22 Dec 2016 16:16:39 +0100
parent 2426:deedb77c4f96
child 2428:06e3b0ef8bdf
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua	Thu Dec 22 13:40:24 2016 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua	Thu Dec 22 16:16:39 2016 +0100
@@ -354,7 +354,7 @@
 
 -- Handle messages
 function save_to_history(self, stanza)
-	local room = jid_split(self.jid);
+	local room_node = jid_split(self.jid);
 
 	-- Policy check
 	if not logging_enabled(self) then return end -- Don't log
@@ -364,7 +364,7 @@
 	if stanza.attr.type then
 		with = with .. "<" .. stanza.attr.type
 	end
-	archive:append(room, nil, stanza, time_now(), with);
+	archive:append(room_node, nil, stanza, time_now(), with);
 end
 
 module:hook("muc-broadcast-message", function (event)
@@ -384,8 +384,8 @@
 end
 
 module:hook("muc-room-destroyed", function(event)
-	local username = jid_split(event.room.jid);
-	archive:delete(username);
+	local room_node = jid_split(event.room.jid);
+	archive:delete(room_node);
 end);
 
 -- TODO should we perhaps log presence as well?