# HG changeset patch # User daurnimator # Date 1400521648 14400 # Node ID 41a5e5205fd9dd86cffe183948f1d4397a597d51 # Parent 454ef19e7925738426f81385854e6275e66303d9 plugins/muc/occupant: Check for type == nil rather than type ~= unavailable diff -r 454ef19e7925 -r 41a5e5205fd9 plugins/muc/occupant.lib.lua --- a/plugins/muc/occupant.lib.lua Mon May 19 13:40:54 2014 -0400 +++ b/plugins/muc/occupant.lib.lua Mon May 19 13:47:28 2014 -0400 @@ -53,7 +53,7 @@ -- finds another session to be the primary (there might not be one) function occupant_mt:choose_new_primary() for jid, pr in self:each_session() do - if pr.attr.type ~= "unavailable" then + if pr.attr.type == nil then return jid; end end