aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-06-05 17:08:05 -0400
committerdaurnimator <quae@daurnimator.com>2014-06-05 17:08:05 -0400
commit557a75123d1298996951212d5dd3307d84e3334e (patch)
tree2cf47c8b6ebc30d8a034829b07d8e76796d567c1 /plugins/muc
parent38f33840a2670fffdb019284b49c5fd23c75a7a4 (diff)
downloadprosody-557a75123d1298996951212d5dd3307d84e3334e.tar.gz
prosody-557a75123d1298996951212d5dd3307d84e3334e.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.lua6
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()