diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 19:03:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 19:03:03 +0500 |
commit | 724e9bcad29b4d4bb75dee101d79e0504936f213 (patch) | |
tree | cb9d63951a38436386cc9205abf3bcbf909f862d | |
parent | aaa00bcfba6436abad4aa10dfa90059774549342 (diff) | |
download | prosody-724e9bcad29b4d4bb75dee101d79e0504936f213.tar.gz prosody-724e9bcad29b4d4bb75dee101d79e0504936f213.zip |
MUC: Include a <password/> element in invites from password protected rooms.
-rw-r--r-- | plugins/muc/muc.lib.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 4806e345..7c9d081b 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -706,8 +706,11 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) :tag('invite', {from=_from}) :tag('reason'):text(_reason or ""):up() - :up() - :up() + :up(); + if self:get_password() then + invite:tag("password"):text(self:get_password()):up(); + end + invite:up() :tag('x', {xmlns="jabber:x:conference", jid=_to}) -- COMPAT: Some older clients expect this :text(_reason or "") :up() |