# HG changeset patch
# User Stephen Paul Weber <singpolyma@singpolyma.net>
# Date 1742953431 18000
# Node ID 277db84b0c95e883f0729d5cc2c83749a222f092
# Parent  8ecd53452af8f6b7371016c3c336d0424631f24f
mod_push2: guard against no rooms tracked on this session

diff -r 8ecd53452af8 -r 277db84b0c95 mod_push2/mod_push2.lua
--- a/mod_push2/mod_push2.lua	Tue Mar 25 15:20:35 2025 -0500
+++ b/mod_push2/mod_push2.lua	Tue Mar 25 20:43:51 2025 -0500
@@ -393,7 +393,7 @@
 				if does_match and chat then
 					does_match = false
 
-					local nick = session.rooms_joined[jid.bare(stanza.attr.from)] or to_user
+					local nick = (session.rooms_joined and session.rooms_joined[jid.bare(stanza.attr.from)]) or to_user
 
 					if not does_match and chat.mention then
 						local body = stanza:get_child_text("body")