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 | 010963c10efbbe5c9f0cdbfc9f96fe722d211f8f (patch) | |
tree | 4a0881c256696ba7ed075c3613f27346ee17d43d /plugins/muc/muc.lib.lua | |
parent | 97f159a9f2e4914a184899d98080fd1c1438113b (diff) | |
download | prosody-010963c10efbbe5c9f0cdbfc9f96fe722d211f8f.tar.gz prosody-010963c10efbbe5c9f0cdbfc9f96fe722d211f8f.zip |
plugins/muc/muc.lib: Use original decline as template for medated decline
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-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() |