Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 10293:f9301d93de72 0.11
MUC: Strip tags with MUC-related namespaces from private messages (fixes #1427)
Prevents duplication since it adds another <{muc#user}x> here
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 29 Sep 2019 20:48:00 +0200 |
parent | 10211:224e681c4db2 |
child | 10294:b61a7173f838 |
child | 10431:3db8372e203c |
comparison
equal
deleted
inserted
replaced
10269:4701415f5b0e | 10293:f9301d93de72 |
---|---|
777 if not o_data then | 777 if not o_data then |
778 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room")); | 778 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room")); |
779 return true; | 779 return true; |
780 end | 780 end |
781 log("debug", "%s sent private message stanza to %s (%s)", from, to, o_data.jid); | 781 log("debug", "%s sent private message stanza to %s (%s)", from, to, o_data.jid); |
782 stanza = muc_util.filter_muc_x(st.clone(stanza)); | |
782 stanza:tag("x", { xmlns = "http://jabber.org/protocol/muc#user" }):up(); | 783 stanza:tag("x", { xmlns = "http://jabber.org/protocol/muc#user" }):up(); |
783 stanza.attr.from = current_nick; | 784 stanza.attr.from = current_nick; |
784 self:route_to_occupant(o_data, stanza) | 785 self:route_to_occupant(o_data, stanza) |
785 -- TODO: Remove x tag? | 786 -- TODO: Remove x tag? |
786 stanza.attr.from = from; | 787 stanza.attr.from = from; |