Software /
code /
prosody
Diff
plugins/muc/mod_muc.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 | 6236:ee996e679f15 |
child | 6238:b2b523d21891 |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Mon Apr 28 16:31:21 2014 -0400 +++ b/plugins/muc/mod_muc.lua Tue Apr 29 12:54:04 2014 -0400 @@ -136,7 +136,7 @@ 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);