Skip to content

Commit

Permalink
fix: Adds nil check in some util methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Jan 31, 2025
1 parent edc2328 commit 532b585
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion resources/prosody-plugins/util.lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 532b585

Please # to comment.