|
|
|
|
@ -1420,6 +1420,10 @@ static void cs_handle_join_request(struct chat_sync* cs, uint64_t peer,
|
|
|
|
|
|
|
|
|
|
cs_refresh_channels(cs); |
|
|
|
|
cs_post_channel_online(cs, ch_id); |
|
|
|
|
/* Новый канал может использовать уже открытый транспорт: события conn_up не будет. */ |
|
|
|
|
cs_schedule_sync(cs); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_MEMBER_SYNC, "%s: JOIN_REQUEST schedule member sync ch=%s peer=%016llx", |
|
|
|
|
CS_ID, ch_id, (unsigned long long)peer); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* ─── JOIN_READY (0x13): connection-узел → joiner (можно запускать BGP) ─── */ |
|
|
|
|
@ -1441,6 +1445,10 @@ static void cs_handle_join_ready(struct chat_sync* cs, uint64_t peer,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
chat_core_ensure_channel_ready(cs->inst, ch_id); |
|
|
|
|
cs_refresh_channels(cs); |
|
|
|
|
cs_schedule_sync(cs); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_MEMBER_SYNC, "%s: JOIN_READY schedule member sync ch=%s peer=%016llx", |
|
|
|
|
CS_ID, ch_id, (unsigned long long)peer); |
|
|
|
|
|
|
|
|
|
uint8_t evt[65]; uint8_t ch_id_len = (uint8_t)strlen(ch_id); |
|
|
|
|
evt[0] = ch_id_len; memcpy(evt + 1, ch_id, ch_id_len); |
|
|
|
|
|