# HG changeset patch # User Matthew Wild # Date 1530961956 -3600 # Node ID 4101bcf9639a0cd2f283b4ea3e635840623a1ef0 # Parent fa80b3231a02ecc6a0245d6f2b2dfe0994ac16bd MUC: Add allowmemberinvites to disco#info so clients know whether to allow users to invite others in a members-only room diff -r fa80b3231a02 -r 4101bcf9639a plugins/muc/members_only.lib.lua --- a/plugins/muc/members_only.lib.lua Sat Jul 07 12:11:52 2018 +0100 +++ b/plugins/muc/members_only.lib.lua Sat Jul 07 12:12:36 2018 +0100 @@ -62,8 +62,15 @@ module:hook("muc-disco#info", function(event) event.reply:tag("feature", {var = get_members_only(event.room) and "muc_membersonly" or "muc_open"}):up(); + table.insert(event.form, { + name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; + label = "Allow members to invite new members?"; + type = "boolean"; + value = not not get_allow_member_invites(event.room); + }); end); + module:hook("muc-config-form", function(event) table.insert(event.form, { name = "muc#roomconfig_membersonly";