spec/util_datamapper_spec.lua
changeset 11484 0aa2971380e9
parent 11480 83e127eb91f9
child 11491 b104c10ffce7
--- a/spec/util_datamapper_spec.lua	Tue Mar 23 23:55:33 2021 +0100
+++ b/spec/util_datamapper_spec.lua	Wed Mar 24 00:34:22 2021 +0100
@@ -57,6 +57,17 @@
 						reactions = {type = "array"; items = {type = "string"; xml = {name = "reaction"}}};
 					};
 				};
+				stanza_ids = {
+					type = "array";
+					items = {
+						xml = {name = "stanza-id"; namespace = "urn:xmpp:sid:0"};
+						type = "object";
+						properties = {
+							id = {xml = {attribute = true}; type = "string"};
+							by = {xml = {attribute = true}; type = "string"};
+						};
+					};
+				};
 			};
 		};
 
@@ -68,6 +79,8 @@
 				<active xmlns='http://jabber.org/protocol/chatstates'/>
 				<fallback xmlns='urn:xmpp:fallback:0'/>
 				<origin-id xmlns='urn:xmpp:sid:0' id='qgkmMdPB'/>
+				<stanza-id xmlns='urn:xmpp:sid:0' id='abc1' by='muc'/>
+				<stanza-id xmlns='urn:xmpp:sid:0' id='xyz2' by='host'/>
 				<reactions id='744f6e18-a57a-11e9-a656-4889e7820c76' xmlns='urn:xmpp:reactions:0'>
 					<reaction>👋</reaction>
 					<reaction>🐢</reaction>
@@ -86,6 +99,7 @@
 			state = "active";
 			fallback = true;
 			origin_id = "qgkmMdPB";
+			stanza_ids = {{id = "abc1"; by = "muc"}; {id = "xyz2"; by = "host"}};
 			react = {
 				to = "744f6e18-a57a-11e9-a656-4889e7820c76";
 				reactions = {