Changeset

8829:6dd7fea941f6

MUC: Use correct field name for description in disco#info (fixes #1148) Introduced in c3254827698d
author Kim Alvefur <zash@zash.se>
date Sat, 26 May 2018 14:44:50 +0200
parents 8828:2a0d7fa4c56a
children 8830:5d7db3c7c026
files plugins/muc/description.lib.lua
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/description.lib.lua	Fri May 25 03:33:13 2018 +0200
+++ b/plugins/muc/description.lib.lua	Sat May 26 14:44:50 2018 +0200
@@ -18,6 +18,14 @@
 	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 @@
 		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)