Commit Graph

84 Commits

Author SHA1 Message Date
Narasimha-sc
427ce1b3ff directory: show knocking status in listings, trigger re-review on knocking change (#6695)
* directory: show knocking status in listings, trigger re-review on knocking change

- fix sameProfile to include memberAdmission so toggling knocking triggers re-review and regenerates the web listing JSON
- show "Knocking: enabled" in bot search results and /list output
- show "Knocking: enabled" in web directory UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* directory: rename "Knocking: enabled" to "Member admission: enabled"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* directory: member admission must trigger review

* update text, refactor

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2026-03-24 20:01:58 +00:00
sh
26e15221f6 directory-service: fix slow postgresql queries (#6639)
* add analysis

* implement p1.1 and p1.2

* Update apps/simplex-directory-service/src/Directory/Service.hs

Co-authored-by: Evgeny <evgeny@poberezkin.com>

* update plans

* remove plans

---------

Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-02-18 09:28:39 +00:00
sh
764fb27f1c core, directory: allow voice messages during member approval phase to allow audio captchas in groups that prohibit voice messages (#6624)
* rfcs: add member-support-voice rfc

* update based on the feedback

* implement RFC

* add new tests

* fix protocol tests and update plans

* restrict voice captcha exemption to host approval phase

* update agent_query_plans.txt
2026-02-14 09:26:18 +00:00
sh
279119e134 simplex-directory-service: add audio captcha (#6619)
* simplex-directory-service: add audio captcha

* add plan

* updated plan

* implement changes

* add tests with coverage

* add tests

* implement further changes

* directory tests overview

* fix tests on 8.10.7

* /audio command toggles between text and voice captcha

* core: /audio enables voice captcha, retry sends both image and voice

* remove irrelevant directory service tests

* fix flaky testJoinGroup message ordering
2026-02-07 13:29:41 +00:00
Evgeny
89964bf15a bots: support maintenance option (#6558)
* bots: support maintenance option

* maintenance mode: run pre-start hook, do not create user
2026-01-20 13:28:20 +00:00
Evgeny
87e8a10f1e core: use strict tables (#6535)
* core: use strict tables

* fix field types

* change encodings to match schema types; migrate sqlite tables to strict mode

* stabilize postgres client tests, remove slow handshake tests

* update simplexmq

* fix test

* change call_state type to text

* fix directory service queries

* update local_alias for existing schemas

* change types before strict
2026-01-05 08:53:26 +00:00
Evgeny
f0467aee00 directory service: fix queries (#6539)
* fix directory service queries

* fix

* reduce postgres pool size to 1

* stabilize postgres client tests, remove slow handshake tests

* update simplexmq

* fix test

* test delay
2026-01-04 19:04:32 +00:00
spaced4ndy
f76e994034 core: forward based on relations vector (#6464)
* core: forward based on relations vector wip

* fix introductions

* fix forwarding tests

* fix forwarding inside support scope

* fix deduplication test

* fix more tests

* plans, api

* live migration wip

* enable tests

* member locks

* api

* plans

* fix for postgres

* fix for postgres

* rename predicate

* rename predicate

* optimize

* refactor

* fix

* check

* move part of migration to sql

* plans

* core: preserve detailed information in relation vectors (#6484)

* core: relations vector live migrations; stage 2 migration sql (#6472)

* rework forwarding in support scope

* move operations inside transactions

* set_member_vector_new_relation function

* read vector ad-hoc

* partition in transaction

* fix postgres

* postgres schema

* api

* plans

* remove comment

* lock before migration computation

* refactor

* simplify set relations

* retreive only support scope members

* fix

* refactor

* fix comment

* enable tests

* 1 second

* for update

* locks

* fix mask

* plans

* fix

* postgres

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-12-09 14:48:32 +00:00
Evgeny
369414bec7 directory: improve migration (#6319)
* directory: warn only on missing host member/contact relation

* improve verification

* log imported ID

* fix userGroupRegId in case of duplicate

* log updates of userGroupRegId

* fix the fix

* option to generate listings

* clean up
2025-09-30 08:03:25 +01:00
spaced4ndy
c782e6762b feature branch: optimize subscriptions (#6297)
* core: remove contact merge, obsolete group code (#6292)

* core: remove file connections (#6298)

* core: rename migration

* corre: remove unused contacts merged event (#6308)

* core: optimize subscriptions (#6304)

* core: remove conn ids map from subscriptions (#6309)

* rename migration (#6316)

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-09-28 21:31:59 +01:00
Evgeny
015d5de364 directory: move all storage to the database, optimize performance (#6287)
* core: add custom indexed columns to groups and contacts

* directory: use database (TODO search/listing)

* triggers to maintain current member count

* update simplexmq, fix tests, use summary from GroupInfo

* fix all directory tests

* remove acceptance fields from group reg

* enable all tests

* clean up

* postgres migrations, fixes

* query plans

* use function in postgres triggers, improve sqlite query

* fix export/import

* update schema

* prevent admins from promoting groups when approving

* update listing every 5 minutes
2025-09-28 15:11:49 +01:00
Evgeny
c09665b920 directory: show only recent groups in active/new tabs, page improvements (#6290)
* directory: show only recent groups as active or new

* round times

* sorting order

* fix links

* improve
2025-09-21 14:36:58 +01:00
Evgeny
a190d4ea9b website: directory page (#6283)
* website: directory page

* core: use markdown in directory entries

* render markdown on directory page

* update markdown

* toggle secrets on click

* update listings asynchronously

* add group links to the listing

* cleanup

* better directory layout with pagination

* script to run website

* update page navigation

* search

* readable markdown colors, better "read less"

* core: atomic update of directory listings, to avoid files unavailable

* fix symlink, sort entries on page with new first

* update listings every 15 min, add activeAt time

* fix sorting in the page and listing url

* replace simplex:/ links on desktop
2025-09-20 19:47:50 +01:00
Evgeny
429ec9d21a directory: listings for web pages (#6281)
* directory: listings for web pages

* refactor

* tests
2025-09-18 17:52:47 +01:00
Evgeny
8798ede50a core: extended network errors information (simplexmq) (#6247)
* core: extended network errors information (simplexmq)

* fix test

* docs: add NetworkError to bot API types

* update simplexmq - JSON encoding for missing NetworkError
2025-09-07 15:07:21 +01:00
Evgeny
78b4431dea directory: use bot commands and menu in SimpleX Directory (#6219)
* directory: use bot commands and menu in SimpleX Directory

* rename (remove hyphen), fix test
2025-08-25 07:51:53 +01:00
Evgeny
4811d663e6 rfc: bot messages and buttons, core: command markdown, supported commands in profile preferences, chat sessions preference, peer type field in profile to identify bots (#5360)
* rfc: bot messages and buttons

* update

* update bot rfc

* core: add bot commands to chat preferences and peer type to profile

* update postgresql schema

* update query plans

* chat sessions preference

* markdown for bot commands

* schema

* core: file preference, options to create bot from CLI

* core: different command type

* ios: commands menu

* update types

* update ios

* improve command markdown

* core, ios: update types

* android, desktop: clickable commands in messages in chats with bots

* android, desktop: commands menu

* command menu button, bot icon

* ios: connect flow for bots

* android, desktop: connect flow for bots

* icon

* CLI commands to view and set commands, remove "hidden" property of command, bot api docs

* corrections

* fix inheriting profile preferences to business groups

* note on business address

* ios: export localizations

* fix test

* commands to set file preference on user/contact, tidy up layout and display of command and attachment buttons
2025-08-07 11:13:35 +01:00
Evgeny
fe652fb56c directory bot: fix group ID for short link upgrade (#6134)
* directory bot: fix group ID for short link upgrade

* split link to separate message

* enable all tests
2025-08-01 16:24:26 +01:00
Evgeny
81b61f2473 directory bot: use short links, command /link to upgrade group link (#6130)
* directory bot: use short links, command /link to upgrade group link

* test

* enable all tests

* update comparison for scenario when only link changed

* use DB IDs when listing groups registered by admins
2025-07-31 12:15:43 +01:00
Evgeny
cf8bd7f6ac docs: bots API (#6091)
* docs: bot API commands

* generate API commands doc

* generate commands docs with parameters and responses

* add API types

* more types

* document all types (with some deviations from JSON encodings)

* rename types

* interface objects

* separator

* command syntax

* more syntax

* API events

* event types

* fix all type definitions

* pre-process types outside of rendering

* pre-process event types

* overview

* pre-process commands

* param syntax WIP

* syntax for types in command parameters

* API error response and chat event

* remove unsupported/deprecated command parameters

* reorder

* syntax for choice

* show command errors

* event descriptions

* python syntax for commands and types (#6099)

* python syntax for commands and types

* python snippets: convert numbers to string

* fixes

* update readme, enable all tests

* fix operators test

* update plans

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2025-07-24 13:12:53 +01:00
Evgeny
a5768e903d core, ui: short bio/description for contact and group profiles (#6055)
* core: short bio/description for contact and group profiles

* use short description in commands

* fix tests

* query plans

* ios: show contact and group profile descriptions

* android, desktop: short description/bio

* ui: layout for chat info, correct copy

* comment out fields to add/edit short descriptions

* remove short description from events

* postgres schema
2025-07-11 21:28:10 +01:00
Evgeny
e3e9ae2ffd core, ui: create all links with short links, config parameter to use large link data, use short link as address in user profile (#5991)
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2025-06-17 15:56:33 +04:00
spaced4ndy
7f6bc30894 core, ios: track "short link data set" state, interact with address accordingly (#5978) 2025-06-10 15:12:23 +00:00
spaced4ndy
b2bc4d6a5c core: fix short link type when adding for group link (#5942)
* core: fix short link type when adding for group link

* shorten, rename

* update setContactShortLink

* update

* fix

* plans

* simplexmq

* ui: show error when setting short link

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-05-24 14:34:03 +01:00
spaced4ndy
e9414d713e Merge branch 'master' into group-knocking 2025-05-13 13:05:48 +04:00
Evgeny
2a43a02af3 core, ui: support trailing punctuation for mentions, URIs (also support domains), and email addresses (#5888)
* core: improve markdown parser for mentions, URIs, and email addresses

* ui
2025-05-12 11:22:35 +01:00
Evgeny Poberezkin
c3bb1e660d Merge branch 'master' into group-knocking 2025-05-05 12:53:05 +01:00
Evgeny
24b0f0290b core: pass event and response error without dedicated constructor (#5869)
* core: pass event and response error without dedicated constructor

* ios: WIP

* android, desktop: update UI for new API

* ios: fix parser

* fix showing invalid chats

* fix mobile api tests

* ios: split ChatResponse to 3 enums, decode API results on the same thread

* tweak types

* remove throws

* rename
2025-05-05 11:51:22 +01:00
Evgeny Poberezkin
92787df8a3 Merge branch 'master' into group-knocking 2025-05-04 23:25:50 +01:00
Evgeny
a0d1cca389 core: split response to two types, to improve iOS parsing memory usage (#5867)
* core: split response to two types, to improve iOS parsing memory usage

* ios: split core events to separate types

* comment

* limit more events to CLI

* fix parser

* simplemq
2025-05-04 22:14:36 +01:00
spaced4ndy
ca2f019249 Merge branch 'master' into group-knocking 2025-04-29 20:28:45 +04:00
spaced4ndy
60bfd9933a core: correctly communicate group acceptance state (#5852) 2025-04-28 06:28:40 +00:00
Evgeny
ca49167ec6 directory service: fix deleting group registration (#5856) 2025-04-27 15:55:49 +01:00
spaced4ndy
3095b980cb Merge branch 'master' into group-knocking 2025-04-15 19:27:36 +04:00
Evgeny
45e395d35a core, ui: short connection links with stored data (#5824)
* core, ui: optionally use short links (#5799)

* core: optionally use short links

* update test

* update simplexmq, short group links

* fix query

* fix parser for _connect

* ios: use short links

* shorten links to remove fingerprint and onion hosts from known servers

* fix parser

* tests

* nix

* update query plans

* update simplexmq, simplex: schema for short links

* simplexmq

* update ios

* fix short links in ios

* android: use short links

* fix short group links, test short link connection plans

* core: fix connection plan to recognize own short links

* update simplexmq

* space

* all tests

* relative symlinks in simplexmq to fix windows build

* core: improve connection plan for short links (#5825)

* core: improve connection plan for short links

* improve connection plans

* update UI

* update simplexmq

* ios: add preset server domains to entitlements, add short link paths to .well-known/apple-app-site-association

* update simplexmq

* fix group short link in iOS, fix simplex:/ scheme saved to database or used for connection plans

* update simplexmq

* ios: delay opening URI from outside until the app is started

* update simplexmq
2025-04-14 21:25:32 +01:00
Evgeny
090f576b65 directory: allow admins deleting groups and registering groups with the same name as deleted one; /help commands; better support of other group owners; support link encoding and version changes (#5829)
* allow admins deleting groups from directory and registering groups with same name as deleted one; /help commands

* support profile changes by other owners, with/without connection to directory

* profile check will succeed when group link encoding or versions change, but the link queues remain the same
2025-04-12 19:34:30 +01:00
spaced4ndy
9654e193af core: member admission (#5798) 2025-04-03 08:55:32 +00:00
spaced4ndy
4718494329 Merge branch 'master' into group-knocking 2025-04-02 12:02:29 +04:00
spaced4ndy
be1c4018cc core: group knocking main functionality (#5726)
* docs: knocking rfc

* types, schema wip

* more comments

* rename

* more types

* change types

* wip compiles

* construct snd scope

* fix tests

* hide output

* sending

* fix member filtration

* plans

* conversations store/api model draft

* xgrpmemnew

* rework types wip

* wip

* wip

* remove tag

* wip (compiles)

* fix parsing

* fix query

* fixes, tests

* plans, comments

* fix member filtration

* wip

* protocol wip

* protocol wip

* fix

* fix tests

* fixes, test

* fix (remove NotInHistory)

* fix

* fix tests

* fix

* output

* fix tests

* tests

* gcsi in view

* fix tests

* plans

* refactor, make scopes Maybe

* remove groupChatFilter

* fix test

* change schema

* refactor

* rename

* rename

* rename

* refactor

* rename

* remove scope from item direction

* rework view

* change apis

* make api for cli

* change text

* refactor

* fixes

* comment

* rename

* refactor fmap/mapM

* refactor includeInHistory

* query plans

* knocking: patch scope (#5796)

* knocking: patch scope wip

* more patches

* schema

* remove space

* plans

* fix test

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-04-02 07:57:18 +00:00
Evgeny
27f2926aed directory: joining groups with enabled captcha screening and observer role (#5784)
* directory: joining groups with enabled captcha screen (test)

* fix directory, test

* query plans
2025-03-28 18:48:54 +00:00
Evgeny
45c7c6bc6e directory: use lowercase letters in captcha, accept any case for same-looking letters (#5744) 2025-03-12 10:30:04 +00:00
Evgeny
aba09939e2 directory: more permissive captcha rules (#5741) 2025-03-11 10:32:02 +00:00
Evgeny
a6631ce629 core: delete members with messages (#5711)
* core: delete members with messages (WIP)

* remove messages

* fix, test

* update query plans
2025-03-07 07:47:32 +00:00
Evgeny
8c7df76c24 directory: command to disable all spam filters (#5709)
* directory: command to disable all spam filters

* correct syntax

* move deviceName to core opts
2025-03-05 11:20:30 +00:00
Evgeny
b2de37a9fb core: member acceptance (#5678)
* core: member acceptance

* migration

* move hook

* core: support sending direct messages to members (#5680)

* fix compilation, todos

* fix test

* predicates

* comment

* extend hook

* wip

* wip

* wip

* wip

* fix test

* mute output

* schema

* better query

* plans

* fix test

* directory

* captcha

* captcha works

* remove column, add UI types and group status icon

* fix test

* query plans

* exclude messages of pending members from history

* commands for filter settings

* core: separately delete pending approval members; other apis validation (#5699)

* accepted status

* send captcha messages as replies

* fix blocked words

* simpler filter info

* info about /filter and /role after group registration

* update query plans

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2025-03-03 18:57:29 +00:00
Evgeny
511ff1d35c cli: remove multiple members (#5656)
* cli: remove multiple members

* accept all members joining via link as observers (do NOT release)

* blocked words

* blocked words

* XGrpLinkReject

* core: 6.3.0.6 (simplexmq 6.3.0.6)

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2025-02-26 09:25:54 +00:00
Evgeny
2d719273a8 core: update message text when forwarding and quoting to reflect changes in mentioned member names (#5586)
* update message text when forwarding and quoting to reflect changes in mentioned member names

* fix, test

* forward mentions to the same chat, refactor

* comment

* tests

* test markdown conversion to text

* simplify

* unused

* comments
2025-01-30 10:06:26 +00:00
Evgeny
621b291da1 core: member mentions, types and rfc (#5555)
* core: member mentions, types and rfc

* update

* update rfc

* save/get mentions (WIP)

* markdown

* store received mentions and userMention flag

* sent mentions

* update message with mentions

* db queries

* CLI mentions, test passes

* use maps for mentions

* tests

* comment

* save mentions on sent messages

* postresql schema

* refactor

* M.empty

* include both displayName and localAlias into MentionedMemberInfo

* fix saving sent mentions

* include mentions in previews

* update plans
2025-01-29 13:04:48 +00:00
Evgeny
0e940719c1 directory: log superusers, admin users and owners group (#5547) 2025-01-19 00:16:45 +00:00
Evgeny
951156f7fb directory: process group deletion correctly, group of owners (#5540)
* directory: process group deletion correctly, command to invite owners of listed groups to the group of owners

* dont invite to owners group twice
2025-01-17 10:32:57 +00:00