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
commit97f159a9f2e4914a184899d98080fd1c1438113b (patch)
tree2cf47c8b6ebc30d8a034829b07d8e76796d567c1 /plugins/muc
parent7fa36918b0198b806059172a6221f3e776cfde53 (diff)
downloadprosody-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.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()