aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-01 08:02:43 +0200
committerKim Alvefur <zash@zash.se>2018-06-01 08:02:43 +0200
commit1a92eb50ec14ced5cbe73cbc18d764f489e4ba9c (patch)
tree05f14478e439cb47d2f29fee0376c4420c04aff9 /plugins/muc
parent8ae70d2fdd29ad533ed201a95d857550a00d7077 (diff)
downloadprosody-1a92eb50ec14ced5cbe73cbc18d764f489e4ba9c.tar.gz
prosody-1a92eb50ec14ced5cbe73cbc18d764f489e4ba9c.zip
MUC: Advertise in whether participants are allowed to change the subject (#1155)
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/subject.lib.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/muc/subject.lib.lua b/plugins/muc/subject.lib.lua
index 200b262d..3bedc69c 100644
--- a/plugins/muc/subject.lib.lua
+++ b/plugins/muc/subject.lib.lua
@@ -28,6 +28,14 @@ local function set_changesubject(room, changesubject)
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";