mod_smacks: Add resumed session to event "smacks-hibernation-end"

Sat, 11 Mar 2017 01:37:28 +0100

author
tmolitor <thilo@eightysoft.de>
date
Sat, 11 Mar 2017 01:37:28 +0100
changeset 2608
362ca94192ee
parent 2607
a7ef9b765891
child 2609
6ab46ff685d0

mod_smacks: Add resumed session to event "smacks-hibernation-end"

Older versions of this event only have the "intermediate" session
in event.session (the one used to resume the existing session),
but not the resumed one.
This adds event.resumed which contains the resumed one alongside
to event.session.

mod_smacks/mod_smacks.lua file | annotate | diff | comparison | revisions
--- a/mod_smacks/mod_smacks.lua	Fri Mar 10 10:19:05 2017 +0000
+++ b/mod_smacks/mod_smacks.lua	Sat Mar 11 01:37:28 2017 +0100
@@ -492,7 +492,7 @@
 		-- Ok, we need to re-send any stanzas that the client didn't see
 		-- ...they are what is now left in the outgoing stanza queue
 		local queue = original_session.outgoing_stanza_queue;
-		module:fire_event("smacks-hibernation-end", {origin = session, queue = queue});
+		module:fire_event("smacks-hibernation-end", {origin = session, resumed = original_session, queue = queue});
 		session.log("debug", "#queue = %d", #queue);
 		for i=1,#queue do
 			session.send(queue[i]);

mercurial