# HG changeset patch # User daurnimator # Date 1395172913 14400 # Node ID 5491be05b84c19c60c7caa36f48cb922f7a23bf1 # Parent 4b15cfae2d11a2273ffc4c1a670750a23c03c0b3 plugins/muc/muc: Only call get_password once in invite creation diff -r 4b15cfae2d11 -r 5491be05b84c plugins/muc/muc.lib.lua --- 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 "")