diff options
author | daurnimator <quae@daurnimator.com> | 2014-03-18 16:01:53 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-03-18 16:01:53 -0400 |
commit | 557523053f6a5e2d9eb161ca14ab16ec8133407c (patch) | |
tree | bb0bb4fed9a06e73be33e30e34ec6deea314849b | |
parent | 4aebdcf7dd4f710d3c35324e2f6d7141518f102f (diff) | |
download | prosody-557523053f6a5e2d9eb161ca14ab16ec8133407c.tar.gz prosody-557523053f6a5e2d9eb161ca14ab16ec8133407c.zip |
plugins/muc/muc: Only call get_password once in invite creation
-rw-r--r-- | plugins/muc/muc.lib.lua | 7 |
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 "") |