From b5c4232ec38ff4284db194f7305768cff25886d4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 26 May 2018 14:44:50 +0200 Subject: MUC: Use correct field name for description in disco#info (fixes #1148) Introduced in c3254827698d --- plugins/muc/description.lib.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/muc/description.lib.lua b/plugins/muc/description.lib.lua index d4bc1a71..d9e02724 100644 --- a/plugins/muc/description.lib.lua +++ b/plugins/muc/description.lib.lua @@ -18,6 +18,14 @@ local function set_description(room, description) return true; end +local function add_disco_form(event) + table.insert(event.form, { + name = "muc#roominfo_description"; + label = "Description"; + value = get_description(event.room) or ""; + }); +end + local function add_form_option(event) table.insert(event.form, { name = "muc#roomconfig_roomdesc"; @@ -26,7 +34,7 @@ local function add_form_option(event) value = get_description(event.room) or ""; }); end -module:hook("muc-disco#info", add_form_option); +module:hook("muc-disco#info", add_disco_form); module:hook("muc-config-form", add_form_option, 100-2); module:hook("muc-config-submitted/muc#roomconfig_roomdesc", function(event) -- cgit v1.2.3