Changeset

12719:268b1a9162a9

mod_smacks: Add type field to results so actions can be later distinguished
author Matthew Wild <mwild1@gmail.com>
date Sat, 03 Sep 2022 21:20:07 +0100
parents 12718:27a4a7e64831
children 12720:0a137436490f
files plugins/mod_smacks.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Sat Sep 03 21:19:00 2022 +0100
+++ b/plugins/mod_smacks.lua	Sat Sep 03 21:20:07 2022 +0100
@@ -329,6 +329,7 @@
 	end
 
 	return {
+		type = "enabled";
 		id = resume_token;
 		resume_max = resume_token and tostring(resume_timeout) or nil;
 		session = session;
@@ -337,7 +338,6 @@
 
 			track_session(session, resume_token);
 			wrap_session(session, false);
-
 		end;
 	};
 end
@@ -613,6 +613,7 @@
 	sessionmanager.update_session(original_session, session);
 
 	return {
+		type = "resumed";
 		session = original_session;
 		id = id;
 		-- Return function to complete the resumption and resync unacked stanzas