From ae461b42728b11d7e241ca26c6cded24b6bb0d6f Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 19 May 2014 13:47:28 -0400 Subject: plugins/muc/occupant: Check for type == nil rather than type ~= unavailable --- plugins/muc/occupant.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc') diff --git a/plugins/muc/occupant.lib.lua b/plugins/muc/occupant.lib.lua index 5cecb139..6a3f7df4 100644 --- a/plugins/muc/occupant.lib.lua +++ b/plugins/muc/occupant.lib.lua @@ -53,7 +53,7 @@ end -- 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 -- cgit v1.2.3