aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-06-06 14:33:43 -0400
committerdaurnimator <quae@daurnimator.com>2014-06-06 14:33:43 -0400
commit9318230b51773a234e4e6018275f984938e3ead3 (patch)
tree4a0881c256696ba7ed075c3613f27346ee17d43d /plugins/muc
parent557a75123d1298996951212d5dd3307d84e3334e (diff)
downloadprosody-9318230b51773a234e4e6018275f984938e3ead3.tar.gz
prosody-9318230b51773a234e4e6018275f984938e3ead3.zip
plugins/muc/muc.lib: Use original decline as template for medated decline
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 af7202da..a7b6ef9c 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -884,8 +884,10 @@ function room_mt:handle_mediated_decline(origin, stanza)
elseif module:fire_event("muc-pre-decline", {room = self, origin = origin, stanza = stanza}) then
return true;
end
- local decline = st.message({from = self.jid, to = declinee, id = stanza.attr.id})
- :tag("x", {xmlns = "http://jabber.org/protocol/muc#user"})
+ local decline = muc_util.filter_muc_x(st.clone(stanza));
+ decline.attr.from = self.jid;
+ decline.attr.to = declinee;
+ decline:tag("x", {xmlns = "http://jabber.org/protocol/muc#user"})
:tag("decline", {from = stanza.attr.from})
:tag("reason"):text(payload:get_child_text("reason")):up()
:up()