});
end);
-module:hook("muc-config-submitted", function(event)
- local new = event.fields["muc#roomconfig_membersonly"];
- if new ~= nil and set_members_only(event.room, new) then
+module:hook("muc-config-submitted/muc#roomconfig_membersonly", function(event)
+ if set_members_only(event.room, event.value) then
event.status_codes["104"] = true;
end
end);