-module:hook("muc-config-submitted", function(event)
- local new = event.fields["muc#roomconfig_affiliationnotify"];
- if new ~= nil and set_affiliation_notify(event.room, new) then
+module:hook("muc-config-submitted/muc#roomconfig_affiliationnotify", function(event)
+ if set_affiliation_notify(event.room, event.value) then