aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/password.lib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/password.lib.lua')
-rw-r--r--plugins/muc/password.lib.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua
index 48486d73..8c33aa9a 100644
--- a/plugins/muc/password.lib.lua
+++ b/plugins/muc/password.lib.lua
@@ -34,9 +34,8 @@ module:hook("muc-config-form", function(event)
});
end);
-module:hook("muc-config-submitted", function(event)
- local new = event.fields["muc#roomconfig_roomsecret"];
- if new ~= nil and set_password(event.room, new) then
+module:hook("muc-config-submitted/muc#roomconfig_roomsecret", function(event)
+ if set_password(event.room, event.value) then
event.status_codes["104"] = true;
end
end);