Software /
code /
prosody
Changeset
6272:90054f21d1af
plugins/muc/muc: When forwarding mediated invites; use filtered version of original invite instead of new object
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Thu, 05 Jun 2014 17:08:05 -0400 |
parents | 6271:006b0e0f0de2 |
children | 6273:7ef064101994 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Thu Jun 05 17:07:14 2014 -0400 +++ b/plugins/muc/muc.lib.lua Thu Jun 05 17:08:05 2014 -0400 @@ -841,8 +841,10 @@ elseif module:fire_event("muc-pre-invite", {room = self, origin = origin, stanza = stanza}) then return true; end - local invite = st.message({from = self.jid, to = invitee, id = stanza.attr.id}) - :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) + local invite = muc_util.filter_muc_x(st.clone(stanza)); + invite.attr.from = self.jid; + invite.attr.to = invitee; + invite:tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) :tag('invite', {from = stanza.attr.from;}) :tag('reason'):text(payload:get_child_text("reason")):up() :up()