# HG changeset patch # User daurnimator # Date 1402079623 14400 # Node ID 7ef064101994e9e7002d154db7ea832a58781da1 # Parent 90054f21d1af8a9c2ce7bca93432a5cb68e7d3fa plugins/muc/muc.lib: Use original decline as template for medated decline diff -r 90054f21d1af -r 7ef064101994 plugins/muc/muc.lib.lua --- 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()