diff --git a/plans/2026-09-28-name-warnings.md b/plans/2026-09-28-name-warnings.md index cddeb83abd..21a70dbe26 100644 --- a/plans/2026-09-28-name-warnings.md +++ b/plans/2026-09-28-name-warnings.md @@ -117,7 +117,7 @@ The match is what the channel kind's local lookup found, else what the contact k When the name is resolved and has a live link of the kind not planned, `otherSimplexName` is that kind's name, unless the user has a chat, own address or own channel of that kind at that link. The plan's screen shows it: - the second button of 2a, 3c and 4a; -- 3e for a chat (new). +- 3e for a chat or own channel (new). ## 4. Changes against today @@ -229,7 +229,7 @@ A missing `graceUntil` drops the second clause of the expiry lines. `otherSimple - **Alert.** `showNameRegistrationAlert` becomes a plain `case` from `NameWarning` to title, message and action (Renew, Register, Re-register, Connect to SimpleX team). It keeps "Open existing chat" when the plan has a chat (1d). - **Flow.** `planAndConnect` shows the alert when the plan has a warning. Otherwise: - - a plan for a chat (`CAPKnown`, `GLPKnown`) with `otherSimplexName` shows 3e (N14); + - a plan for a chat or own channel (`CAPKnown`, `GLPKnown`, `GLPOwnLink`) with `otherSimplexName` shows 3e (N14); - every other plan proceeds as today. There is no `isOwn`, `notConnectable`, `hasLocalChat`, expiry or length logic in either app. @@ -285,7 +285,7 @@ Decided: | N25 | Dates in the alerts | one long localized format in both apps | | N26 | Bot clients | `connLink` is optional in Python and Node; `resolve=allGroups` still parses | | N13 | Own name reserved for community after its registration ended | `NWReservedForCommunity`, 2d's alert | -| N14 | What shows 3e | the app, for a chat's plan with `otherSimplexName` | +| N14 | What shows 3e | the app, for a chat's or own channel's plan with `otherSimplexName` | ## 12. Tests diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt b/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt index abb01e3f66..40016fe973 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt +++ b/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt @@ -4400,6 +4400,26 @@ Query: Plan: SEARCH groups USING INTEGER PRIMARY KEY (rowid=?) +Query: + UPDATE groups SET group_domain_verified = 0 + WHERE user_id = ? AND group_domain_verified = 1 + AND group_profile_id IN (SELECT group_profile_id FROM group_profiles WHERE group_domain = ?) + AND business_chat IS NOT NULL +Plan: +SEARCH groups USING INDEX sqlite_autoindex_groups_2 (user_id=? AND group_profile_id=?) +LIST SUBQUERY 1 +SCAN group_profiles + +Query: + UPDATE groups SET group_domain_verified = 0 + WHERE user_id = ? AND group_domain_verified = 1 + AND group_profile_id IN (SELECT group_profile_id FROM group_profiles WHERE group_domain = ?) + AND business_chat IS NULL +Plan: +SEARCH groups USING INDEX sqlite_autoindex_groups_2 (user_id=? AND group_profile_id=?) +LIST SUBQUERY 1 +SCAN group_profiles + Query: WITH user_groups AS MATERIALIZED ( SELECT g.group_id @@ -7551,6 +7571,11 @@ Query: SELECT g.inv_queue_info FROM groups g WHERE g.group_id = ? AND g.user_id Plan: SEARCH g USING INTEGER PRIMARY KEY (rowid=?) +Query: SELECT gp.group_domain FROM groups g JOIN group_profiles gp ON gp.group_profile_id = g.group_profile_id WHERE g.user_id = ? AND g.group_id = ? AND gp.group_domain IS NOT NULL +Plan: +SEARCH g USING INTEGER PRIMARY KEY (rowid=?) +SEARCH gp USING INTEGER PRIMARY KEY (rowid=?) + Query: SELECT group_domain_resolved_at, group_domain_expires_at FROM groups WHERE user_id = ? AND group_id = ? AND group_domain_resolved_at IS NOT NULL Plan: SEARCH groups USING INTEGER PRIMARY KEY (rowid=?) @@ -7891,6 +7916,10 @@ Query: UPDATE contact_profiles SET contact_domain_resolved_at = datetime('now', Plan: SCAN contact_profiles +Query: UPDATE contact_profiles SET contact_domain_verified = 0 WHERE user_id = ? AND contact_domain = ? AND contact_domain_verified = 1 +Plan: +SEARCH contact_profiles USING INDEX idx_contact_profiles_user_id (user_id=?) + Query: UPDATE contact_profiles SET image = ? WHERE display_name = ? Plan: SEARCH contact_profiles USING INDEX contact_profiles_index (display_name=?)