diff options
author | daurnimator <quae@daurnimator.com> | 2014-06-05 17:08:05 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-06-05 17:08:05 -0400 |
commit | 97f159a9f2e4914a184899d98080fd1c1438113b (patch) | |
tree | 2cf47c8b6ebc30d8a034829b07d8e76796d567c1 /plugins/muc | |
parent | 7fa36918b0198b806059172a6221f3e776cfde53 (diff) | |
download | prosody-97f159a9f2e4914a184899d98080fd1c1438113b.tar.gz prosody-97f159a9f2e4914a184899d98080fd1c1438113b.zip |
plugins/muc/muc: When forwarding mediated invites; use filtered version of original invite instead of new object
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 5c639779..af7202da 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -841,8 +841,10 @@ function room_mt:handle_mediated_invite(origin, stanza) 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() |