comparison 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
comparison
equal deleted inserted replaced
2157:7d1a22ac2a21 2158:de3fb9d2673c
31 log("debug", "Status code %d", status.attr.code); 31 log("debug", "Status code %d", status.attr.code);
32 if status.attr.code == "110" then 32 if status.attr.code == "110" then
33 log("debug", "%s room %s", joined and "Joined" or "Left", room); 33 log("debug", "%s room %s", joined and "Joined" or "Left", room);
34 local rooms = session.rooms_joined; 34 local rooms = session.rooms_joined;
35 if not rooms then 35 if not rooms then
36 if not joined then return; end
36 session.rooms_joined = { [room] = joined }; 37 session.rooms_joined = { [room] = joined };
37 else 38 else
38 rooms[room] = joined; 39 rooms[room] = joined;
39 end 40 end
40 return; 41 return;