Software /
code /
prosody
Changeset
6107:5491be05b84c
plugins/muc/muc: Only call get_password once in invite creation
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Tue, 18 Mar 2014 16:01:53 -0400 |
parents | 6106:4b15cfae2d11 |
children | 6108:aae7bc9d6e93 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Tue Mar 18 15:42:48 2014 -0400 +++ b/plugins/muc/muc.lib.lua Tue Mar 18 16:01:53 2014 -0400 @@ -1045,9 +1045,10 @@ :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 "")