Software /
code /
prosody
Comparison
plugins/muc/description.lib.lua @ 7124:a0764a8d6b26
MUC: Roll back parts of 50b9a7e86de9 that were not in the disco#info event
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Feb 2016 09:18:53 +0100 |
parent | 7119:50b9a7e86de9 |
child | 7352:50b24b3476e6 |
comparison
equal
deleted
inserted
replaced
7123:a7ace4f32080 | 7124: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) |