Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 6237:a58685df9d16
plugins/muc: Add room:has_occupant() method
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Tue, 29 Apr 2014 12:54:04 -0400 |
parent | 6231:bc12a8253f94 |
child | 6240:641756a6a5f7 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Mon Apr 28 16:31:21 2014 -0400 +++ b/plugins/muc/muc.lib.lua Tue Apr 29 12:54:04 2014 -0400 @@ -79,6 +79,10 @@ end end +function room_mt:has_occupant() + return next(self._occupants, nil) ~= nil +end + function room_mt:get_occupant_by_real_jid(real_jid) local occupant_jid = self:get_occupant_jid(real_jid); if occupant_jid == nil then return nil end