# HG changeset patch # User Kim Alvefur # Date 1529438417 -7200 # Node ID f4e86d2662ecac5b8aea6171a02790e13f79960c # Parent c69f32c9c5760b6869ab72ec045cadf70a11c98a mod_minimix: Handle having received no presence (should not happen) diff -r c69f32c9c576 -r f4e86d2662ec mod_minimix/mod_minimix.lua --- a/mod_minimix/mod_minimix.lua Tue Jun 19 21:59:34 2018 +0200 +++ b/mod_minimix/mod_minimix.lua Tue Jun 19 22:00:17 2018 +0200 @@ -32,8 +32,11 @@ if data:get(username, room_jid, "subject") then module:log("debug", "Already joined to %s as %s", room_jid, nickname); local presences = data:get(username, room_jid, "presence"); - for _, pres in pairs(presences) do - origin.send(st.clone(pres)); + if presences then + -- Joined but no presence? Weird + for _, pres in pairs(presences) do + origin.send(st.clone(pres)); + end end -- FIXME should send ones own presence last local subject = data:get(username, room_jid, "subject");