aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 2afe6f58..2c9b58d2 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1045,9 +1045,10 @@ function room_mt:handle_mediated_invite(origin, stanza, payload)
:tag('invite', {from=_from})
:tag('reason'):text(_reason or ""):up()
:up();
- if self:get_password() then
- invite:tag("password"):text(self:get_password()):up();
- end
+ local password = self:get_password()
+ if password then
+ invite:tag("password"):text(password):up();
+ end
invite:up()
:tag('x', {xmlns="jabber:x:conference", jid=_to}) -- COMPAT: Some older clients expect this
:text(_reason or "")