Changeset

4956:65870d42a7b1

mod_http_admin_api: Update for 0.12 changes to mod_smacks
author Kim Alvefur <zash@zash.se>
date Sun, 29 May 2022 02:03:41 +0200
parents 4955:537054999093
children 4957:89226fb1af67
files mod_http_admin_api/mod_http_admin_api.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua	Sun May 29 02:02:07 2022 +0200
+++ b/mod_http_admin_api/mod_http_admin_api.lua	Sun May 29 02:03:41 2022 +0200
@@ -225,6 +225,9 @@
 	-- Smacks queue
 	if session.last_requested_h and session.last_acknowledged_stanza then
 		info.queues.awaiting_acks = session.last_requested_h - session.last_acknowledged_stanza;
+	elseif session.outgoing_stanza_queue then
+		-- New mod_smacks
+		info.queues.awaiting_acks = session.outgoing_stanza_queue:count_unacked();
 	end
 	if session.push_identifier then
 		info.push_info = {