git » sdk » commit f7e12b2

Do not trigger a chat that may not be in client yet

author Stephen Paul Weber
2026-09-02 15:37:56 UTC
committer Stephen Paul Weber
2026-09-02 15:37:56 UTC
parent 9a32bb6b8621053e99a96b61f1ec37eb69a46f99

Do not trigger a chat that may not be in client yet

Since this is during initial load

borogove/Chat.hx +2 -2

diff --git a/borogove/Chat.hx b/borogove/Chat.hx
index 8357c7a..4d07487 100644
--- a/borogove/Chat.hx
+++ b/borogove/Chat.hx
@@ -1818,14 +1818,14 @@ class Channel extends Chat {
 				self = member;
 				outbox.start();
 			}
-			client.trigger("chats/update", [this]);
+			if (!noStore) client.trigger("chats/update", [this]);
 		}
 		if (!member.isSelf && member.id != chatId && membersForName != null) {
 			membersForName = membersForName.filter(m -> m.id != member.id);
 			membersForName.push({ id: member.id, displayName: member.displayName });
 			membersForName.sort((a, b) -> Reflect.compare(a.displayName, b.displayName));
 			if (membersForName.length > 20) membersForName = null;
-			if (displayName == chatId) client.trigger("chats/update", [this]);
+			if (displayName == chatId && !noStore) client.trigger("chats/update", [this]);
 		}
 		final tripleThree = presence?.mucUser?.statusCodes?.find((status) -> status == "333");
 		if (member.isSelf && tripleThree != null) {