scansion/objects/client.lua

changeset 173
14ed4cb241f4
parent 172
2c17151ed21b
child 175
e48074386468
equal deleted inserted replaced
172:2c17151ed21b 173:14ed4cb241f4
81 if not expected_stanza then 81 if not expected_stanza then
82 error(new_error("unexpected-stanza", { 82 error(new_error("unexpected-stanza", {
83 text = "Received unexpected stanza"; 83 text = "Received unexpected stanza";
84 stanza = tostring(received_stanza); 84 stanza = tostring(received_stanza);
85 })); 85 }));
86 elseif not expected_stanza or not stanzacmp.stanzas_match(expected_stanza, received_stanza) then 86 elseif not expected_stanza or not stanzacmp.stanzas_match(expected_stanza, received_stanza, client.script.captures) then
87 if not expected_stanza then 87 if not expected_stanza then
88 client.log("Received a stanza when none were expected: %s", received_stanza); 88 client.log("Received a stanza when none were expected: %s", received_stanza);
89 else 89 else
90 client.log("Expected: %s", expected_stanza); 90 client.log("Expected: %s", expected_stanza);
91 client.log("Received: %s", received_stanza); 91 client.log("Received: %s", received_stanza);

mercurial