From 4da441962caef87aecbf773bba6615fb6345fc87 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 10 Dec 2024 14:00:40 -0500 Subject: [PATCH] Guard against null channel disco --- snikket/Client.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snikket/Client.hx b/snikket/Client.hx index f274037..17a74e1 100644 --- a/snikket/Client.hx +++ b/snikket/Client.hx @@ -815,7 +815,7 @@ class Client extends EventEmitter { if (chat.chatId != jid.asBare().asString()) { if (chat.chatId.contains(query.toLowerCase()) || chat.getDisplayName().toLowerCase().contains(query.toLowerCase())) { final channel = Util.downcast(chat, Channel); - results.push(new AvailableChat(chat.chatId, chat.getDisplayName(), chat.chatId, channel == null ? new Caps("", [], []) : channel.disco)); + results.push(new AvailableChat(chat.chatId, chat.getDisplayName(), chat.chatId, channel == null || channel.disco == null ? new Caps("", [], []) : channel.disco)); } } if (chat.isTrusted()) {