| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-11-12 04:33:42 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-11-12 04:33:42 UTC |
| parent | 6f3c08946abf058cd77d955f10625f40176a01ef |
| snikket/Client.hx | +2 | -6 |
diff --git a/snikket/Client.hx b/snikket/Client.hx index e26b047..e5c5beb 100644 --- a/snikket/Client.hx +++ b/snikket/Client.hx @@ -1250,12 +1250,8 @@ class Client extends EventEmitter { } private function serverBlocked(blocked: String) { - final chat = getChat(blocked); - if (chat == null) { - startChatWith(blocked, (caps) -> Closed, (chat) -> chat.block(null, false)); - } else { - chat.block(null, false); - } + final chat = getChat(blocked) ?? getDirectChat(blocked, false); + chat.block(null, false); } // This is called right before we're going to trigger for all chats anyway, so don't bother with single triggers