Software /
code /
prosody
Diff
plugins/muc/members_only.lib.lua @ 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 |
parent | 8976:92f0876b9230 |
child | 8987:596c8c7d98b1 |
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";