plugins/muc/lock.lib: Need to let creator into the locked room :)
[prosody.git] / plugins / muc / lock.lib.lua
index 73dfa1515449fb9532dffb97c4d8b17505542b92..7cf19be3696c63b0b13b8bd98175aba69f70e59b 100644 (file)
@@ -45,7 +45,7 @@ end, 10);
 
 -- Don't let users into room while it is locked
 module:hook("muc-occupant-pre-join", function(event)
-       if is_locked(event.room) then -- Deny entry
+       if not event.is_new_room and is_locked(event.room) then -- Deny entry
                event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found"));
                return true;
        end