MUC: Tag PMs with <x>, like presence stanzas
authorKim Alvefur <zash@zash.se>
Tue, 28 Jan 2014 18:21:21 +0000 (19:21 +0100)
committerKim Alvefur <zash@zash.se>
Tue, 28 Jan 2014 18:21:21 +0000 (19:21 +0100)
plugins/muc/muc.lib.lua

index 462d6893dc833b30515aaaf6d2ea09c9641535e4..d09c768e51f60049b354e6e013fb7591096d8121 100644 (file)
@@ -570,6 +570,7 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
                                end
                                stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id;
                        else -- message
+                               stanza:tag("x", { xmlns = "http://jabber.org/protocol/muc#user" }):up();
                                stanza.attr.from = current_nick;
                                for jid in pairs(o_data.sessions) do
                                        stanza.attr.to = jid;