Changeset

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 2157:7d1a22ac2a21
children 2160:394a62163a91
files mod_track_muc_joins/mod_track_muc_joins.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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;