From ef3d7c3f37bc66275578f5e8ef14c2934bd886b7 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sat, 18 Jul 2026 16:14:53 +0300 Subject: [PATCH] =?UTF-8?q?chat=5Fcore:=20call=20ensure=5Fchannel=5Fready?= =?UTF-8?q?=20on=20invite=20=E2=80=94=20create=20msg/peers=20tables=20+=20?= =?UTF-8?q?register=20in=20db=5Fsync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, invite creates the channel in SQLite but db_sync never knows about it, so peer sync fails with 'instance NOT FOUND'. --- tools/chatgui/transport/chat_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/chatgui/transport/chat_core.c b/tools/chatgui/transport/chat_core.c index c091c33a..d947c116 100644 --- a/tools/chatgui/transport/chat_core.c +++ b/tools/chatgui/transport/chat_core.c @@ -634,6 +634,9 @@ void chat_core_connect_from_invite(struct chat_invite* inv) { DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: invite saved node=0x%016llx addrs=%d, starting direct connect", CC_ID, (unsigned long long)node_id, inv->addr_count); + { char ch_str[32]; snprintf(ch_str, sizeof(ch_str), "%llu", (unsigned long long)inv->channel_id); + chat_core_ensure_channel_ready(ch_str); } + chat_core_connect_auto(node_id, connect_result_cb, &inv->channel_id, NULL); }