fix chatgui: members showing offline after JOIN — always refresh channel cache before posting online count
This commit is contained in:
1 parent
a7346c25e3
commit
7aa4a34f35
1 file changed
+2
-6
@@ -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); }
|
||||
|
||||
Reference in new issue
Block a user