MUC: Update all config form handlers to take advantage of the new per-option events
[prosody.git] / plugins / muc / description.lib.lua
index 30852922f44cd7f0461f984845712bed72889784..c4b1bd093c7df86d1e060e419ae9e16426b5dd84 100644 (file)
@@ -30,9 +30,8 @@ end
 module:hook("muc-disco#info", add_form_option);
 module:hook("muc-config-form", add_form_option);
 
-module:hook("muc-config-submitted", function(event)
-       local new = event.fields["muc#roomconfig_roomdesc"];
-       if new ~= nil and set_description(event.room, new) then
+module:hook("muc-config-submitted/muc#roomconfig_roomdesc", function(event)
+       if set_description(event.room, event.value) then
                event.status_codes["104"] = true;
        end
 end);