client: Store last received id so it can be used in scripts

Fri, 19 Feb 2016 11:48:04 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 19 Feb 2016 11:48:04 +0000
changeset 83
52f8fa7f999e
parent 82
f90056b8e278
child 84
c9061cd9951b

client: Store last received id so it can be used in scripts

scansion/objects/client.lua file | annotate | diff | comparison | revisions
--- a/scansion/objects/client.lua	Fri Feb 19 11:47:33 2016 +0000
+++ b/scansion/objects/client.lua	Fri Feb 19 11:48:04 2016 +0000
@@ -93,6 +93,7 @@
 				client.log("Received: %s", received_stanza);
 				error(new_error("Received unexpected stanza", { stanza = tostring(received_stanza) }));
 			else
+				client.last_received_id = received_stanza.attr.id;
 				client.log("YES! %s", expected_stanza)
 			end
 			expected_stanza = nil;

mercurial