From 0a826dd3d05b3242ce90b9c552a298251ee00868 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 19 Nov 2024 10:13:16 -0500 Subject: [PATCH] Do not persist SM if any chat out of sync --- snikket/Client.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snikket/Client.hx b/snikket/Client.hx index 840912b..80af3c8 100644 --- a/snikket/Client.hx +++ b/snikket/Client.hx @@ -109,7 +109,8 @@ class Client extends EventEmitter { }); stream.on("sm/update", (data) -> { - persistence.storeStreamManagement(accountId(), data.sm); + final anySyncHappening = chats.exists(chat -> chat.syncing()); + persistence.storeStreamManagement(accountId(), anySyncHappening ? null : data.sm); return EventHandled; });