comparison plugins/muc/hidden.lib.lua @ 9035:173c0e16e704

MUC: Add sections in room config form
author Matthew Wild <mwild1@gmail.com>
date Fri, 13 Jul 2018 15:47:08 +0100
parents 1c709e3d2e5e
children ea9e1f8f3013
comparison
equal deleted inserted replaced
9034:1c709e3d2e5e 9035:173c0e16e704
20 20
21 module:hook("muc-config-form", function(event) 21 module:hook("muc-config-form", function(event)
22 table.insert(event.form, { 22 table.insert(event.form, {
23 name = "muc#roomconfig_publicroom"; 23 name = "muc#roomconfig_publicroom";
24 type = "boolean"; 24 type = "boolean";
25 label = "Include room in public lists"; 25 label = "Include room information in public lists";
26 desc = "Enable this to allow people to find the room"; 26 desc = "Enable this to allow people to find the room";
27 value = not get_hidden(event.room); 27 value = not get_hidden(event.room);
28 }); 28 });
29 end, 100-5); 29 end, 100-9);
30 30
31 module:hook("muc-config-submitted/muc#roomconfig_publicroom", function(event) 31 module:hook("muc-config-submitted/muc#roomconfig_publicroom", function(event)
32 if set_hidden(event.room, not event.value) then 32 if set_hidden(event.room, not event.value) then
33 event.status_codes["104"] = true; 33 event.status_codes["104"] = true;
34 end 34 end