Software /
code /
prosody
Changeset
8985:4101bcf9639a
MUC: Add allowmemberinvites to disco#info so clients know whether to allow users to invite others in a members-only room
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 07 Jul 2018 12:12:36 +0100 |
parents | 8984:fa80b3231a02 |
children | 8986:320ae6dbb2e8 |
files | plugins/muc/members_only.lib.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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";