mod_smacks: Add type field to results so actions can be later distinguished
authorMatthew Wild <mwild1@gmail.com>
Sat, 03 Sep 2022 21:20:07 +0100
changeset 12723 268b1a9162a9
parent 12722 27a4a7e64831
child 12724 0a137436490f
mod_smacks: Add type field to results so actions can be later distinguished
plugins/mod_smacks.lua
--- 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