Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
6450:25d86b0f2147 | 6451:385932a83013 |
---|---|
94 local id = occupant.nick | 94 local id = occupant.nick |
95 | 95 |
96 -- Need to maintain _jid_nick secondary index | 96 -- Need to maintain _jid_nick secondary index |
97 local old_occupant = self._occupants[id]; | 97 local old_occupant = self._occupants[id]; |
98 if old_occupant then | 98 if old_occupant then |
99 for real_jid in pairs(old_occupant.sessions) do | 99 for real_jid in old_occupant:each_session() do |
100 self._jid_nick[real_jid] = nil; | 100 self._jid_nick[real_jid] = nil; |
101 end | 101 end |
102 end | 102 end |
103 | 103 |
104 local has_live_session = false | 104 local has_live_session = false |