aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/muc/muc.lib.lua6
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()