Software /
code /
prosody
Changeset
3247:ee8aaca3226c
MUC: Include a <password/> element in invites from password protected rooms.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 13 Jun 2010 19:03:03 +0500 |
parents | 3246:3371419eb0e1 |
children | 3248:f8d14ea3ad0e |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sun Jun 13 18:29:26 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 19:03:03 2010 +0500 @@ -706,8 +706,11 @@ :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()