affiliation_notify = affiliation_notify and true or nil;
if room._data.affiliation_notify == affiliation_notify then return false; end
room._data.affiliation_notify = affiliation_notify;
- if room.save then room:save(true); end
return true;
end
label = "Notify users when their affiliation changes when they are not in the room?";
value = get_affiliation_notify(event.room);
});
-end);
+end, 100-11);
-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
event.status_codes["104"] = true;
end
end);