aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-13 18:29:26 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-13 18:29:26 +0500
commitaaa00bcfba6436abad4aa10dfa90059774549342 (patch)
treeb601513940a53e76e98e7ce4aa65c2e0fb261706 /plugins
parent47ff98b7415a5f9cc3648f4cfb04bd79b3987c9a (diff)
downloadprosody-aaa00bcfba6436abad4aa10dfa90059774549342.tar.gz
prosody-aaa00bcfba6436abad4aa10dfa90059774549342.zip
MUC: Added disco#info features to advertise room's password protection (muc_passwordprotected or muc_unsecured, depending on whether a password is set).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 69b01336..4806e345 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -206,7 +206,9 @@ end
function room_mt:get_disco_info(stanza)
return st.reply(stanza):query("http://jabber.org/protocol/disco#info")
:tag("identity", {category="conference", type="text"}):up()
- :tag("feature", {var="http://jabber.org/protocol/muc"});
+ :tag("feature", {var="http://jabber.org/protocol/muc"}):up()
+ :tag("feature", {var=self:get_password() and "muc_passwordprotected" or "muc_unsecured"}):up()
+ ;
end
function room_mt:get_disco_items(stanza)
local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");