Changeset

8838:6d4b0895f76d

MUC: ensure that x/item/@jid is always a bare JID
author Jonas Wielicki <jonas@wielicki.name>
date Thu, 17 May 2018 17:12:07 +0200
parents 8837:1b10802a770e
children 8839:dcd53a565c01
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Thu May 17 17:11:42 2018 +0200
+++ b/plugins/muc/muc.lib.lua	Thu May 17 17:12:07 2018 +0200
@@ -1311,9 +1311,9 @@
 		for _, item in pairs(muc_child.tags) do
 			if item.name == "item" then
 				if from_occupant == to_occupant then
-					item.attr.jid = stanza.attr.to;
+					item.attr.jid = jid_bare(stanza.attr.to);
 				else
-					item.attr.jid = from_occupant.jid;
+					item.attr.jid = jid_bare(from_occupant.jid);
 				end
 			end
 		end