Changeset

6035:9b50ee822638

mod_push2: fix push during smacks hibernate
author Stephen Paul Weber <singpolyma@singpolyma.net>
date Fri, 01 Nov 2024 11:08:26 -0500
parents 6034:b4bf44765ce6
children 6036:1ef53e0264f4
files mod_push2/mod_push2.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_push2/mod_push2.lua	Fri Nov 01 11:08:06 2024 -0500
+++ b/mod_push2/mod_push2.lua	Fri Nov 01 11:08:26 2024 -0500
@@ -385,13 +385,13 @@
 
 local function process_stanza_queue(queue, session, queue_type)
 	if not session.push_registration_id then return; end
-	local user_push_services = {[session.push_registration_id] = session.push_settings};
 	local notified = { unimportant = false; important = false }
 	for i=1, #queue do
 		local stanza = queue[i];
 		-- fast ignore of already pushed stanzas
 		if stanza and not (stanza._push_notify2 and stanza._push_notify2[session.push_registration_id]) then
-			local node = get_push_settings(stanza, session);
+			local node, all_push_services = get_push_settings(stanza, session)
+			local user_push_services = {[session.push_registration_id] = all_push_services[session.push_registration_id]}
 			local stanza_type = "unimportant";
 			if is_important(stanza) then stanza_type = "important"; end
 			if not notified[stanza_type] then		-- only notify if we didn't try to push for this stanza type already