--- a/plugins/muc/muc.lib.lua Thu Jun 05 17:08:05 2014 -0400
+++ b/plugins/muc/muc.lib.lua Fri Jun 06 14:33:43 2014 -0400
@@ -884,8 +884,10 @@
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()