Diff

plugins/muc/muc.lib.lua @ 6451:385932a83013

plugins/muc/muc.lib: Use occupants iterator instead of assuming pairs
author daurnimator <quae@daurnimator.com>
date Fri, 26 Sep 2014 17:33:38 -0400
parent 6431:540f4e33394a
child 6452:e692ea8c09a0
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Sun Sep 28 03:08:03 2014 +0200
+++ b/plugins/muc/muc.lib.lua	Fri Sep 26 17:33:38 2014 -0400
@@ -96,7 +96,7 @@
 	-- Need to maintain _jid_nick secondary index
 	local old_occupant = self._occupants[id];
 	if old_occupant then
-		for real_jid in pairs(old_occupant.sessions) do
+		for real_jid in old_occupant:each_session() do
 			self._jid_nick[real_jid] = nil;
 		end
 	end