git » sdk » commit ac18ccd

Don't send chatstate info to strangers

author Stephen Paul Weber
2025-11-29 03:38:35 UTC
committer Stephen Paul Weber
2025-11-29 03:38:35 UTC
parent 98d72a77efb9e139ef389b373b04ae89d6583be9

Don't send chatstate info to strangers

borogove/Chat.hx +2 -0

diff --git a/borogove/Chat.hx b/borogove/Chat.hx
index b2d1430..9d55226 100644
--- a/borogove/Chat.hx
+++ b/borogove/Chat.hx
@@ -1113,6 +1113,8 @@ class DirectChat extends Chat {
 	}
 
 	private function sendChatState(state: String, threadId: Null<String>) {
+		if (!isTrusted()) return;
+
 		for (recipient in counterparts()) {
 			final stanza = new Stanza("message", {
 					id: ID.long(),