Comparison

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
comparison
equal deleted inserted replaced
6250:454ef19e7925 6251:41a5e5205fd9
51 end 51 end
52 52
53 -- finds another session to be the primary (there might not be one) 53 -- finds another session to be the primary (there might not be one)
54 function occupant_mt:choose_new_primary() 54 function occupant_mt:choose_new_primary()
55 for jid, pr in self:each_session() do 55 for jid, pr in self:each_session() do
56 if pr.attr.type ~= "unavailable" then 56 if pr.attr.type == nil then
57 return jid; 57 return jid;
58 end 58 end
59 end 59 end
60 return nil; 60 return nil;
61 end 61 end