Changeset

5869:83ee752f148c

mod_push2: empty table instead of nil when not present
author Stephen Paul Weber <singpolyma@singpolyma.net>
date Sun, 25 Feb 2024 19:10:30 -0500
parents 5868:37e38ee534ea
children 5870:8b868c00e38e
files mod_push2/mod_push2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_push2/mod_push2.lua	Sun Feb 25 15:28:45 2024 +0000
+++ b/mod_push2/mod_push2.lua	Sun Feb 25 19:10:30 2024 -0500
@@ -536,7 +536,7 @@
 
 	-- only notify if the stanza destination is the mam user we store it for
 	if event.for_user == to then
-		local user_push_services = push2_registrations:get(to)
+		local user_push_services = push2_registrations:get(to) or {}
 
 		-- Urgent stanzas are time-sensitive (e.g. calls) and should
 		-- be pushed immediately to avoid getting stuck in the smacks