core, ui: prohibit changing profile for prepared entity when first attempt to connect failed (#6037)

* core: prohibit changing profile for prepared entity when first attempt to connect failed

* reuse incognito

* schema

* ios

* postgres schema

* ios

* reenable tests

* kotlin

* update alert

* rename predicate, combine queries

* send the correct incognito mode, fail on attempt to change mode for prepared connection

* query plans

* ui: show group connecting status

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
spaced4ndyandEvgeny Poberezkin authored and GitHub committed 2025-07-05 11:09:10 +01:00
1 parent e5d3029edf
commit 2dd54c6697
48 files changed
+425 -133

No files matched your search

@@ -0,0 +1,21 @@
{-# LANGUAGE QuasiQuotes #-}
module Simplex.Chat.Store.Postgres.Migrations.M20250704_groups_conn_link_prepared_connection where
import Data.Text (Text)
import qualified Data.Text as T
import Text.RawString.QQ (r)
m20250704_groups_conn_link_prepared_connection :: Text
m20250704_groups_conn_link_prepared_connection =
T.pack
[r|
ALTER TABLE groups ADD COLUMN conn_link_prepared_connection SMALLINT NOT NULL DEFAULT 0;
|]
down_m20250704_groups_conn_link_prepared_connection :: Text
down_m20250704_groups_conn_link_prepared_connection =
T.pack
[r|
ALTER TABLE groups DROP COLUMN conn_link_prepared_connection;
|]
@@ -645,7 +645,8 @@ CREATE TABLE test_chat_schema.groups (
conn_short_link_to_connect bytea,
conn_link_started_connection smallint DEFAULT 0 NOT NULL,
welcome_shared_msg_id bytea,
request_shared_msg_id bytea
request_shared_msg_id bytea,
conn_link_prepared_connection smallint DEFAULT 0 NOT NULL
);