Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 6273:7ef064101994
plugins/muc/muc.lib: Use original decline as template for medated decline
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Fri, 06 Jun 2014 14:33:43 -0400 |
parent | 6272:90054f21d1af |
child | 6274:77bdbaec3b7f |
line wrap: on
line diff
--- 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()