Diff

plugins/muc/occupant.lib.lua @ 6251:41a5e5205fd9

plugins/muc/occupant: Check for type == nil rather than type ~= unavailable
author daurnimator <quae@daurnimator.com>
date Mon, 19 May 2014 13:47:28 -0400
parent 6210:e9d62fff82a8
child 6271:006b0e0f0de2
line wrap: on
line diff
--- 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