aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-04-29 12:54:04 -0400
committerdaurnimator <quae@daurnimator.com>2014-04-29 12:54:04 -0400
commit8a13710f6f44199de9eb227e5a6401cb0bc45857 (patch)
tree2cbf503c4f484dc91927f0c718eea34913c6bb31 /plugins/muc/muc.lib.lua
parentd14f2b82f19d187dcc22eb3a58cec7647900036e (diff)
downloadprosody-8a13710f6f44199de9eb227e5a6401cb0bc45857.tar.gz
prosody-8a13710f6f44199de9eb227e5a6401cb0bc45857.zip
plugins/muc: Add room:has_occupant() method
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 6aca5c62..7c039ce3 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -79,6 +79,10 @@ do
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