Changeset

8848:402d8febfa43

MUC: Advertise in whether participants are allowed to change the subject (#1155)
author Kim Alvefur <zash@zash.se>
date Fri, 01 Jun 2018 08:02:43 +0200
parents 8847:74526c425dec
children 8849:cd186331ab1f
files plugins/muc/subject.lib.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/subject.lib.lua	Wed May 30 22:43:45 2018 +0100
+++ b/plugins/muc/subject.lib.lua	Fri Jun 01 08:02:43 2018 +0200
@@ -28,6 +28,14 @@
 	return true;
 end
 
+module:hook("muc-disco#info", function (event)
+	table.insert(event.form, {
+		name = "muc#roominfo_changesubject";
+		type = "boolean";
+	});
+	event.formdata["muc#roominfo_changesubject"] = get_changesubject(event.room);
+end);
+
 module:hook("muc-config-form", function(event)
 	table.insert(event.form, {
 		name = "muc#roomconfig_changesubject";