Skip to content

Commit

Permalink
Guard against null channel disco
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Dec 10, 2024
1 parent c97bb32 commit 4da4419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snikket/Client.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 4da4419

Please sign in to comment.