Browse Source

fix chatgui: members showing offline after JOIN — always refresh channel cache before posting online count

topo_upd
Evgeny 2 months ago
parent
commit
7aa4a34f35
  1. 6
      tools/chatgui/transport/chat_sync.c

6
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); cs_propagate(cs, ch_id, peer, ubuf, uoff);
} }
/* add to channel cache */ /* add to channel cache — always refresh to include new peer */
struct channel_cache* ch = cs_find(cs, ch_id);
if (!ch) {
cs_refresh_channels(cs); cs_refresh_channels(cs);
ch = cs_find(cs, ch_id);
}
{ uint8_t evt[65]; uint8_t cl=(uint8_t)strlen(ch_id); evt[0]=cl; memcpy(evt+1,ch_id,cl); { 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); } gui_bridge_post(GUI_EVT_MEMBERS_CHANGED, evt, 1+cl); }

Loading…
Cancel
Save