diff mod_track_muc_joins/mod_track_muc_joins.lua @ 2158:de3fb9d2673c

mod_track_muc_joins: Skip creating room map if leaving a room and it does not exist
author Kim Alvefur <zash@zash.se>
date Wed, 13 Apr 2016 11:53:44 +0200
parents 7d1a22ac2a21
children 463e43dc0c4d
line wrap: on
line diff
--- a/mod_track_muc_joins/mod_track_muc_joins.lua	Wed Apr 13 11:52:51 2016 +0200
+++ b/mod_track_muc_joins/mod_track_muc_joins.lua	Wed Apr 13 11:53:44 2016 +0200
@@ -33,6 +33,7 @@
 			log("debug", "%s room %s", joined and "Joined" or "Left", room);
 			local rooms = session.rooms_joined;
 			if not rooms then
+				if not joined then return; end
 				session.rooms_joined = { [room] = joined };
 			else
 				rooms[room] = joined;