diff options
author | daurnimator <quae@daurnimator.com> | 2014-06-06 14:33:43 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-06-06 14:33:43 -0400 |
commit | 9318230b51773a234e4e6018275f984938e3ead3 (patch) | |
tree | 4a0881c256696ba7ed075c3613f27346ee17d43d /plugins | |
parent | 557a75123d1298996951212d5dd3307d84e3334e (diff) | |
download | prosody-9318230b51773a234e4e6018275f984938e3ead3.tar.gz prosody-9318230b51773a234e4e6018275f984938e3ead3.zip |
plugins/muc/muc.lib: Use original decline as template for medated decline
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 6 |
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() |