mod_muc_occupant_id: id is an attribute not a text node
authorMaxime “pep” Buquet <pep@bouah.net>
Tue, 25 Feb 2020 17:06:22 +0100
changeset 3908 d14fc974efbc
parent 3907 cfeb93b80621
child 3909 5ae2e865eea0
mod_muc_occupant_id: id is an attribute not a text node
mod_muc_occupant_id/mod_muc_occupant_id.lua
--- a/mod_muc_occupant_id/mod_muc_occupant_id.lua	Sun Feb 23 21:36:53 2020 +0000
+++ b/mod_muc_occupant_id/mod_muc_occupant_id.lua	Tue Feb 25 17:06:22 2020 +0100
@@ -36,9 +36,7 @@
 	stanza:remove_children("occupant-id", xmlns_occupant_id);
 
 	local unique_id = generate_id(occupant, room);
-	stanza:tag("occupant-id", { xmlns = xmlns_occupant_id })
-		:text(unique_id)
-		:up();
+	stanza:tag("occupant-id", { xmlns = xmlns_occupant_id, id = unique_id }):up();
 end
 
 module:add_feature(xmlns_occupant_id);