From 7aa4a34f35071e64e3348341d6003d64113259b2 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 22 Jul 2026 12:19:59 +0300 Subject: [PATCH] =?UTF-8?q?fix=20chatgui:=20members=20showing=20offline=20?= =?UTF-8?q?after=20JOIN=20=E2=80=94=20always=20refresh=20channel=20cache?= =?UTF-8?q?=20before=20posting=20online=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/chatgui/transport/chat_sync.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/chatgui/transport/chat_sync.c b/tools/chatgui/transport/chat_sync.c index fb59d7a3..fa32f0dc 100644 --- a/tools/chatgui/transport/chat_sync.c +++ b/tools/chatgui/transport/chat_sync.c @@ -1259,12 +1259,8 @@ static void cs_handle_channel_join(struct chat_sync* cs, uint64_t peer, cs_propagate(cs, ch_id, peer, ubuf, uoff); } - /* add to channel cache */ - struct channel_cache* ch = cs_find(cs, ch_id); - if (!ch) { - cs_refresh_channels(cs); - ch = cs_find(cs, ch_id); - } + /* add to channel cache — always refresh to include new peer */ + cs_refresh_channels(cs); { uint8_t evt[65]; uint8_t cl=(uint8_t)strlen(ch_id); evt[0]=cl; memcpy(evt+1,ch_id,cl); gui_bridge_post(GUI_EVT_MEMBERS_CHANGED, evt, 1+cl); }