Changeset

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
parents 6450:25d86b0f2147
children 6452:e692ea8c09a0
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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