Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 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 |
parent | 6106:4b15cfae2d11 |
child | 6108:aae7bc9d6e93 |
comparison
equal
deleted
inserted
replaced
6106:4b15cfae2d11 | 6107:5491be05b84c |
---|---|
1043 local invite = st.message({from = _to, to = _invitee, id = stanza.attr.id}) | 1043 local invite = st.message({from = _to, to = _invitee, id = stanza.attr.id}) |
1044 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) | 1044 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) |
1045 :tag('invite', {from=_from}) | 1045 :tag('invite', {from=_from}) |
1046 :tag('reason'):text(_reason or ""):up() | 1046 :tag('reason'):text(_reason or ""):up() |
1047 :up(); | 1047 :up(); |
1048 if self:get_password() then | 1048 local password = self:get_password() |
1049 invite:tag("password"):text(self:get_password()):up(); | 1049 if password then |
1050 end | 1050 invite:tag("password"):text(password):up(); |
1051 end | |
1051 invite:up() | 1052 invite:up() |
1052 :tag('x', {xmlns="jabber:x:conference", jid=_to}) -- COMPAT: Some older clients expect this | 1053 :tag('x', {xmlns="jabber:x:conference", jid=_to}) -- COMPAT: Some older clients expect this |
1053 :text(_reason or "") | 1054 :text(_reason or "") |
1054 :up() | 1055 :up() |
1055 :tag('body') -- Add a plain message for clients which don't support invites | 1056 :tag('body') -- Add a plain message for clients which don't support invites |