git » sdk » commit 379f724

Assume not in sync until we know otherwise

author Stephen Paul Weber
2026-02-04 18:58:52 UTC
committer Stephen Paul Weber
2026-02-04 18:58:52 UTC
parent 3956685836f986456a2e877a0fb42a24a51ab8f0

Assume not in sync until we know otherwise

borogove/Chat.hx +2 -1
borogove/Client.hx +8 -0

diff --git a/borogove/Chat.hx b/borogove/Chat.hx
index 4eba27b..37ca2c9 100644
--- a/borogove/Chat.hx
+++ b/borogove/Chat.hx
@@ -1235,7 +1235,8 @@ class DirectChat extends Chat {
 class Channel extends Chat {
 	@:allow(borogove)
 	private var disco: Caps = new Caps("", [], ["http://jabber.org/protocol/muc"], []);
-	private var inSync = true;
+	@:allow(borogove)
+	private var inSync = false;
 	private var sync = null;
 	private var forceLive = false;
 	private var _nickInUse = null;
diff --git a/borogove/Client.hx b/borogove/Client.hx
index b89601c..b9c6e0a 100644
--- a/borogove/Client.hx
+++ b/borogove/Client.hx
@@ -817,8 +817,16 @@ class Client extends EventEmitter {
 
 		if (data.resumed) {
 			inSync = true;
+			for (chat in getChats()) {
+				final channel = Std.downcast(chat, Channel);
+				if (channel != null) {
+					channel.inSync = true;
+				}
+			}
+
 			stream.emitSMupdates = true;
 			this.trigger("status/online", {});
+			this.trigger("chats/update", chats);
 			return EventHandled;
 		}