Software / code / prosody
Changeset
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 |
| parents | 6272:90054f21d1af |
| children | 6274:77bdbaec3b7f |
| files | plugins/muc/muc.lib.lua |
| diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
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()