From 532b5858c55e0d4c772edcb8369a2c2c8baaee64 Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 31 Jan 2025 16:56:04 -0600 Subject: [PATCH] fix: Adds nil check in some util methods. --- resources/prosody-plugins/util.lib.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.lua index 943d724d8b..08a2671e78 100644 --- a/resources/prosody-plugins/util.lib.lua +++ b/resources/prosody-plugins/util.lib.lua @@ -474,12 +474,20 @@ end -- Returns the initiator extension if the stanza is coming from a sip jigasi function is_sip_jigasi(stanza) + if not stanza then + return false; + end + return stanza:get_child('initiator', 'http://jitsi.org/protocol/jigasi'); end function is_transcriber_jigasi(stanza) + if not stanza then + return false; + end + local features = stanza:get_child('features'); - if not features then + if not features then return false; end