equal
deleted
inserted
replaced
22 local function add_form_option(event) |
22 local function add_form_option(event) |
23 table.insert(event.form, { |
23 table.insert(event.form, { |
24 name = "muc#roomconfig_roomdesc"; |
24 name = "muc#roomconfig_roomdesc"; |
25 type = "text-single"; |
25 type = "text-single"; |
26 label = "Description"; |
26 label = "Description"; |
|
27 value = get_description(event.room) or ""; |
27 }); |
28 }); |
28 event.formdata["muc#roomconfig_roomdesc"] = get_description(event.room) or ""; |
|
29 end |
29 end |
30 module:hook("muc-disco#info", add_form_option); |
30 module:hook("muc-disco#info", add_form_option); |
31 module:hook("muc-config-form", add_form_option); |
31 module:hook("muc-config-form", add_form_option); |
32 |
32 |
33 module:hook("muc-config-submitted/muc#roomconfig_roomdesc", function(event) |
33 module:hook("muc-config-submitted/muc#roomconfig_roomdesc", function(event) |