plugins/muc/description.lib.lua
changeset 7127 a0764a8d6b26
parent 7122 50b9a7e86de9
child 7355 50b24b3476e6
equal deleted inserted replaced
7126:a7ace4f32080 7127:a0764a8d6b26
    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)