git » sdk » commit 443c948

Don't send chat state to blocked chat

author Stephen Paul Weber
2025-03-04 16:14:39 UTC
committer Stephen Paul Weber
2025-03-04 16:14:39 UTC
parent dd0c42d57f804cd6dc81320005fcc77ce847d7d3

Don't send chat state to blocked chat

Server would prevent it anyway but it's just a waste of time

snikket/Chat.hx +1 -1

diff --git a/snikket/Chat.hx b/snikket/Chat.hx
index 87efc33..d64c647 100644
--- a/snikket/Chat.hx
+++ b/snikket/Chat.hx
@@ -900,7 +900,7 @@ class DirectChat extends Chat {
 		// Should this remove from roster?
 		uiState = Closed;
 		persistence.storeChats(client.accountId(), [this]);
-		sendChatState("gone", null);
+		if (!isBlocked) sendChatState("gone", null);
 		client.trigger("chats/update", [this]);
 	}
 }