Commit Graph

293 Commits

Author SHA1 Message Date
Evgeny Poberezkin
c0e22d74c4 core: 5.4.0.1 2023-10-09 17:30:48 +01:00
Evgeny Poberezkin
2b228a893a Merge branch 'master' into remote-desktop 2023-10-09 17:21:47 +01:00
Evgeny Poberezkin
a273c68596 core: rename migration, pin dependencies 2023-10-05 22:33:48 +01:00
spaced4ndy
303d0eedf5
core: merge new contacts with existing contacts and group members (#3173) 2023-10-04 20:58:22 +04:00
Evgeny Poberezkin
7959c75df7 Merge branch 'master' into remote-desktop 2023-10-04 16:37:15 +01:00
Alexander Bondarenko
0bcf5c9c66
Add commands for remote session credentials (#3161)
* Add remote host commands

* Make startRemoteHost async

* Add tests

* Trim randomStorePath to 16 chars

* Add chat command tests

* add view, use view output in test

* enable all tests

* Fix discovery listener host

Must use any, not broadcast on macos.

* Fix missing do

* address, names

* Fix session host flow

* fix test

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-10-04 16:36:10 +01:00
Evgeny Poberezkin
38be27271f
core: profile names with spaces (#3105)
* core: profile names with spaces

* test

* more test

* update name validation, export C API

* refactor

* validate name when creating profile in CLI

* validate display name in all APIs when it is changed
2023-10-02 21:56:11 +01:00
Evgeny Poberezkin
968d8e9c34 core: 5.4.0.0 2023-10-01 13:19:32 +01:00
IC Rainbow
bf7917bd67 Merge remote-tracking branch 'origin/master' into ab/remote-discover-upd 2023-09-29 18:42:59 +03:00
spaced4ndy
c64d1e8361
core: notify contact about contact deletion (#3131) 2023-09-27 19:36:13 +04:00
IC Rainbow
77410e5d5e Add remote host discovery 2023-09-27 13:40:19 +03:00
Alexander Bondarenko
3e29c664ac
core: remote host/controller types (#3104)
* Start sprinkling ZoneId everywhere

* Draft zone/satellite/host api

* Add zone dispatching

* Add command relaying handler

* Parse commands and begin DB

* Implement discussed things

* Resolve some comments

* Resolve more stuff

* Make bots ignore remoteHostId from queues

* Fix tests and stub more

* Untangle cmd relaying

* Resolve comments

* Add more http2 client funs

* refactor, rename

* rename

* remove empty tests

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-09-27 09:41:02 +01:00
spaced4ndy
343131c64e core: 5.3.1.0 2023-09-25 17:43:03 +04:00
Evgeny Poberezkin
a179154e87 core: 5.3.0.10 2023-09-22 17:20:30 +01:00
Evgeny Poberezkin
6de0ed4766 core: 5.3.0.9 2023-09-21 17:03:56 +01:00
Evgeny Poberezkin
b08768ea71
5.3-beta.8: desktop 8 (#3086)
* unpin unix package

* desktop: 1.6.0, build 8

* action: file hashes (#3087)

* action: file hashes

* better output

* correct name

---------

Co-authored-by: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com>
2023-09-20 21:21:56 +01:00
Evgeny Poberezkin
648a9761f9 core: 5.3.0.8 2023-09-20 14:54:46 +01:00
spaced4ndy
1928256b09
core: connect existing contacts to new members when profile matches, enable skipping direct connections in groups (#3056)
* core: test group members are assigned different LDNs in group when direct connections aren't created

* disable test output

* core: connect existing contacts to new members when profile matches (#3059)

* core: connect existing contacts to new members when profile matches

* fix migration

* progress

* xInfoProbeOk for member

* fix tests

* add test

* fix tests

* tests

* remove deleteSentProbe

* remove deleteContactProfile_

* views

* don't check connections in deleteUnusedProfile_

* Revert "don't check connections in deleteUnusedProfile_"

This reverts commit 2016a0efde.

* fix test

* core: update member merge

* update saved schema

* fix queries and tests

* rename tables to original names

* remove index, corrections

* update schema dump

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-09-19 21:26:03 +01:00
Evgeny Poberezkin
904b758e79 Merge branch 'master' into master-ghc9 2023-09-18 21:46:27 +01:00
spaced4ndy
0e5b16498a
core: api to create contacts with group members (#3053)
* core: api to create contacts with group members

* implementation

* fix contact replace, more tests

* comment

* rename fields

* fix

* fix

* test group is still incognito

* fix

* replace connection instead of contact

* fix

* check version

* style, names

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-09-16 17:55:48 +04:00
spaced4ndy
01f99baaac Revert "core: direct messages in group (#2994)"
This reverts commit 5fddf64adb.
2023-09-12 17:36:47 +04:00
spaced4ndy
5fddf64adb
core: direct messages in group (#2994) 2023-09-11 18:38:57 +04:00
Evgeny Poberezkin
614b724602 core: fix version of unix package to 2.8.1.1 2023-09-11 13:17:37 +01:00
Evgeny Poberezkin
fd5b40fd8e Merge branch 'master' into master-ghc9 2023-09-10 21:13:52 +01:00
Evgeny Poberezkin
ff657a444c core: 5.3.0.7 2023-09-10 21:12:52 +01:00
Evgeny Poberezkin
fedc31c72c Merge branch 'master' into master-ghc9 2023-09-10 21:11:35 +01:00
Alexander Bondarenko
2dff6c8859
core: do not subscribe to new connections from iOS NSE (subscribe=off flag), subscribe in app when it activates (#3016)
* Trace auto-subs flag

* Replace Bool with SubscriptionMode

* Add subscriptionMode to chat controller

* Start using subscriptionMode in event handlers

* Add need_subs to chat connections

* Add onlyNeeded to subscribeUserConnections

* Post-rebase fixes

* Pass onlyNeeded to Store functions

* Drop needs_sub for connections registered with agent

* update simplexmq, fix activate

* fix rebase, reduce diff

* fix rebase, tests

* fix rebase, executeMany, always subscribe on activate

* test

* update queries

* Update src/Simplex/Chat.hs

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* unset connections to subscribe on start

* update simplexmq

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-09-10 20:40:15 +01:00
spaced4ndy
0c4b843a3f Merge branch 'master' into chat-version-negotiation 2023-09-06 10:41:06 +04:00
Evgeny Poberezkin
0b214acf97
core: support encrypted local files (#2989)
* core: support encrypted local files

* add migration

* update agent api, chat api

* fix query, exported functions to read/write files

* update simplexmq

* remove formatting changes

* test, fix file size

* reduce diff

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* fail when receiving SMP files with local encryption

* update simplexmq

* remove style changes

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-09-01 19:43:27 +01:00
spaced4ndy
7a5d4a5a3d
core: communicate connection chat version range (#2886)
* core: communicate connection chat version range

* encoding

* type

* implementation wip

* contact requests

* tests

* more tests

* refactor

* remove comment

* change encoding

* remove Maybe

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-09-01 19:20:07 +04:00
Evgeny Poberezkin
a2aac72dd1 Merge branch 'master' into master-ghc9 2023-08-26 18:44:34 +01:00
Evgeny Poberezkin
ebb4c860b7 5.3.0.6: update simplexmq (create database path) 2023-08-26 18:36:34 +01:00
Moritz Angermann
761ddac55d
core: use GHC 9.6.2 (#2641)
* Make it compiler with 9.6

Can be built with:

cabal build all -j --allow-newer=base --allow-newer=ghc-prim --allow-newer=template-haskell --allow-newer=bytestring --allow-newer=memory --allow-newer=cryptonite

Using ghc 9.6

It mostly runs afoul of https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0366-no-ambiguous-field-access.rst

* compile with GHC 9.6.2: dependencies, imports, code

* update GHC version in CI

* update GHC version in desktop build scripts

* update simplexmq, sha256map.nix

* update compiler

* update simplexmq, direct-sqlcipher

* remove missing files from .cabal

* building on desktop

* mac build changes

* added version back

* building libffi from source

* update simplexmq

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
2023-08-24 21:56:37 +01:00
Evgeny Poberezkin
8bb19db1ff core: 5.3.0.5 2023-08-17 23:16:23 +01:00
spaced4ndy
4a5dd0a3a4
core: add indexes to improve slow queries performance (#2931)
* core: add indexes to improve slow queries performance

* idx_chat_items_group_id

* update simplexmq, schema

* update simplexmq

* remove index

* update simplexmq

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-08-16 10:41:52 +04:00
Evgeny Poberezkin
48261b7e8f core: 5.3.0.4 2023-08-12 22:00:25 +01:00
Evgeny Poberezkin
34c5658560
Merge pull request #2854 from simplex-chat/directory-service
SimpleX Directory Service
2023-08-07 12:49:30 +01:00
Evgeny Poberezkin
b7ac1b1b55 core: 5.3.0.2 2023-08-05 15:15:53 +01:00
Evgeny Poberezkin
2b69103055
SimpleX Directory Service (#2766)
* SimpleX Directory Service

* more events

* update events

* fix

* Apply suggestions from code review

metavar

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* metavar 2

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* process events

* remove command serialization

* update

* update

* process group profile update

* basic group registration flow

* search works

* better messages

* improve messages

* test broadcast bot

* test for directory service

* better processing of group profile change, test

* refactor

* de-list group when owner or service is removed from the group, tests

* fix: removing any member or any member leaving should not delist the group

* refactor

* more tests, fixes

* disable bot tests in CI

* remove comment

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-08-01 20:54:51 +01:00
Evgeny Poberezkin
d08df4cfbf core: 5.3.0.1 2023-07-31 16:13:19 +01:00
spaced4ndy
445a8e75fe 5.3.0.0 2023-07-28 11:09:14 +04:00
spaced4ndy
ae9b83515c
core: group snd status (#2763)
* core: group snd status

* schema, implementation

* refactor direct, tests

* configure, tests

* item info

* refactor

* refactor

* remove do

* rename

* remove receipts on events

* refactor

* refactor

* refactor

* refactor

* tests

* rename tests

* aggregates

* fix name

* refactor

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-07-26 14:49:35 +04:00
Evgeny Poberezkin
065b932e1f update version to 5.2.0.4 2023-07-22 13:57:28 +01:00
Evgeny Poberezkin
7ebb763889 fix hpack version 2023-07-22 13:52:04 +01:00
Evgeny Poberezkin
eacfc4aa8c 5.2.1.0: update simplexmq (fix slow queries and incorrect message join) 2023-07-22 13:25:13 +01:00
Evgeny Poberezkin
9c49b038cd core: split preferences to separate file 2023-07-22 11:43:03 +01:00
Evgeny Poberezkin
b033fdbeee Merge branch 'stable' 2023-07-21 13:10:47 +01:00
Evgeny Poberezkin
5d775a63c6 core: 5.2.0.3 2023-07-20 18:19:55 +01:00
Evgeny Poberezkin
048ada79bb
core: 5.2.0.2, update simplexmq (5.3.0.0) (#2707)
* core: 5.2.0.2, update simplexmq (5.3.0.0)

* fix tests
2023-07-17 14:44:33 +01:00
Evgeny Poberezkin
0f4473d272
core: delivery receipts (#2644)
* core: delivery receipts

* update simplexmq

* preference, migration

* add activated state to receipts preference, update tests

* set receiveReceipts as activated on new profiles

* update simplexmq, fix tests

* update simplexmq, fix withAckMessage

* one more option

* more

* use tryChatError in ack message

* enable all tests

* rename pref

* update item status on delivery receipts

* show receipts for tests

* remove chat preference for delivery receipts

* add user, contact and group settings for delivery receipts

* only send delivery receipts if enabled for the contact or user profile (and not disabled for the contact)

* fix tests

* reuse event, test

* configure per contact - db, api, test

* rename commands

* update simplexmq

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-07-13 23:48:25 +01:00
spaced4ndy
416ae400eb core: 5.2.0.1 2023-07-10 17:40:25 +04:00
spaced4ndy
3f93397031
core: 5.2.0.0 (#2626) 2023-06-28 16:13:14 +04:00
byrd19
30d4fc757c
add cabal.project source-file to simplex-chat.cabal (#2588)
fix compilation error: ./cabal.project: openBinaryFile: does not exist
2023-06-27 07:44:18 +01:00
spaced4ndy
da2622f00e
core: moderate messages that have arrived after the event of moderation (#2604)
* core: moderate messages that have arrived after the event of moderation

* remove index

* test, delete moderation

* unused selector

* rework

* refactor

* change error

* parameter

* fix syntax

* refactor

* Nothing

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-06-22 20:38:09 +04:00
Evgeny Poberezkin
5c105cb746
core: mark chats as favorite (#2591) 2023-06-18 12:46:38 +01:00
Evgeny Poberezkin
e1370e8f3c
core: split Store.hs to multiple files for faster re-compilation (#2589)
* core: split Store.hs to multiple files for faster re-compilation

* remove unused compiler pragmas
2023-06-18 10:20:11 +01:00
Evgeny Poberezkin
9fbcc2b5bb
core: rename module (#2587) 2023-06-17 11:03:22 +01:00
spaced4ndy
4e696aed82 core: 5.1.3.0 2023-06-12 13:47:13 +04:00
spaced4ndy
425c7b947f
core: optimize group deletion (delays deletion of unused contacts) (#2560)
* core: optimize group deletion (wip)

* delay deletion of unused contacts

* clean up, fix test

* rename field

* remove from type, more checks, remove ctx

* remove space

* rename functions

* rename

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-06-12 13:45:39 +04:00
spaced4ndy
f581e91f19
core, mobile: correctly check whether date is recent (#2559) 2023-06-08 11:23:04 +04:00
spaced4ndy
128883b8a3
core: improve queries performance; delay first chat item expiration cycle on start (#2521) 2023-05-29 15:18:22 +04:00
Evgeny Poberezkin
a4517fcb9b core: 5.1.2.0 2023-05-27 19:34:02 +01:00
spaced4ndy
8b1e5d3db7
core: add indexes for cleanup, initial delay (#2514) 2023-05-26 14:03:26 +04:00
spaced4ndy
fd2c7c888c
core: stabilize tests (#2500) 2023-05-24 16:14:41 +04:00
Evgeny Poberezkin
8952ac9af0 core: 5.1.0.1 2023-05-20 23:08:31 +01:00
Evgeny Poberezkin
9978957e6c
core: deleted timestamps for chat item (#2459)
* core: edited and deleted timestamps for item

* migration

* add deleted timestamp to chat item, use chat item if there are no versions

* use broker timestamp for remote deletions

* refactor
2023-05-19 13:52:51 +01:00
Evgeny Poberezkin
c06a970987
core: message reactions (#2429)
* core: message reactions

* remove comments

* core: commands to set reactions

* fix tests

* process reaction messages

* store functions

* include reactions on item updates

* remove print

* view, tests

* load reactions for new items

* test removing reaction

* remove spaces

* limit the number of different reactions on one item

* remove unique constraints

* fix permissions

* indexes

* check chat item content before adding reaction

* fix group reactions

* simpler index

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-05-15 11:28:53 +01:00
spaced4ndy
c87f4e68f7
core: keep chat item edit history (#2410) 2023-05-08 20:07:51 +04:00
spaced4ndy
54fc052e47
core: remove msg_delivery_events unique constraint (recreates table); cleanup old messages (#2376) 2023-05-05 13:49:09 +04:00
Evgeny Poberezkin
af59178318 core: 5.1.0.0 2023-05-04 12:45:57 +01:00
spaced4ndy
0b57cc08a7
core, ios: include contact addresses in profiles (#2328)
* core: include contact links in profiles

* add connection request link to contact and group profiles

* set group link on update, view, api

* core: include contact addresses in profiles

* remove id from UserContactLink

* schema, fix test

* remove address from profile when deleting link, tests

* remove diff

* remove diff

* fix

* ios wip

* learn more, confirm save, reset on delete

* re-use in create link view

* remove obsolete files

* color

* revert scheme

* learn more with create

* layout

* layout

* progress indicator

* delete text

* save on change, layout

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-04-27 17:19:21 +04:00
Evgeny Poberezkin
03882367da core: 5.0.0.2 2023-04-20 14:19:09 +01:00
spaced4ndy
4d700d113d
core, ios: mark files to receive from NSE, receive marked files on chat start (#2218) 2023-04-20 16:52:55 +04:00
Evgeny Poberezkin
d50e65af20 core: 5.0.0.1 2023-04-18 21:04:34 +01:00
spaced4ndy
96f0083384 core: 5.0.0.0 2023-04-14 18:05:16 +04:00
spaced4ndy
90dffc975a
core: request and save extra recipient file descriptions (#2170) 2023-04-12 14:47:54 +04:00
Evgeny Poberezkin
85537a99e8 core: 4.6.1.2 2023-04-07 18:18:21 +01:00
Evgeny Poberezkin
1a3f0bed47
core: update servers API to include XFTP servers, ios: generalize UI to manage servers (#2140)
* core: update servers API to include XFTP servers, ios: generalize UI to manage servers

* add test

* update migrations to pass tests

* fix readme

* update simplexmq
2023-04-05 21:59:12 +01:00
Evgeny Poberezkin
da17639309 core: 4.6.1.1 2023-04-04 17:31:30 +01:00
spaced4ndy
1a7a79d504
core: allow repeat receive after cancel for XFTP files (#2134) 2023-04-03 16:31:18 +04:00
spaced4ndy
7f1214688a core: 4.6.1.0 2023-03-31 19:19:51 +04:00
spaced4ndy
dfec1cbb02
core: add protocol field to files table (#2089) 2023-03-28 14:38:36 +04:00
spaced4ndy
babbca48f8 Merge branch 'master' into xftp 2023-03-23 13:58:23 +04:00
Evgeny Poberezkin
8544984b17 core: 4.6.0.0 2023-03-22 19:37:02 +00:00
Evgeny Poberezkin
06a0dbd0f2
core, iOS: hidden and muted user profiles (#2025)
* core, ios: profile privacy design

* migration

* core: user profile privacy

* update nix dependencies

* update simplexmq

* import stateTVar

* update core library

* update UI

* update hide/show user profile

* update API, UI, fix test

* update api, UI, test

* update api call

* fix api

* update UI for hidden profiles

* filter notifications on hidden/muted profiles when inactive, alerts

* updates

* update schema, test, icon
2023-03-22 15:58:01 +00:00
spaced4ndy
60d6a47bdb
xftp: delete agent rcv files on completion, error, item delete (#2040) 2023-03-21 15:21:14 +04:00
Evgeny Poberezkin
66ea2d5d71 Merge branch 'stable' 2023-03-18 08:38:10 +00:00
Evgeny Poberezkin
3dd5b5d835 core: 4.5.4.2 (add stateTVar imports) 2023-03-18 07:59:43 +00:00
Evgeny Poberezkin
1657bcf97d core: 4.5.4.1 2023-03-17 15:02:41 +00:00
Evgeny Poberezkin
f915eb2a20 core: initial group member role when joining via link (#1975)
* core: initial group member role when joining via link

* fix tests

* set role when joining group via link, enable observer test

* show group link when role changes

* amend test

* check role is member or observer when creating a link
2023-03-16 22:19:51 +00:00
Evgeny Poberezkin
2817306659
core: types to support xftp (#1971)
* core: types to support xftp

* migration, amend types

* update protocol / types

* update protocol, types

* update schema, simplexmq
2023-03-09 11:01:22 +00:00
Evgeny Poberezkin
7d49209f79
core: initial group member role when joining via link (#1975)
* core: initial group member role when joining via link

* fix tests

* set role when joining group via link, enable observer test

* show group link when role changes

* amend test

* check role is member or observer when creating a link
2023-03-06 09:51:42 +00:00
spacedandy
c80eaf8550 core: 4.5.3.1 2023-03-01 13:23:34 +04:00
Evgeny Poberezkin
0ebf1da05d
core: WebRTC frames encryption (#1942)
* core: WebRTC frames encryption

* test
2023-02-19 23:51:50 +00:00
Evgeny Poberezkin
b40ed2a7f3 core: 4.5.3.0 2023-02-19 10:09:22 +00:00
Evgeny Poberezkin
b7575ec01d
core: encrypt/decrypt WebRTC frames (#1935)
* core: encrypt/decrypt WebRTC frames

* swift API

* add decrypt stub

* change name

* remove unused type

* move functions

* update cabal file

* copy bytes from encrypted string
2023-02-16 20:25:37 +00:00
Evgeny Poberezkin
a0351d6f99
apps: update chat bots, readme (#1928)
* apps: update chat bots, readme

* CLI readme

* broadcast bot

* delete messages from non-publishers, better replies, support forwarding low-res images and links

* typo

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* change

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-02-14 07:57:27 +00:00
JRoberts
5405f44f54 core: 4.5.2.0 2023-02-09 16:34:44 +04:00
Evgeny Poberezkin
9e4499de6d
core: allow admins/owners delete member messages (#1869)
* core: allow admins/owners delete member messages

* allow message deletion to admins/owners

* deleted by types, schema

* check role

* fix test, view

* view, tests

* comment

* test timed deletion events

* refactor

* refactor

* refactor

---------

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
2023-02-08 11:08:53 +04:00
Evgeny Poberezkin
155ffd16ec core: 4.5.1.0 2023-02-05 22:06:27 +00:00