scansion/objects/client.lua

changeset 105
da98bb33cee6
parent 90
8458f8bdb3b0
child 111
25530dccf696
equal deleted inserted replaced
104:fb915f3a9c89 105:da98bb33cee6
100 client.log("Received a stanza when none were expected: %s", received_stanza); 100 client.log("Received a stanza when none were expected: %s", received_stanza);
101 else 101 else
102 client.log("Expected: %s", expected_stanza); 102 client.log("Expected: %s", expected_stanza);
103 client.log("Received: %s", received_stanza); 103 client.log("Received: %s", received_stanza);
104 end 104 end
105 error(new_error("Received unexpected stanza", { stanza = tostring(received_stanza) })); 105 error(new_error("Received unexpected stanza", {
106 stanza = tostring(received_stanza);
107 expected = expected_stanza and tostring(expected_stanza) or nil;
108 }));
106 else 109 else
107 client.last_received_id = received_stanza.attr.id; 110 client.last_received_id = received_stanza.attr.id;
108 client.log("YES! %s", expected_stanza) 111 client.log("YES! %s", expected_stanza)
109 end 112 end
110 expected_stanza = nil; 113 expected_stanza = nil;

mercurial