aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.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/mod_muc.lua
parentd14f2b82f19d187dcc22eb3a58cec7647900036e (diff)
downloadprosody-8a13710f6f44199de9eb227e5a6401cb0bc45857.tar.gz
prosody-8a13710f6f44199de9eb227e5a6401cb0bc45857.zip
plugins/muc: Add room:has_occupant() method
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r--plugins/muc/mod_muc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index ecc136f1..f0458e16 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -136,7 +136,7 @@ end)
module:hook("muc-occupant-left",function(event)
local room = event.room
- if not next(room._occupants) and not persistent.get(room) then -- empty, non-persistent room
+ if not room:has_occupant() and not persistent.get(room) then -- empty, non-persistent room
module:fire_event("muc-room-destroyed", { room = room });
end
end);