Skip to content

Commit fc58240

Browse files
committed
fix(prosody): guard is_focus against nil nick
1 parent 9cacffe commit fc58240

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

resources/prosody-plugins/util.lib.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ end
362362
-- @param nick the full occupant nick (resource part of the MUC JID)
363363
-- @return boolean
364364
function is_focus(nick)
365+
if nick == nil then
366+
return false;
367+
end
365368
return string.sub(nick, -string.len("/focus")) == "/focus";
366369
end
367370

0 commit comments

Comments
 (0)